[Dovecot] procmail deliver and envelope-to
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello,
first of all, please reply private as I am not subscribed to the list. But if this question takes to much traffic I can subscribe.
My problem is that I have to use procmail (as it can call external programs) which finally calls deliver. My main rules are sieve and they work find except that I cannot use subaddress matching in envelope to (not envelope send which has been addressed earlier). But As I use the '+'-Feature the envelope to will be the one interesting for me.
For example, I am subscribed to the mailing list gimp-devel with klaus+gdev@ethgen.de. So I want to use: require ["fileinto", "imapflags", "subaddress", "envelope"]; ... if envelope :detail :is "To" "gdev" { fileinto "Mailinglisten.gimp-devel"; stop; }
But if I call the deliver tool from procmail this will not work and the mail falls thought to the next matching rule or the implicit delivery. In the resulting mail, Envelope-to: is set correctly but no sorting.
Is there any way to use the Envelope-to: header for this?
Regards Klaus Ethgen
Klaus Ethgen http://www.ethgen.de/ pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen Klaus@Ethgen.de Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBR7x5n5+OKpjRpO3lAQJ5mgf/TvGb+HlF1wRd087MvvNxu0MoQyPqLfCh vVW+/gCn0urALmpJj8J9bjsMNa4RsxYUYedPcbGx6vT5VSkTbYUJlzCeWlt5QPvS b3Ql7+fwAzBr1+3LcBtpsJgyEz7gYxaQ+rFhhhjRMaRu/rKERSuUdbrKxSg6Xnxy E7nMeajexVk9Emze9Tdl+cRxw2b9ycS+OM4wywScT/F+eZccWMdimUAw4BNqyFZY mFH2pFCsKwKHuDAMT7O9HxvkTj76d3+OEVguW0hz5hLppgjizsJWo6gWbVtJL5Yf ScLYRcSflWPTuYeO/dXxEYrEaDwFm1MO2BPj7YygGZIg++eWLF73iw== =OD+j -----END PGP SIGNATURE-----
Klaus Ethgen wrote:
Hello,
first of all, please reply private as I am not subscribed to the list. But if this question takes to much traffic I can subscribe.
the problem with non members is that some server in the path may discard or bounce our mail, and they won't get it.
My problem is that I have to use procmail (as it can call external programs) which finally calls deliver. My main rules are sieve and they work find except that I cannot use subaddress matching in envelope to (not envelope send which has been addressed earlier). But As I use the '+'-Feature the envelope to will be the one interesting for me.
For example, I am subscribed to the mailing list gimp-devel with klaus+gdev@ethgen.de. So I want to use: require ["fileinto", "imapflags", "subaddress", "envelope"]; ... if envelope :detail :is "To" "gdev" { fileinto "Mailinglisten.gimp-devel"; stop; }
why not use a header specific to the list instead of your address? I mean something like:
if header :contains "List-Id" "
This is independent on your address. so if you ever change the subscribed address, you won't need to change the rule. and if other users on your system need a similar processing, they can copy the rule.
But if I call the deliver tool from procmail this will not work and the mail falls thought to the next matching rule or the implicit delivery. In the resulting mail, Envelope-to: is set correctly but no sorting.
Is there any way to use the Envelope-to: header for this?
Regards Klaus Ethgen
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi mouss,
Am Mi den 20. Feb 2008 um 21:57 schrieb mouss:
first of all, please reply private as I am not subscribed to the list. But if this question takes to much traffic I can subscribe.
the problem with non members is that some server in the path may discard or bounce our mail, and they won't get it.
I cannot follow completely. What is the difference if the mail is manually approved than that the people is member of the list?
(not envelope send which has been addressed earlier). But As I use the '+'-Feature the envelope to will be the one interesting for me.
For example, I am subscribed to the mailing list gimp-devel with klaus+gdev@ethgen.de. So I want to use: require ["fileinto", "imapflags", "subaddress", "envelope"]; ... if envelope :detail :is "To" "gdev" { fileinto "Mailinglisten.gimp-devel"; stop; }
why not use a header specific to the list instead of your address? I mean something like:
if header :contains "List-Id" "
" { fileinto "Mailinglisten.gimp-devel"; stop; } This is independent on your address. so if you ever change the subscribed address, you won't need to change the rule. and if other users on your system need a similar processing, they can copy the rule.
Ah, that's true for well formed mailing lists like made with mailman or majordomo. But there are many mailing lists out in the wild where you have no other change than the "plussed" address to select them out. (The example might be unclear as the gimp-devel list is well formed.
Regards Klaus Ethgen
Klaus Ethgen http://www.ethgen.de/ pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen Klaus@Ethgen.de Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBR7yiAJ+OKpjRpO3lAQKMNwf/aNbOhdonRGtXNfL1Xngls2HYtp/AYteX QysaJ3jwfiMCRTQQUUXW+yRNwFhy6qfc3lGfqcYsb7H0OwM+BOz2qlS9113qp0jT V6Yp2on330MkquqzXoU7FQJEEJbls/pPGu504BbewtYLcd3y3spjX6pi++y+AjL1 AqTR3ZhgdX6DWIrfXQ8gfky76/eJqruS9ZoXEmo/PWsHDjYxrCrPR0gAy4oCT7vl ueq7i0krzfHdcs/sWDuVnv6bTqdTmLd6LE7AHqJkrCZCdW5ugSVWlBfLzZuFJNG5 7fRO42Omoi+ddAjeII2Elr9jHR8xX0i/Awv81cFBk96d0hrXQBOZYA== =esRm -----END PGP SIGNATURE-----
Klaus Ethgen wrote:
Hi mouss,
Am Mi den 20. Feb 2008 um 21:57 schrieb mouss:
first of all, please reply private as I am not subscribed to the list. But if this question takes to much traffic I can subscribe. the problem with non members is that some server in the path may discard or bounce our mail, and they won't get it.
I cannot follow completely. What is the difference if the mail is manually approved than that the people is member of the list?
the problem is not posting to the list. As long as you get the CC, it's ok. I only meant that it is possible that you don't receive an offlist message, for example because some server or gateway on your side uses a blocklist or play "discard me" games. I've already got bounces in such cases (when I post via my home ISP) and this doesn't get me in a good mood:)
[snip]
Ah, that's true for well formed mailing lists like made with mailman or majordomo. But there are many mailing lists out in the wild where you have no other change than the "plussed" address to select them out. (The example might be unclear as the gimp-devel list is well formed.
then you'll need to find such an example :)
The following seems to work for every list I've seen (by order of my personal preferences):
- List-Id
- List-Post
- List-Owner
- Sender
- Return-Path
- To or Cc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi mouss,
Am Do den 21. Feb 2008 um 0:55 schrieb mouss:
the problem is not posting to the list. As long as you get the CC, it's ok. I only meant that it is possible that you don't receive an offlist message, for example because some server or gateway on your side uses a blocklist or play "discard me" games. I've already got bounces in such cases (when I post via my home ISP) and this doesn't get me in a good mood:)
Ah, since the last problem years ago I switched to do all mail handling by myself. I never ever use a smarthost of my ISP. I have my own.
Ah, that's true for well formed mailing lists like made with mailman or majordomo. But there are many mailing lists out in the wild where you have no other change than the "plussed" address to select them out. (The example might be unclear as the gimp-devel list is well formed.
then you'll need to find such an example :)
Sorry, it is not all open to public. :-) But simply look at the exchange disease. (german: Austauschkrankheit)
The following seems to work for every list I've seen (by order of my personal preferences):
- List-Id
- List-Post
- List-Owner
- Sender
- Return-Path
- To or Cc
Sure, works in most of the cases. But there are some where it will not work:
- exchange thing
- Users who reply by direct mail but you wish to have that mails in the mailinglist folder
- Ill lists
- Users who reply to the list *and* to me (double mails) which I wish to have all in the mailinglist folder (Like I do with this mail. :-)
- ...
Well, procmail is called by exim the same way than they might call deliver direct. There must be a way to pass the envelope information to deliver when using it in a pipe from procmail.?
Regards Klaus Ethgen
Klaus Ethgen http://www.ethgen.de/ pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen Klaus@Ethgen.de Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBR71cO5+OKpjRpO3lAQKwngf/bXxqjWr1M5iUGy0LuBfsEZf/8+HqujpP iz4siUzLSOK4pitZwZ8nyiRuSzZocfRLuOuLJL7yH/kHTqj8Imyiv4FG6wIwz95c ubLIlFDcj4mmsUqoek5pbpWFWNFKj9bqSUCbbM7Fx+FdGv5FEPdG9ibI7fkd0vMG XdecjjHnQ0TO60w8UzzWGi1Vt+y7qDnQqEbKV2lUTIJgIIryd1YtFXoYsK00/0Sz 9nbnk776LWfsLQLtXXKCH96co2NLt/6644d2HS4eApm6pWiNlOsNH5NRaTS7SQqF sAr+9wpXhpKk7hwUzBwrvpqHfZdiEiGnyiaAQP5uxWMy+uKGN1QMPw== =FcmR -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 20 Feb 2008, Klaus Ethgen wrote:
For example, I am subscribed to the mailing list gimp-devel with klaus+gdev@ethgen.de. So I want to use: require ["fileinto", "imapflags", "subaddress", "envelope"]; ... if envelope :detail :is "To" "gdev"
Is there any way to use the Envelope-to: header for this?
I suppose you intermix an "Envelope-To:" header with the "envelope" feature of Sieve. Latter is to use information _not_ part of the mail, but available in the MTA only.
If you have an "Envelope-To" header, just use the plain header feature of Sieve.
Bye.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFHvT2AVJMDrex4hCIRAvTrAKDKJ39KVNz4QUvQbzGDP0zyd30+VACgnGVn ltzkIaIXG56EerwKuijLZMQ= =tIuc -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Steffen,
Am Do den 21. Feb 2008 um 9:59 schrieb Steffen Kaiser:
I suppose you intermix an "Envelope-To:" header with the "envelope" feature of Sieve. Latter is to use information _not_ part of the mail, but available in the MTA only.
Ok. But how can I pass such information from the Envelope-To-Header to the sieve?
If you have an "Envelope-To" header, just use the plain header feature of Sieve.
I want to use the subaddress on the envelope information. On normal headers it is not possible to use :detail or :user.
Regards Klaus Ethgen
Klaus Ethgen http://www.ethgen.de/ pub 2048R/D1A4EDE5 2000-02-26 Klaus Ethgen Klaus@Ethgen.de Fingerprint: D7 67 71 C4 99 A6 D4 FE EA 40 30 57 3C 88 26 2B -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBR71ZeZ+OKpjRpO3lAQIi6wf+Jdhw1BTyPhqASAv0OOyii3wzLSyqm3VW zyD3c4MnDvUi1sB9n7pGNhzt2qrBMHQaD0V/C9+d43DX+8qLrh/w0vuqGOGm2d6Z lYHrZap5WahTCffLIDyNhpNRL8LHxV3S7hKlW/cv3Owb/9B6pPrgmC22hbgjlktt r+VjWrKLneJsqaNzxNIeEcYIQF3cWfMN9uNlHAW1zzvHiBCtWTm+hWvuGUKPvKNZ WHB3fhRcIi753FLP1hAOWNsmiV3my1arf6bHVmtkbz/n4fKrw9OOV1E8gZNPyKqC c3qDyugvHMhHN2DvVGo833e1GH9sQNfhMdO0fp4ImhymG2WgAxFNNQ== =zDIo -----END PGP SIGNATURE-----
On Wed, 2008-02-20 at 20:03 +0100, Klaus Ethgen wrote:
My problem is that I have to use procmail (as it can call external programs) which finally calls deliver. My main rules are sieve and they work find except that I cannot use subaddress matching in envelope to (not envelope send which has been addressed earlier). But As I use the '+'-Feature the envelope to will be the one interesting for me.
For example, I am subscribed to the mailing list gimp-devel with klaus+gdev@ethgen.de. So I want to use: require ["fileinto", "imapflags", "subaddress", "envelope"]; ... if envelope :detail :is "To" "gdev"
With v1.1 you can pass -a parameter to specify the full user+ext@domain address to deliver and :detail works. I don't know how you can give that parameter from procmail though.
Is there any way to use the Envelope-to: header for this?
I don't think Envelope-To: is any kind of a standard for this, so no.
participants (5)
-
Klaus Ethgen
-
mouss
-
Remy Zandwijk
-
Steffen Kaiser
-
Timo Sirainen