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