From: Sergey Matveev Date: Sun, 15 Jan 2017 07:59:14 +0000 (+0300) Subject: Check that sendmail is configured for the peer X-Git-Tag: 0.2^2~23 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=8cfca6f25358b2ce75abd2b410e28e5b5008413b;p=nncp.git Check that sendmail is configured for the peer --- diff --git a/THANKS b/THANKS index 1f382f9..939764c 100644 --- a/THANKS +++ b/THANKS @@ -2,3 +2,4 @@ There are people deserving to be thanked for helping this project: * Shawn K. Quinn for his descriptive instructions about building NNCP under Ubuntu GNU/Linux distributions + and bug reports diff --git a/src/cypherpunks.ru/nncp/toss.go b/src/cypherpunks.ru/nncp/toss.go index 31bda11..11e8591 100644 --- a/src/cypherpunks.ru/nncp/toss.go +++ b/src/cypherpunks.ru/nncp/toss.go @@ -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],