Hello Gerhard,
thanks for the fast reply.
I've patched procmail (it's working great) and for now, I'm using this configuration:
/etc/procmailrc
DELIVER_INBOX=yes DELIVER_REPLACE_INBOX_NAME=yes DELIVER_NEW_INBOX_NAME=INBOX DELIVER_ABSOLUTE_PATH=yes DELIVER_PIPE_NO_LOCK=yes DELIVER_RAW_MODE=yes DELIVER_REMOVE_FROM=yes DELIVER_PROGRAM="/usr/bin/deliver -m \$BOXNAME -f \$ENVELOP_SENDER -d \$RECIPIENT"
:0
- ^From \/[^ ]* { ENVELOP_SENDER=$MATCH } ENVELOP_SENDER=${ENVELOP_SENDER:-MAILER-DAEMON@fh-trier.de}
.procmailrc
:0
- ^X\-RFT\-FORWARD: beckerr@fh\-trier\.de -> XXXX@YYY\.de { DELIVER_PROGRAM :0 /dev/null } :0 Ec | formail -I 'X-RFT-FORWARD: beckerr@fh-trier.de -> XXXX@YYY.de' -s /usr/lib/sendmail -i XXXX@YYY.de
As you see I have to unset DELIVER_PROGRAM to discard looping messages by sending them to /dev/null. This is a little bit unhandy, because other users have to alter their .procmailrc too.
What do you think about defining an environment variable like DELIVER_SKIP_PATH=/dev:/tmp to set a number of paths for which (dovecot-)deliver is skipped and instead procmail is used to save the mail.
Regards, Ralf
PS: Gruß aus Trier, der ältesten Stadt Deutschlands :-)
Gerhard Wiesinger schrieb am 07.01.2007 21:07:
Hello!
I'm the author of the procmail patch for dovecot's deliver program.
You can specify -f <envelope sender> with dovecot deliver when I remember correctly.
DELIVER_PROGRAM="/usr/libexec/dovecot/deliver -m \$BOXNAME -d \$RECIPIENT -f SOMETHING_ELSE -c /etc/dovecot.conf" (Can't remember whether there was a variable for the from user or not, when yes you can specify the from user, too. ) When you need any help feel free to contact me.
BTW: The First from line is only the mbox delimiter and really has no effect on the Mail headers. I also have MAILER-DAEMON in the From line without any problems at all. So this is IHMO only cosmetic.
@Timo: Running /usr/libexec/dovecot/deliver (without any parameters waiting for stdin) and pressing Ctrl-C => Core dump with dovecot 1.0rc17.
Grüße aus Wien :-)
Ciao, Gerhard
--
Dipl.-Inform. (FH) Ralf Becker Rechenzentrum (r/ft) der FH Trier (Network|Mail|Web|Firewall) University of applied sciences Administrator Schneidershof, D-54293 Trier
Mail: beckerr@fh-trier.de Fon: +49 651 8103 499 WWW: http://www.fh-trier.de/~beckerr Fax: +49 651 8103 214 PGP: http://www.fh-trier.de/~beckerr/pgp ICQ: <available>
Wenn Gott gewollt haette, dass E-Mail in HTML geschrieben wuerden, endeten Gebete traditionell mit </amen>. (Tom Listen)