Re: [Mimedefang] Adding Recipients to X-Recipients Header
Marcus Schopen wrote: But if I send an email e.g. from GMX using Bcc to j...@domain.com and s...@domain.com only one recipient is shown in @Recipients. In my understanding for this domain domain.com both recipients should put to the X-Orig-Rcpts Header by above line. Ideas? Maybe it was transmitted as 2 messages to 1 recipient each. Look at your mail server logs. Joseph Brennan Columbia University Information Technology ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Hi Steffen, Am Mittwoch, den 22.06.2011, 09:14 +0200 schrieb Steffen Kaiser: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, 22 Jun 2011, Marcus Schopen wrote: > > >> Correct. You can find out other recipients on YOUR mail server (or > >> downstream), but not recipients which were handled by other servers > >> upstream or in parallel to yours. > > > > I add the following lines to filter_end > > > >foreach $recip(@Recipients) { > > if ($recip =~ /<.*\@test\.com>$/i) { > > action_add_header("X-Orig-Rcpts", "$recip"); > > } > >} > > > > If I send an email from an external MX to BCc t...@test.com and BCc > > te...@test.com I just get an X-Orig-Rcpts for te...@test.com. In my > > config stream_by_domain is activated in filter_begin. > > Hmm, if you use stream_by_domain() already, all recipients should have the > same domain already. Right, it wouldn't be a problem or in my setup it's welcome if only all recipients of one domain are shown in the X-Orig-Rcpts Header. > The man of stream_by_domain() says: > > " > stream_by_domain() looks at all the recipients of the message, >and if they belong to the same domain (e.g., > j...@domain.com, >j...@domain.com and s...@domain.com), it returns 0 and sets > the >global variable $Domain to the domain (domain.com in this > exam‐ >ple.) > " > > - -> > > if($Domain =~ /\A(?:domain1|domain2|...)\z/i) { > #action_delete_all_headers('X-Orig-Rcpts'); # see below > action_add_header('X-Orig-Rcpts', join(', ', @Recipients)); > } I've tested this with action_add_header('X-Orig-Rcpts', join(', ', @Recipients)); But if I send an email e.g. from GMX using Bcc to j...@domain.com and s...@domain.com only one recipient is shown in @Recipients. In my understanding for this domain domain.com both recipients should put to the X-Orig-Rcpts Header by above line. Ideas? > BTW: If someone knows your mail setup or you forward such mails around, > the header may contain more (or not) what you intend. Depending on your > needs you should replace the 'X-Orig-Rcpts' header. If a recipient forwards such a marked email with X-Orig-Rcpts header to someone else outside, it would only be a problem if the new recipient should not see to whom else the mail was addressed to under my domain. I can live with that. Otherwise one should not forward such an Bcc email. But you are right. This is a point one has to think about. Cheers Marcus > Regards, > > - -- > Steffen Kaiser > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (GNU/Linux) > > iQEVAwUBTgGWbP41+pMevzVSAQKBFwf8DjWFaNSCG1nbJ/+R3l8BGF+S3G6Lqt9A > R0/NPK9BLTeL15brH21Rs/oT/vToRVoUUD/b29H8nyDyJbe5LiuR+nEfpC+UUme0 > lcaV4m3m32h6iDxvlFVBaADd3Do4BzXluk9lLCXk5pUzVtcOBVfHtCLB1OpZK9Ro > DgZwNxnJabJ6Rw6ZW7lnaHPBnLEXdup+eo/BgSPcZ3XlOD12VYOqryJKTM1VJ+jn > 0msfb9pRo8ZSwBy+QmfYzMVZkEZmWXX7TIf/Gqc65N/d9b20hakXJIKzSv/ZFxAu > rh9KifHzxfsGN+9R02QTXMMWD9NvRy7Agqwg+q7wN/x0T0uMG3bf8A== > =aKAE > -END PGP SIGNATURE- > ___ NOTE: If there is a > disclaimer or other legal boilerplate in the above message, it is NULL AND > VOID. You may ignore it. Visit http://www.mimedefang.org and > http://www.roaringpenguin.com MIMEDefang mailing list > MIMEDefang@lists.roaringpenguin.com > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, 22 Jun 2011, Marcus Schopen wrote: Correct. You can find out other recipients on YOUR mail server (or downstream), but not recipients which were handled by other servers upstream or in parallel to yours. I add the following lines to filter_end foreach $recip(@Recipients) { if ($recip =~ /<.*\@test\.com>$/i) { action_add_header("X-Orig-Rcpts", "$recip"); } } If I send an email from an external MX to BCc t...@test.com and BCc te...@test.com I just get an X-Orig-Rcpts for te...@test.com. In my config stream_by_domain is activated in filter_begin. Hmm, if you use stream_by_domain() already, all recipients should have the same domain already. The man of stream_by_domain() says: " stream_by_domain() looks at all the recipients of the message, and if they belong to the same domain (e.g., j...@domain.com, j...@domain.com and s...@domain.com), it returns 0 and sets the global variable $Domain to the domain (domain.com in this exam‐ ple.) " - -> if($Domain =~ /\A(?:domain1|domain2|...)\z/i) { #action_delete_all_headers('X-Orig-Rcpts'); # see below action_add_header('X-Orig-Rcpts', join(', ', @Recipients)); } BTW: If someone knows your mail setup or you forward such mails around, the header may contain more (or not) what you intend. Depending on your needs you should replace the 'X-Orig-Rcpts' header. Regards, - -- Steffen Kaiser -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBTgGWbP41+pMevzVSAQKBFwf8DjWFaNSCG1nbJ/+R3l8BGF+S3G6Lqt9A R0/NPK9BLTeL15brH21Rs/oT/vToRVoUUD/b29H8nyDyJbe5LiuR+nEfpC+UUme0 lcaV4m3m32h6iDxvlFVBaADd3Do4BzXluk9lLCXk5pUzVtcOBVfHtCLB1OpZK9Ro DgZwNxnJabJ6Rw6ZW7lnaHPBnLEXdup+eo/BgSPcZ3XlOD12VYOqryJKTM1VJ+jn 0msfb9pRo8ZSwBy+QmfYzMVZkEZmWXX7TIf/Gqc65N/d9b20hakXJIKzSv/ZFxAu rh9KifHzxfsGN+9R02QTXMMWD9NvRy7Agqwg+q7wN/x0T0uMG3bf8A== =aKAE -END PGP SIGNATURE-___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
On Wed, 22 Jun 2011 03:06:39 +0200 Marcus Schopen wrote: > I add the following lines to filter_end > > foreach $recip(@Recipients) { > if ($recip =~ /<.*\@test\.com>$/i) { > action_add_header("X-Orig-Rcpts", "$recip"); > } > } Or if you only want one header: action_add_header('X-Orig-Rcpts', join(', ', grep { /\@test\.com>$/i } @Recipients)); (Untested :)) Regards, David. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Am Dienstag, den 21.06.2011, 17:13 -0700 schrieb kd6...@yahoo.com: > --- On Tue, 6/21/11, Marcus Schopen wrote: > > > Maybe the recipient is not supposed to know who else got copies. > > > > This would only be the case if another BCc recipient is handled by my > > mailserver. Or am I wrong? > > Correct. You can find out other recipients on YOUR mail server (or > downstream), but not recipients which were handled by other servers upstream > or in parallel to yours. I add the following lines to filter_end foreach $recip(@Recipients) { if ($recip =~ /<.*\@test\.com>$/i) { action_add_header("X-Orig-Rcpts", "$recip"); } } If I send an email from an external MX to BCc t...@test.com and BCc te...@test.com I just get an X-Orig-Rcpts for te...@test.com. In my config stream_by_domain is activated in filter_begin. Ciao! > ___ > NOTE: If there is a disclaimer or other legal boilerplate in the above > message, it is NULL AND VOID. You may ignore it. > > Visit http://www.mimedefang.org and http://www.roaringpenguin.com > MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com > http://lists.roaringpenguin.com/mailman/listinfo/mimedefang ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
--- On Tue, 6/21/11, Marcus Schopen wrote: > > Maybe the recipient is not supposed to know who else got copies. > > This would only be the case if another BCc recipient is handled by my > mailserver. Or am I wrong? Correct. You can find out other recipients on YOUR mail server (or downstream), but not recipients which were handled by other servers upstream or in parallel to yours. ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Am Dienstag, den 21.06.2011, 18:29 -0400 schrieb Joseph Brennan: > Marcus Schopen wrote: > > >> but it goes against the sender's intention. > > > > I just wan't to add the header for incoming mails not for outgoing. Why > > is it against the sender's intention if the recipient knows to which of > > his addresses the mail was sent to? > > > Maybe the recipient is not supposed to know who else got copies. This would only be the case if another BCc recipient is handled by my mailserver. Or am I wrong? Ciao! ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Marcus Schopen wrote: but it goes against the sender's intention. I just wan't to add the header for incoming mails not for outgoing. Why is it against the sender's intention if the recipient knows to which of his addresses the mail was sent to? Maybe the recipient is not supposed to know who else got copies. Joseph Brennan Columbia University Information Technology ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Hi Joseph, Am Dienstag, den 21.06.2011, 13:15 -0400 schrieb Joseph Brennan: > Marcus Schopen wrote: > > > if receiving multiple addresses in one and the same mail account (POP3 > > box) is in case of bcc received emails hard to see the real recipient > > and impossible to sort such mails by recipient on client side. Adding a > > "X-Recipients: " line to the header which contains all recipients just > > for incoming emails would be helpful for better sorting on client side. > > I've seen this post by David on the list: > > > > Possible? > > > It's very easily done, How and especially only for incoming mails, not outgoing. > but it goes against the sender's intention. I just wan't to add the header for incoming mails not for outgoing. Why is it against the sender's intention if the recipient knows to which of his addresses the mail was sent to? > A little harder to do, but better policy, would be to split the message > into a copy for each recipient, with only that recipient's address in > the X header. In this special setup not possible. Ciao! ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Am Dienstag, den 21.06.2011, 18:13 +0200 schrieb Marcus Schopen: > Hi, > > if receiving multiple addresses in one and the same mail account (POP3 > box) is in case of bcc received emails hard to see the real recipient > and impossible to sort such mails by recipient one client side. Adding a > "X-Recipients: " line to the header which contains all recipients just > for incoming emails would be helpful for better sorting on client side. > I've seen this post by David on the list: http://markmail.org/message/hvnct7j54owow7jz but not sure if this is what I'm looking for. I already use stream by domain in filter_begin and don't want to go to stream_by_recipient if not really necessary. Ciao! ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
Re: [Mimedefang] Adding Recipients to X-Recipients Header
Marcus Schopen wrote: if receiving multiple addresses in one and the same mail account (POP3 box) is in case of bcc received emails hard to see the real recipient and impossible to sort such mails by recipient on client side. Adding a "X-Recipients: " line to the header which contains all recipients just for incoming emails would be helpful for better sorting on client side. I've seen this post by David on the list: Possible? It's very easily done, but it goes against the sender's intention. A little harder to do, but better policy, would be to split the message into a copy for each recipient, with only that recipient's address in the X header. Joseph Brennan Columbia University Information Technology ___ NOTE: If there is a disclaimer or other legal boilerplate in the above message, it is NULL AND VOID. You may ignore it. Visit http://www.mimedefang.org and http://www.roaringpenguin.com MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com http://lists.roaringpenguin.com/mailman/listinfo/mimedefang