I'm trying to experiement around with the .mailfilter to figure out
how I'd construct one for the follosing scenarios.
1> vacation messages
2> forwarding
3> forwarding + local delivery
4> vacation + forwarding
I can get 1 -3 working by themselves but the rule doesn't seem to work
properly when I try #4. I'm trying to get it so that somebody can go
on vacation and have a vacation message that says "I'm on vacation
so-and-so will be handling my email" and have a copy of the original
message also forwarded to so-and-so.
Here's the mailfilter I have now. It sends the vacation message and
delivers locally but does not forward.
cc $DEFAULT
xfilter "reformail -r -t -I 'From: webm...@mailtest.domain.tld"
/^To:.*/
getaddr($MATCH) =~ /^.*/;
MATCH=tolower($MATCH)
flock "vacation.lock" {
`fgrep -iqx "$MATCH" vacation.txt 2>/dev/null || { \
echo "$MATCH" >> vacation.txt ; \
exit 1 ; \
} `
}
if ( $RETURNCODE == 0 )
exit
to "| ( cat - ; echo ''; cat vacation.msg) | /usr/sbin/sendmail -F webmaster@mai
ltest.domain.tld -r webm...@mailtest.domain.tld -f webma
st...@mailtest.domain.tld $MATCH"
cc "!soan...@someotherdomain.tld"