]> Cypherpunks.ru repositories - nncp.git/commitdiff
Check that sendmail is configured for the peer
authorSergey Matveev <stargrave@stargrave.org>
Sun, 15 Jan 2017 07:59:14 +0000 (10:59 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sun, 15 Jan 2017 07:59:14 +0000 (10:59 +0300)
THANKS
src/cypherpunks.ru/nncp/toss.go

diff --git a/THANKS b/THANKS
index 1f382f977d8cac8ebd1496aaab5042e71f769b24..939764c5162227b18895a0463a28b18ba1179f1f 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -2,3 +2,4 @@ There are people deserving to be thanked for helping this project:
 
 * Shawn K. Quinn <skquinn at rushpost dot com> for his descriptive
   instructions about building NNCP under Ubuntu GNU/Linux distributions
+  and bug reports
index 31bda110ced87a6070bc0615fa0ed1cd0e737d90..11e85914bebcb0c179b4d75e77df25dc9a49610d 100644 (file)
@@ -133,6 +133,11 @@ func (ctx *Ctx) Toss(nodeId *NodeId, nice uint8, dryRun bool) bool {
                                log.Fatalln(err)
                        }
                        sendmail := ctx.Neigh[*job.PktEnc.Sender].Sendmail
+                       if len(sendmail) == 0 {
+                               ctx.LogE("rx", SdsAdd(sds, SDS{"err": "No sendmail configured"}), "")
+                               isBad = true
+                               goto Closing
+                       }
                        if !dryRun {
                                cmd := exec.Command(
                                        sendmail[0],