Discussion:
postfix+procmail (+ courier-imap) -> master.cf --> owner
m***@e-schuett.de
2006-11-02 19:49:54 UTC
Permalink
Hello,

IŽam new to this mailing-list and to use procmail. So sorry for my unqualified questions.

I installed a complete mailserver (postfix+courier-imap) month ago and together with fetchmail itŽs running perfect.

Now I wanted to deliver the incoming external & internal messages per user in their inbox and their subfolders.
So procmail seemed to be the right software for me and I installed it on my system (SuSE 10.0) - version 3.22

First I changed the main.cf from postfix :
mailbox_command =
mailbox_transport = procmail

Then the master.cf :
procmail unix - n n - - pipe
flags=R user=mail argv=/usr/bin/procmail -t -m USER=${user} EXT=${extension} /etc/procmailrc

Then the /etc/procmailrc and a the $HOME/.procmailrc.


a) So the mails queued by postfix and piped to procmail,
b) procmail called both procmailrcŽs (INCLUDERC=...) and showed the results correctly in a log-file,
c) at the end procmail delivered (saved) the mails in the correct maildirs (from courier-imap).

BUT : all mails are owned by the "user=..." i.e. "mail" from the entry of the master.cf (postfix).

I didnŽt find any solution to correct this (so all imap-clients produce errors and/or never show any mail in any folder).

Is there any possibility to changed this problem ?
(during the time to fix this, I change my main.cf temporarily to "mailbox_command = /usr/bin/procmail -d ${USER}" - and this is working
with the correct owner).


Why I would like to use "mailbox_transport" ?
Here is the answer in the postfix doc :
# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.

"..after processing aliases and .forward files" are the keywords !

Thx for your help in advance ...
Bart Schaefer
2006-11-03 15:52:02 UTC
Permalink
Post by m***@e-schuett.de
procmail unix - n n - - pipe
flags=R user=mail argv=/usr/bin/procmail -t -m USER=${user}
EXT=${extension} /etc/procmailrc
This is most likely wrong. You generally do not want the -m option
when procmail is invoked as the local delivery agent, and you almost
certainly do not want to specify /etc/procmailrc as an rcfile argument
on the command line. However, you'll have to ask a postfix expert to
be sure.
Post by m***@e-schuett.de
b) procmail called both procmailrc´s (INCLUDERC=...) and showed the results
correctly in a log-file,
This is not normal procmail operation. /etc/procmailrc should be read
automatically as the default, and when it is finished (unless it
finished by making a delivery) procmail should fall through to
$HOME/.procmailrc. Neither of these happens in the default way when
you use the -m option.
Post by m***@e-schuett.de
BUT : all mails are owned by the "user=..." i.e. "mail" from the entry of
the master.cf (postfix).
In order for procmail to deliver as the addressed user, it needs to be
started either as that user or as a super-user with privileges to
setuid() to the addressed user. How to accomplish this from postfix
is a question for postfix experts, not procmail experts.

Loading...