Jordi Garcia Busquets <jordi(_at_)hades(_dot_)udg(_dot_)es> writes:
In a chapter I would like to include some examples of uses of
procmail as a System Administrator. I mean, every user can use procmail to
filter his/her mails, but I would like to include examples of uses of
procmail especially designed to acomplish System Administrator tasks.
Using "FEATURE(local_procmail)" with sendmail, allows to have access to the
envelope destination address of a mail for filtering purposes, so that the
sysadm (let's call him "monnier") can have several "virtual mailboxes"
known as "monnier+root", "monnier+news", "monnier+cron", which helps enormously
for filtering big quantities of mail without creating a huge .procmailrc
that tries to recognize the different kinds of mails and to put them at the
right place. Also it helps deal with high mail-activity coming from daemons or
cron jobs.
In any case, having procmail as the local delivery agent allows to sysadm to
provide "standard filtering operations" to all its users. For instance my
/etc/procmailrc gets rid of duplicates so that my users "never" get duplicate
mail, also you can do all kinds of processing like SPAM-blocking and such.
It's a little unrewarding because users never come to thank you for those
improvements (they usually just stop bitching about it, without even being
aware of the reason why it stopped), but being of the opinion that a sysadm
doesn't merely have to make the system work, but also make it work right,
I think it's not just nice, but necessary.
Also procmail's careful locking reduces the probability of lost or garbled mail
especially with NFS-mounted /var/mail partitions.
I'd say that a procmail that's not used as the local delivery agent but merely
as a mail-filter called from .forward is only a poor-man's procmail.
Stefan