This works for me for our site in procmailrc, had a difficult time with the Domain name with all the different versions of Outlook on the network. Put domain name in testdomain file , vac users in vac file when they go on vacation an dvacation message in .msg for each user. Norm
# Vacation recipe - enter names in /etc/mail/spamassassin/vac
TO=`formail -x To:`
FIRST=`echo "$TO" |sed -n '1p'| awk -F"<" '{print $2}'`
FIRSTX=`echo "$FIRST" | awk -F"@" '{print $1}'`
DOMAIN1=`echo "$FIRST" | awk -F">" '{print $1}'`
DOMAINX=`echo "$DOMAIN1" |awk -F"@" '{print $2}'`
:0 whc: /tmp/vacation.lock
* ? (echo "$DOMAINX" | $FGREP -i -x -f /etc/testdomain)
* ? (echo "$FIRSTX" | $FGREP -i -x -f /etc/mail/spamassassin/vac)
* !^FROM_DAEMON
* !^X Loop: $TO
| formail -rD 8192 /etc/mail/spamassassin/vac_cache/$FIRSTX.cache
:0 ehc
| (formail -rA"Precedence: junk" \
-A"X-Loop: $TO" ; \
cat "/etc/mail/spamassassin/vacmessages/$FIRSTX.msg" \
) | $SENDMAIL -oi -t