Sandra schrieb am Thu, Feb 21, 2002 at 04:00:57PM -0400:
> 
> Please help me to understand one thing :
> 
>    Configuring procmail+cyrus+mysql(users without prompt and
> $HOME directory), could
> I configure /etc/procmailrc for each user, or this file is for the
> entire operating system? Could I create a procmailrc in an independent
> directory for each user,  different from $HOME?
>    Or I have to have sieve for this kind of thing?

I have a setup running where the MTA hands all mails over to procmail
which itself gives them to cyrus' deliver after filtering them.

In most MTAs you can specify which file it parses first for recipes
(if you don't, it'll expect /etc/procmailrc).

I chose /etc/procmail.d/globalrc.  There, with

  ## Where to place our logfiles
  LOGFILE=/var/log/procmail/$LOGNAME.log

I gave every user his own log.  Then, for each user a recipe file
within /etc/procmail.d/ will be parsed via

  ## Include central sited user-specific recipes
  :0
  {
    INCLUDERC=/etc/procmail.d/rc.$LOGNAME
  }

After that, (still in globalrc) a "fallthrough" will be met that 
hands the mail over to cyrus with 

  ## Gone through it up to here? Then deliver It!
  :0 w :$LOGNAME.deliverlock 
  | /usr/cyrus/bin/deliver -e -a $LOGNAME $LOGNAME


Note that you have to preauth with -a as procmail won't run as the
respective user.  See procmailrc(5), procmailex(5) and deliver(8).


- Birger

Reply via email to