procmail autoreply problem

Mike Gorse mgorse at mgorse.dhs.org
Thu Aug 25 16:33:20 EDT 2005


Hi Paul,

You should just be able to have procmail look for To: or CC: lines with 
the user's email address.

I usually use vacation in conjunction with procmail for that sort of thing 
because vacation will keep track of to whom it has send email and only 
email the person once.  Something like this should work, substituting the 
person's email address and user id:

:0 c
* ^To:.*user at company.com
|vacation user
:0 c
* ^CC:.*user at company.com
|vacation user

-- Michael Gorse / AIM:linvortex / http://mgorse.home.dhs.org --

On Thu, 25 Aug 2005, Paul Norton wrote:

> A user is on vacation this week, so I have set up an autoreply for him
> with procmail.
>
> I have set up a .procmailrc file in a user's home directory.
>
> The problem is, the autoreply's are sent to email lists he is on too.
>
> How do I have auto reply's sent to only emails that are sent directly
> to or cc'ed to him?
>
> Here is the .procmailrc :
>
> SHELL=/bin/sh
> PATH=/usr/bin
> :0 c
> * !^X-Loop: person at company.com
>  | (formail -r -i "Subject: Out of office until Friday, July 29, 2005" \
>         -A"X-Loop: person at company.com" ; \
>         echo "Thank you for your message." ; \
>         echo " " ; \
>         echo "I am currently out of the office until July 29'th. If
> you need immediate assistance, please contact name , or call us at
> 000-000-0000" ; \
>         echo " " ; \
>         echo "Best Regards, " ; \
>         echo "Name" ; \
>         echo "Position" ; \
>         echo "Company." ) | /usr/sbin/sendmail -oi -t -f person at company.com
>
>
> Thanks!
> - Paul
> _______________________________________________
> Discuss mailing list
> Discuss at blu.org
> http://olduvai.blu.org/mailman/listinfo/discuss
>



More information about the Discuss mailing list