procmail --> deliver question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

procmail --> deliver question

Ben Budts

Hi there,

I use dovecot-1.1-rc4, got imap, imaps, pop3 & pop3s working fine with the mbox format.

I use sendmail-8.14.2 as an MTA, sendmail uses procmail as an LDA.

I migrated to maildir format now, and pipe all my mail to deliver right now to be able to make use of the indexing etc...
Problem is I run into some errors :

#My .procmailrc
PATH=/usr/bin:/usr/local/bin:/usr/sbin
SHELL="/bin/bash"

SENDMAIL="sendmail -oi -t"
DELIVER="/opt/dovecot/libexec/dovecot/deliver"

LOGFILE="$HOME/procmail.log" #/dev/null
VERBOSE=on
LOGABSTRACT = "all"

#DEFAULT="$HOME/Maildir/"
#MAILDIR="$HOME/Maildir/"

:0 w
| $DELIVER
#####

My procmail.log :

procmail: [12743] Wed May 21 13:43:38 2008
procmail: Assigning "LOGABSTRACT=all"
procmail: Executing "/opt/dovecot/libexec/dovecot/deliver"
Fatal: destination user parameter (-d user) not given
procmail: Error while writing to "/opt/dovecot/libexec/dovecot/deliver"
procmail: Program failure (64) of "/opt/dovecot/libexec/dovecot/deliver"
procmail: Assigning "LASTFOLDER=/opt/dovecot/libexec/dovecot/deliver"
procmail: Locking "/var/spool/mail/kris.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/kris"
procmail: Opening "/var/spool/mail/kris"

####"
It's not working out and he falls back to delivering his mail to /var/spool/mail/%u

Could you guys point me out in the right direction please ?

Another question about the logging with deliver...
I've put the following in my deliver.conf :

deliver.conf in the lda section :
log_path = /var/log/dovecot/deliver.log
info_log_path = /var/log/dovecot-deliver.log
root@blaat:/home/kris# ls -la /var/log/dovecot/
total 232
drwxrwxrwx  2 root root   4096 2008-05-20 10:44 .
drwxr-xr-x 11 root root   4096 2008-05-19 10:08 ..
-rw-rw-rw-  1 root root      0 2008-05-20 10:44 deliver.log

But it's not logging at all... Also tried the syslog alternative, no logging either.

Also put set user or group ID on execution (s) on the deliver binary :
-rwsr-sr-x 1 root root 693300 2008-05-19 09:38 /opt/dovecot/libexec/dovecot/deliver

thx a lot
Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: procmail --> deliver question

Asheesh Laroia
On Thu, 22 May 2008, Ben Budts wrote:

>
> Hi there,
>
> I use dovecot-1.1-rc4, got imap, imaps, pop3 & pop3s working fine with the mbox format.
>
> I use sendmail-8.14.2 as an MTA, sendmail uses procmail as an LDA.

Does it run it as the user in question, or as root?

> I migrated to maildir format now, and pipe all my mail to deliver right now to be able to make use of the indexing etc...
> Problem is I run into some errors :
>
> #My .procmailrc
> PATH=/usr/bin:/usr/local/bin:/usr/sbin
> SHELL="/bin/bash"
>
> SENDMAIL="sendmail -oi -t"
> DELIVER="/opt/dovecot/libexec/dovecot/deliver"
>
> LOGFILE="$HOME/procmail.log" #/dev/null
> VERBOSE=on
> LOGABSTRACT = "all"
>
> #DEFAULT="$HOME/Maildir/"
> #MAILDIR="$HOME/Maildir/"
>
> :0 w
> | $DELIVER
> #####

Is that /etc/procmailrc or .procmailrc?  If it's /etc/procmailrc, add this
to the start:

DROPPRIVS=YES

And remove that setuid stuff from deliver, I'd say.  (These are local UNIX
users, right?)

-- Asheesh.

--
QOTD:
  "What I like most about myself is that I'm so understanding
  when I mess things up."