On Fri 14/Dec/2012 13:03:50 +0100 Sam Varshavchik wrote: > Alessandro Vesely writes: >> On Fri 14/Dec/2012 01:01:23 +0100 Sam Varshavchik wrote: >>> Alessandro Vesely writes: >>> >>>> From: <u...@example.com> >>>> To: <l...@example.org> >>>> >>>> get changed to: >>>> >>>> From: u...@example.com >>>> To: l...@example.org >>>> >> >> After looking a bit closer at the code, I think I could >> try a patch, next week, say. How about NOADDRTRANSCRIBE? > > Try it; not sure about the name, NOADDRREWRITE sounds better.
Sure, I just tried to avoid a the double 'R'... I see no other reason than DKIM signatures to avoid rewriting those lines. The assumption that zdkimfilter makes, that incoming mail can be signed while outgoing mail is not, does not have to be true in general. For example, a relay can use a smarthost with SMTP AUTH and submit DKIM-signed mail. So I allowed three values to NOADDRREWRITE: never, always, and depending on the presence of a signature. I tested submission works as expected. I also patched esmtpd*.dist, but did not test install-configure, nor the web config. For readability, the large hunk that ends the patch, @@ -1811,33 +1822,40 @@, would have been two small hunks using "diff -wu": @@ -1811,6 +1822,12 @@ headername == "reply-to" || headername == "sender") { + // The signature SHOULD be prepended to the message. + + if (noaddrrewrite > 1) + noaddrrewrite = 0; + if (!noaddrrewrite) + { char *errmsg; char *new_header=rw_rewrite_header(mf->module, header.c_str(), @@ -1839,6 +1856,7 @@ free(new_header); header += '\n'; } + } if (headername == "from" && !bofh_checkspf("BOFHSPFFROM", "off", "off")) { Is that ok? ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ courier-users mailing list courier-users@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users