Alessandro Vesely writes:

On Fri 14/Dec/2012 01:01:23 +0100 Sam Varshavchik wrote:
> Alessandro Vesely writes:
>
>> when I receive a message with, say:
>>
>>   From: <u...@example.com>
>>   To: <l...@example.org>
>>
>> those non-compliant headers get changed to:
>>
>>   From: u...@example.com
>>   To: l...@example.org
>>
>> I'm unclear on where the angle bracket removal happens.  The code in
>> submit.C seems to be concerned with submission rather than reception
>> (also because it entails a "511 Headers specify no recipients that I
>> never saw on incoming mail.)
>
> submit.C handles all mail, but only locally-submitted mail have their
> headers reformatted, and not in submit.C but sendmail.c

I think it happens in getrcpts().  At line 1815 I see this call:

        char    *new_header=rw_rewrite_header(mf->module,
                                              header.c_str(),
                                              RW_HEADER|RW_SUBMIT,
                                              addresst, &errmsg);

That's a couple of spans above the checks for NOADDMSGID and NOADDATE.
I set the former but not the latter.  I attach a small test file to
confirm what takes place.

> If there's any intermediate step in your mail path, such as maildrop
> or .courier forwarding the message somewhere, that can come across as
> a locally-submitted mail, that's subject to header rewriting.

But I should get extra Received: lines such path.

> Header rewriting occurs in sendmail.c, which only gets invoked via
> the command line, or by external script. courieresmtpd.c runs
> submit directly, no header rewriting takes place in that path.

Some does...  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.

Attachment: pgpPGL3pYh0iz.pgp
Description: PGP signature

------------------------------------------------------------------------------
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

Reply via email to