[Dovecot] Getting started with sieve and conversion from procmail

Alex mysqlstudent at gmail.com
Wed Nov 16 02:00:13 EET 2011


Hi,

>>>> I just don't understand how to invoke procmail from deliver.
>>>
>>> The idea was to invoke deliver from procmail. I still do this myself
>>> since I haven't bothered changing my procmail scripts to Sieve:
>>>
>>> DELIVER=/usr/local/libexec/dovecot/deliver
>>>
>>> :0
>>> * ^List-Id.*dovecot.dovecot.org
>>> | $DELIVER -m dovecot
>>>
>>> :0
>>> | $DELIVER
>>
>> How do I tell dovecot to use procmail so that it may invoke deliver?
>
> You don't. You tell your MTA to invoke procmail, which is what I think you're already doing? So the only change would be to modify your ~/.procmailrc.

Okay, I'm making progress. I disabled the virtual_domain stuff in
main.cf for postfix and just enabled mail_command=procmail. I think
there's something wrong with the deliver command.

It's now delivering, but my deliver command must be wrong. This is my
~/.procmailrc:

# Log an abstract of all messages
LOGABSTRACT=all

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/lib:/usr/local/bin
LOGFILE=$HOME/.maillog
MAILDIR=$HOME/mail
PROCHOME=$HOME/.procmail
SENDMAIL=/usr/sbin/sendmail
VERBOSE=yes

DELIVER=/usr/libexec/dovecot/deliver

:0 fhW
| $DELIVER -m xspamtest

:0 fhw
| $DELIVER

When a mail is received, it prints this to .maillog:

procmail: [23382] Tue Nov 15 18:56:04 2011
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"
procmail: Assigning "DELIVER=/usr/libexec/dovecot/deliver"
procmail: Executing "/usr/libexec/dovecot/deliver,-m,xspamtest"
procmail: [23383] Tue Nov 15 18:56:04 2011
procmail: Assigning "COMSAT=no"
procmail: Assigning "COMSAT=no"
procmail: Assigning "DELIVER=/usr/libexec/dovecot/deliver"
procmail: Executing "/usr/libexec/dovecot/deliver,-m,xspamtest"
procmail: Non-zero exitcode (75) from "/usr/libexec/dovecot/deliver"
procmail: Rescue of unfiltered data succeeded
procmail: Executing "/usr/libexec/dovecot/deliver"
procmail: Non-zero exitcode (75) from "/usr/libexec/dovecot/deliver"
procmail: Rescue of unfiltered data succeeded
procmail: Program failure (75) of "/usr/libexec/dovecot/deliver"
procmail: Rescue of unfiltered data succeeded
procmail: Locking "/var/spool/mail/alexuser.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/alexuser"
procmail: Opening "/var/spool/mail/alexuser"
procmail: Acquiring kernel-lock
procmail: Executing "/usr/libexec/dovecot/deliver"
procmail: Program failure (75) of "/usr/libexec/dovecot/deliver"
procmail: Rescue of unfiltered data succeeded
procmail: Locking "/var/spool/mail/alexuser.lock"
procmail: Unlocking "/var/spool/mail/alexuser.lock"
>From prvs=293a46ea3=mm at mydomain.com  Tue Nov 15 18:56:04 2011
 Subject: Grand Manor, Corvallis, OR, USA, AUTOMATED Extrane
  Folder: /var/spool/mail/bcc-user                                        17025

It delivers to the mail spool, but executing deliver as its printed in
the procmailrc:

# # /usr/libexec/dovecot/deliver -m spamtest
lda(root): Fatal: destination user parameter (-d user) not given

Am I doing something wrong?

Thanks,
Alex


More information about the dovecot mailing list