[Dovecot] Wish-list: X-Delivered-To headers generated by dovecot-deliver
Would it be sensible/"cost effective" to make dovecot-deliver generated X-Delivered-To header(s) based on command line parameter(s)? [after striping such existing headers, before consulting sieve]
I need it to: a) *clearly* mark POP/IMAP account fetched by fetchmail [with fetchmail using directly dovecot-deliver in --mda option] b) cleanly implement "shared mailboxes" with MTA such as sendmail that can be easily forced to generate "one header per one recipient" [AFAIK]
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu Order and simplification are the first steps toward mastery of a subject -- the actual enemy is the unknown. -- Thomas Mann
On Sat, 2009-10-17 at 22:41 +0200, Andrzej Adam Filip wrote:
a) *clearly* mark POP/IMAP account fetched by fetchmail [with fetchmail using directly dovecot-deliver in --mda option]
Would the fetchmail tracepolls option not do? It generates a header like this, including local and remote account info.
Received: from mail.example.net [192.0.0.1] by local-server with POP3 (fetchmail-6.3.4 polling mail.example.net account user) for <local-user@localhost> (single-drop); Sat, 17 Oct 2009 22:42:27 +0200 (CEST)
-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Karsten Bräckelmann <guenther@rudersport.de> wrote:
On Sat, 2009-10-17 at 22:41 +0200, Andrzej Adam Filip wrote:
a) *clearly* mark POP/IMAP account fetched by fetchmail [with fetchmail using directly dovecot-deliver in --mda option]
Would the fetchmail tracepolls option not do? It generates a header like this, including local and remote account info.
Received: from mail.example.net [192.0.0.1] by local-server with POP3 (fetchmail-6.3.4 polling mail.example.net account user) for <local-user@localhost> (single-drop); Sat, 17 Oct 2009 22:42:27 +0200 (CEST)
Is there an easy way to use such "tracepoll Received:" in
- sieve scripts?
- procmail scripts?
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu "I suppose you expect me to talk." "No, Mr. Bond. I expect you to die." -- Goldfinger
On Sat, 2009-10-17 at 23:57 +0200, Andrzej Adam Filip wrote:
Karsten Bräckelmann <guenther@rudersport.de> wrote:
On Sat, 2009-10-17 at 22:41 +0200, Andrzej Adam Filip wrote:
a) *clearly* mark POP/IMAP account fetched by fetchmail [with fetchmail using directly dovecot-deliver in --mda option]
Would the fetchmail tracepolls option not do? It generates a header like this, including local and remote account info.
Received: from mail.example.net [192.0.0.1] by local-server with POP3 (fetchmail-6.3.4 polling mail.example.net account user) for <local-user@localhost> (single-drop); Sat, 17 Oct 2009 22:42:27 +0200 (CEST)
Is there an easy way to use such "tracepoll Received:" in
- sieve scripts?
Dunno.
- procmail scripts?
That's exactly why I originally tracked down the fetchmail tracepolls option. :)
Easy? Sure, multi-line headers are re-flowed with procmail, so it's a "single-line" RE for matching. But since we're talking about procmail, any answer regarding "easy" depends on whom you ask... ;)
-- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
On Sat, 2009-10-17 at 22:41 +0200, Andrzej Adam Filip wrote:
Would it be sensible/"cost effective" to make dovecot-deliver generated X-Delivered-To header(s) based on command line parameter(s)? [after striping such existing headers, before consulting sieve]
How exactly would that work? How is X-Delivered-To different from Delivered-To header? Do you mean there would be another parameter specifying what its content is?
Somehow this sounds more like MTA's job (and perhaps LMTP server's job, so I might need to do that anyway there).
Timo Sirainen wrote:
On Sat, 2009-10-17 at 22:41 +0200, Andrzej Adam Filip wrote:
Would it be sensible/"cost effective" to make dovecot-deliver generated X-Delivered-To header(s) based on command line parameter(s)? [after striping such existing headers, before consulting sieve]
How exactly would that work?
By specifying content of the header(s) via command line parameter(s)
e.g. deliver -d userx -x userx@gmail.com X-Delivered-To: userx@gmail.com deliver -d userx -x userx@yahoo.com X-Delivered-To: userx@yahoo.com.com deliver -d userx -x user1@example.net -x user2@example.net X-Delivered-To: user1@example.net X-Delivered-To: user2@example.net
How is X-Delivered-To different from Delivered-To header?
As I understand Delivered-to header is generated by some MTA (postfix). I would like to make it a) available (via dovecot's command line) to other MTAs (e.g. sendmail) especially when message delivery to specific mailbox is generated by multiple "RCPT TO:" b) available to "MTA-less" configuration e.g. fetchmail calling directly dovecot's deliver (via --mda option)
Do you mean there would be another parameter specifying what its content is?
It would be the best solution from my perspective.
Somehow this sounds more like MTA's job (and perhaps LMTP server's job, so I might need to do that anyway there).
As I wrote I would like to get the functionality even in "MTA-less" configurations.
On Wed, 2009-10-28 at 09:08 +0100, Andrzej Adam Filip wrote:
By specifying content of the header(s) via command line parameter(s)
e.g. deliver -d userx -x userx@gmail.com X-Delivered-To: userx@gmail.com
I guess there could be a new command line parameter that allows you to specify any header you want. Something like:
deliver -h 'X-Delivered-To: foo@bar.org' -h 'X-Hello: world'
But.. It's a bit more work than I want to spend on it right now. I'll add to todo at least, or maybe someone else can implement it..
On Thu, 2009-10-29 at 13:03 -0400, Timo Sirainen wrote:
On Wed, 2009-10-28 at 09:08 +0100, Andrzej Adam Filip wrote:
By specifying content of the header(s) via command line parameter(s)
e.g. deliver -d userx -x userx@gmail.com X-Delivered-To: userx@gmail.com
I guess there could be a new command line parameter that allows you to specify any header you want. Something like:
deliver -h 'X-Delivered-To: foo@bar.org' -h 'X-Hello: world'
Oh, and you could of course already do this with an ugly shell script:
(echo "X-Delivered-To: user@domain"; grep -v "^X-Delivered-To:") | deliver
Timo Sirainen <tss@iki.fi> wrote:
On Thu, 2009-10-29 at 13:03 -0400, Timo Sirainen wrote:
On Wed, 2009-10-28 at 09:08 +0100, Andrzej Adam Filip wrote:
By specifying content of the header(s) via command line parameter(s)
e.g. deliver -d userx -x userx@gmail.com X-Delivered-To: userx@gmail.com
I guess there could be a new command line parameter that allows you to specify any header you want. Something like:
deliver -h 'X-Delivered-To: foo@bar.org' -h 'X-Hello: world'
Oh, and you could of course already do this with an ugly shell script:
(echo "X-Delivered-To: user@domain"; grep -v "^X-Delivered-To:") | deliver
I have done it via perl script executed from procmail script [@2002 ;-)] http://anfi.homeunix.org/sendmail/sharedmailbox.html Does such "vote of no confidence" in dovecot's deliver and sieve make you happy? ;-)
BTW could you add to your "todo list" an option for making deliver use sieve script specified via command line including turning off sieve scripts via command line?
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu The Shuttle is now going five times the sound of speed. -- Dan Rather, first landing of Columbia
On Thu, 2009-10-29 at 18:38 +0100, Andrzej Adam Filip wrote:
BTW could you add to your "todo list" an option for making deliver use sieve script specified via command line including turning off sieve scripts via command line?
In v2.0 you can override settings. For example:
dovecot-lda -o plugin/sieve=/foo/bar.sieve
dovecot-lda -o mail_plugins=""
Timo Sirainen <tss@iki.fi> wrote:
On Thu, 2009-10-29 at 18:38 +0100, Andrzej Adam Filip wrote:
BTW could you add to your "todo list" an option for making deliver use sieve script specified via command line including turning off sieve scripts via command line?
In v2.0 you can override settings. For example:
dovecot-lda -o plugin/sieve=/foo/bar.sieve
dovecot-lda -o mail_plugins=""
OK - so I merely need to wait patiently :-)
-- [pl>en: Andrew] Andrzej Adam Filip : anfi@onet.eu Humanity has the stars in its future, and that future is too important to be lost under the burden of juvenile folly and ignorant superstition. -- Isaac Asimov
participants (4)
-
Andrzej Adam Filip
-
Andrzej Adam Filip
-
Karsten Bräckelmann
-
Timo Sirainen