On Thu, Feb 26, 2009 at 8:50 PM, Magnus Bäck <mag...@dsek.lth.se> wrote: > On Thursday, February 26, 2009 at 19:57 CET, > Zoltan Balogh <zee.bal...@gmail.com> wrote: > >> On 2/26/09, Victor Duchovni <victor.ducho...@morganstanley.com> wrote: >> >> > Note, this notion of "correctness" is not one of those pedantic >> > types of "correctness" that is "optional". Systems that forward mail >> > to all header recipients are severely broken, and will cause mail >> > loops, blacklisting by annoyed incorrect recipients, abuse by >> > spammers, ... >> > >> > So in short, forwarding systems must PRESERVE the original message >> > envelope and must not re-create fresh envelopes from message To/Cc >> > headers. >> >> Preserving an original envelope is relevant only for SMTP >> communication. > > Why would you say that? Maybe I misunderstood what was meant by "preserving the original message envelope". I was thinking in terms of preserving the envelope through SMTP communication forwarding.
>> So the idea of fetching mail by POP3 and then forward >> it to mail recipients parsed from fetched email header is generally a >> bad idea? > > Yes, of course. The To and Cc headers have nothing at all to do with the > intended recipient addresses. > >> But if I am not wrong that's exactly what fetchmail and POP3 >> mail proxies do - so all these systems are not correct and not >> recommended to use? I usually use transport mechanism of postfix >> to forward a SMTP communication to other mail server. Use of fetchmail >> is a server2-user requirement. > > Multidrop POP is broken iff headers are used to determine the > recipients. This is what I read on the fetchmail man page http://fetchmail.berlios.de/fetchmail-man.html#2 : "... fetchmail must resort to a process of informed guess-work in an attempt to discover the true envelope recipient of a message, unless the ISP stores the envelope information in some header (not all do)." So basically I just need to help fetchmail "guessing" the correct envelope recipients by appending "X-Envelope-To" (or similar header entry) to the email message. I did the following: smtpd_recipient_restrictions = ... check_recipient_access pcre:/etc/postfix/recipient_access /etc/postfix/check_recipient_access: /(....@somedomain.com)/ PREPEND X-Envelope-To: <$1> and it works. It adds the "X-Envelope-To:" information for Bcc: recipients what should be sufficient for fetchmail. The "X-Envelope-To:" information is added only for somedomain.com recipients so other domain emails are not affected. I could not find a different solution. If there is any please let me know. Thanx, Zoltan