[Esd-l] running procmail through qmail system wide

Chris csmith at squiz.net
Tue Sep 4 18:42:01 PDT 2001


Hey,

> > Hey all,
> >
> > I'm trying to work out how to run procmail with qmail system wide rather
> > than on a per-user basis. I know I can do it by adding a couple of 
> lines to
> > each .qmail file but that seems really messy (plus would be very slow 
> to do).
> >
> > Anyone have any suggestions on how to do it?
>
>You can make procmail the default delivery. See qmail-start(8).
>
>Here's my /var/qmail/rc
>
>     #!/bin/sh
>
>     # Using splogger to send the log through syslog.
>     # Using dot-forward to support sendmail-style ~/.forward files.
>     # Using procmail to deliver messages to /var/spool/mail/$USER by default.
>
>     exec env - PATH="/var/qmail/bin:$PATH" \
>     qmail-start '|dot-forward .forward
>     |preline procmail' splogger qmail

Thanks for the tip :) I had to change my rc file to :

exec env - PATH="/var/qmail/bin:$PATH" \
qmail-start '|preline /usr/bin/procmail' ./Maildir/ splogger qmail

I also had to add these lines to my procmailrc file:

ORGMAIL=
MAILDIR=$HOME/Maildir
DEFAULT=$MAILDIR/

It's still doing something weird which is, touching a file in the 
/var/spool/mail directory
Not sure how to stop that, but nothing's getting delivered there so that's 
good enough.

>Note: I'm also dealing with .forward files which is optional.
>Actually, I'm moving away from allowing .forward files because they
>take effect before procmail.  This isn't an issue for messages addressed
>locally because they will be processed by procmail during delivery, but
>mail forwarded offsite will be unfiltered and potentially infected.
>
>Note: you'll also need to make some simple edits to html-trap.procmail
>to get things working with qmail because the sendmail wrapper that it
>comes with doesn't handle the -U option. I just edit those lines,
>dropping the -U option which seems to work for me.

OK, thanks.

>Anyone care to explain what the sendmail -U option is for?

(from the man page):

        -U     Initial (user) submission.  This should  always  be
               set  when  called from a user agent such as Mail or
               exmh and never be set  when  called  by  a  network
               delivery agent such as rmail.

Not sure exactly what that means but hey :)


-----------------
      Chris Smith
http://www.squiz.net/



More information about the esd-l mailing list