myaddrs(): Fix: do not return invalid *from* (Viktor SZÉPE)..
commitc59a20ff4ceb750c9c20217b1233becf349ac117
authorSteffen Nurpmeso <steffen@sdaoden.eu>
Sun, 21 Jan 2018 00:48:31 +0000 (21 01:48 +0100)
committerSteffen Nurpmeso <steffen@sdaoden.eu>
Sun, 21 Jan 2018 02:05:10 +0000 (21 03:05 +0100)
tree3146cecc2a22f4b50733a451bb5e5ad748a71a67
parent6ac954a46d162048d7dcee9f71fa0b69b91bdaca
myaddrs(): Fix: do not return invalid *from* (Viktor SZÉPE)..

When placing an invalid entry in *from* (the terrible and hated
and TODO) myaddrs() did not yet return NULL but the false *from*
nonetheless.  It will not be used, but nonetheless myaddrs()
should return NULL, because like that we will say

  s-nail: An address given in *from* is invalid: bla <CSE>
  s-nail: Your configuration requires a *from* address, but none was given

instead of only the first and continuing.

While here, fix some false assumptions in mail1(), n_pstate_err_no
may have a different setting than n_ERR_INVAL, i am too tired to
look why but if i do not use -:/ but include my own configuration
i saw

  s-nail: An address given in *from* is invalid: bla <CSE>
  s-nail: Your configuration requires a *from* address, but none was given
  Assertion failed: n_pstate_err_no == n_ERR_INVAL (./sendout.c: mail1: 1849)
  Crash NYD listing written to /tmp/s-nail.dat

and that is not desirable.  Oh, of course, the entire compose-mode
is in between setting that variable and the assertion.  Ouch!
head.c
sendout.c