condredirect examples



1) redirect only emails from .cz
./Maildir/
|condredirect mail@example.com sh -c '822field from | grep -iq @*.cz'

2) redirect all to redirected@example.com
except: to =~ drop@example.com, or from =~ info@example.com

maybe not best solution?, but working - if you know better way, please post your solution

notice: you have to configure email address devnull@example.com
(in /var/qmail/aliases create file .qmail-devnull whitch contents only comment sign: #)
./Maildir/
|condredirect devnull@example.com /bin/sh -c 'if 822field to | egrep -iqv "drop@example.com"; then exit 1; fi'
|condredirect devnull@example.com /bin/sh -c 'if 822field from | egrep -iqv "info@example.com"; then exit 1; fi'
&redirected@example.com

Last update:
2009-04-10 14:02
Author:
Daniel
Revision:
1.8
Average rating:0 (0 Votes)

You can comment this FAQ

Chuck Norris has counted to infinity. Twice.