Procmail cheat sheet

From test.coolscript.org
Jump to navigation Jump to search

Procmail samples:

  • Head
PATH=/opt/bin:/usr/bin
VERBOSE=off
LOGFILE=$HOME/mail.log
MAILDIR=/var/spool/mail
  • Simple copy/pipe to application
:0 c
* ^To.*@mailtower.de
| /usr/local/dev/mail/autoresponse/autoresponse-mail.pl matthias
  • Mark Mail by subject
:0
* ^Subject.*****SPAM*****
$HOME/mail/Spams
  • Mark Mail by from
:0
* ^From:.*somebody*
$HOME/mail/Someweher

Double copy

:0
* !^FROM_DAEMON
{
:0c
! somebody1@mail.de
:0
! somebody2@mail.de
}