Procmail: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(typo) |
(typo for maildir) |
||
Zeile 13: | Zeile 13: | ||
SENDMAIL="/usr/sbin/sendmail -f $USERNAME@$DOM" | SENDMAIL="/usr/sbin/sendmail -f $USERNAME@$DOM" | ||
# for maildir use of '/' in the end is important!! | |||
DEFAULT="$USERHOME/Maildir" | DEFAULT="$USERHOME/Maildir/" | ||
HOME="$USERHOME" | HOME="$USERHOME" | ||
INCLUDERC="$USERHOME/.procmailrc" | INCLUDERC="$USERHOME/.procmailrc" |
Version vom 10. Dezember 2006, 21:05 Uhr
Procmail ist ein Mailfilter mit dem man z.b. Spam- oder Maillinglistenmails automatisch in ein Unterordner verschieben kann. Filterregeln können mit Horde(Ingo) erstellt werden.
von http://www.qmailinfo.org/index.php/Horde-Procmail-Filters
/etc/procmailrc:
SHELL="/bin/sh" #LOGFILE="/tmp/procmail.log" #VERBOSE=on VPOPHOME="/var/vpopmail" DOMHOME="$VPOPHOME/domains/$DOM" USERHOME="$DOMHOME/$USERNAME" SENDMAIL="/usr/sbin/sendmail -f $USERNAME@$DOM" # for maildir use of '/' in the end is important!! DEFAULT="$USERHOME/Maildir/" HOME="$USERHOME" INCLUDERC="$USERHOME/.procmailrc" :0 w | /usr/bin/safecat "${HOME}/Maildir/tmp" "${HOME}/Maildir/new"
/usr/sbin/preprocmail:
#!/bin/sh VPOPMAIL=`echo ~vpopmail` DOMDIR=`$VPOPMAIL/bin/vdominfo -d $HOST` if [ -r $DOMDIR/$EXT/.procmailrc ]; then env -i DOM=$HOST USERNAME=$EXT /usr/bin/procmail -p -m /etc/procmailrc cat > /dev/null exit 99 fi cat > /dev/null exit 0
This script will be called from a .qmail file. For example,
/var/vpopmail/domains/somedomain.com/.qmail-default:
| /var/qmail/bin/preline /usr/sbin/preprocmail | /var/vpopmail/bin/vdelivermail '' bounce-no-mailbox