4 messages in net.sourceforge.lists.courier-users[courier-users] mailfilter forwarding...
FromSent OnAttachments
Bryan IrvineOct 31, 2005 10:08 am 
Sam VarshavchikOct 31, 2005 3:25 pm 
Bryan IrvineNov 1, 2005 12:48 am 
Sam VarshavchikNov 1, 2005 3:50 am 
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:[courier-users] mailfilter forwarding + vacationActions...
From:Bryan Irvine (spar@gmail.com)
Date:Oct 31, 2005 10:08:11 am
List:net.sourceforge.lists.courier-users

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"