5 messages in net.sourceforge.lists.courier-maildrop[maildropl] Autoreply recepy conversi...
FromSent OnAttachments
Dmitri OrleanskiDec 28, 2004 10:30 pm 
Tony EarnshawDec 29, 2004 6:16 am 
Rolan YangJan 9, 2005 8:25 am 
Stefan HornburgJan 9, 2005 11:50 am 
Dmitri OrleanskiJan 9, 2005 12:27 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Autoreply recepy conversion from procmail to maildropActions...
From:Dmitri Orleanski (do@gentoo-wiki.com)
Date:Dec 28, 2004 10:30:39 pm
List:net.sourceforge.lists.courier-maildrop

Hi,

Can somebody help me to convert autoreply from the procmail to the mailfilter?

---------------------------- ## auto-vacation recipe by Louis-David Mitterrand <ldm at apartia dot org> ## BEGIN constants, do not touch XLOOP=$LOGNAME@$HOST VAC_MESSAGE=$HOME/.vacation.msg VAC_CACHE=$HOME/.vacation.cache VAC_LOCK=$HOME/.vacation.lock FWD_ADDRESS=$HOME/.fwd.email NL=" " ## END constants

# test if message is to and from the same address and if suject is # "vacation on" :0 * ^TO_\/[-\.a-z_]+@ *$ ^From:.*$\MATCH * ^Subject: *vacation *\/o(ff|n) *$ ## make $MATCH lowercase * MATCH ?? ()\/o(ff|n) { ACTION=$MATCH LOG="ACTION: vacation $ACTION, USER: $LOGNAME, HOME: $HOME $NL"

# whatever the action clear the cache and remove old message :0c | rm -f $VAC_MESSAGE $VAC_CACHE :0 * ACTION ?? on # deliver { :0 bc | cat > $VAC_MESSAGE

:0 fhw * Subject:\/.* | formail -i "Subject: [VACATION ON]$MATCH" }

:0 fhw * ACTION ?? off * Subject:\/.* | formail -i "Subject: [VACATION OFF]$MATCH" }

:0 *$? "test -e $VAC_MESSAGE" { :0 Whc: $VAC_LOCK # Perform a quick check to see if the mail was addressed to us # *$ ^To:.*\<$\LOGNAME\> # *$ ^TO_$\LOGNAME@ # Don't reply to daemons and mailinglists * !^FROM_DAEMON * !^From: savemail@diotec\.com # Mail loops are evil *$ !^X-Loop: $XLOOP | formail -rD 8192 $VAC_CACHE

:0 e # if the name was not in the cache { :0 hc | (formail -rI"Precedence: junk" -A"X-Loop: $XLOOP" ; \ cat $VAC_MESSAGE ) | $SENDMAIL -oi -t

:0 fhw * Subject:\/.* | formail -i "Subject: [AUTOREP]$MATCH" } }

thanks a lot