At 18:31 2010-10-02, Matee Moshkovits wrote:
Thank You for your email. Currently the AffordHost office is closed
for holidays . The Office will re-open Monday October 1, 2010.
Ordinarily, if there were an autoreply to a _digest_, and the
implication is that they'd be back the following day, I might not
remove the subscriber, but here, the return date isn't even valid.
As a general rule, if you've got to send vacation messages,
pre-filter list messages (I'd use my list-id.rc include to identify
lists, but it'd suffice to look for any of the RFC-2369 or RFC-2919
specified list headers). This is on top of not sending autoreplies
to looped or daemon (non-human) messages, and of course, cacheing the
addresses to which replies have been sent.
I don't use vacation autoreplies myself, but I took the code from
'man procmailex' and revised it (heavily), in the hopes that someone
might consider their vacation recipe implementation before inflicting
it upon the masses:
# set this to your email address, or some identifier at your domain which
# associates to your email account (i.e. if you have multiple aliases
# processed by one account, this needn't be the specific alias)
LOOPADDR="your(_at_)own(_dot_)mail(_dot_)address"
# specify the name of the vacation message
VACATIONMSG=$HOME/vacation_msg
# specify cache
ALREADYSENT=$HOME/vacation.cache
:0
# check to see if the vacation message is present - if not, assume
# we're not on vacation (what would the purpose be if we don't have
# a message to reply with?)
* ? test -e $VACATIONMSG
# Perform a quick check to see if the mail was addressed to us
# (may need to exclude this if you have a lot of aliases, but if you don't,
# it is best to keep this)
* $ ^To:.*\<$\LOGNAME\>
# Don't reply to daemons and mailinglists - among other things, this
# incorporates Precedence: (junk|bulk|list)
* ! ^FROM_DAEMON
# Mail loops are evil
* !$ ^X-Loop: $LOOPADDR
# RFC-2369 or RFC-2919 list headers (this regexp is broad)
* ! ^List-
{
# update cache. Use larger size if needed
# the result of this action is used to determine whether a notice
# should actually be sent or not
:0 Whc: vacation.lock
| formail -rD 8192 $ALREADYSENT
# if the name was not in the cache, reply with your
# vacation message
:0 ehc
| (formail -rI"Precedence: junk" \
-A"X-Loop: $LOOPADDR" ; \
cat $VACATIONMSG $HOME/.signature \
) | $SENDMAIL -oi -t
}
I'm open to suggestions for improvements - again, I don't use
vacation recipes, but perhaps we should try to make a fairly all
inclusive one? I have a few other variations on vacation in my
procmail archives, but as I've not been following the vacation
"scene", I haven't been making sure they've kept up with the times.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail