[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vacation



On Fri, 2 Aug 2002, Sewa AGBODJAN wrote:

> I guess several persons have already use VACATION on the mailing list.
> Trying to set it up for a mail box receiving mail for whole a domain
> (viruel domaine with sendamail/procmail) I

> \username, "|/usr/bin/vacation username"
> And all the time it received a mail for the domaine and the user is
> not username it send an error message.

The vacation program is probably not what you want to be using for this,
as it is limited to knowing about specific usernames.

The example in the procmailex page might be useful, in:

              SHELL=/bin/sh    # for other shells, this might need
                               # adjustment

              :0 Whc: vacation.lock

               # Perform a quick check to see if the mail was addressed to
               # our domain.
              * $^To:.* at my.domain.example.com(\>?)$

               # Don't reply to daemons and mailinglists
              * !^FROM_DAEMON

               # Mail loops are evil
              * !^X-Loop: your at own.mail.address
              | formail -rD 8192 vacation.cache

                :0 ehc         # if the name was not in the cache
                | (formail -rI"Precedence: junk" \
                     -A"X-Loop: your at own.mail.address" ; \
                   echo "I received your mail,"; \
                   echo "but I won't be back until Monday."; \
                   echo "-- "; cat $HOME/.signature \
                  ) | $SENDMAIL -oi -t

> Do anybody have a solution for me.

I'd put the above snippet as ~/.procmail.vacation, and call the following
from .forward:

	\user, "|/usr/bin/procmail .procmail.vacation"

( Easier than changing your existing mail delivery process to use procmail
  as a local delivery program, if its not already )


-- 
                             Bruce Campbell                            RIPE
                   Systems/Network Engineer                             NCC
                 www.ripe.net - PGP562C8B1B             Operations/Security


-----
This is the afnog mailing list, managed by Majordomo 1.94.5

To send a message to this list, e-mail afnog at afnog.org
To send a request to majordomo, e-mail majordomo at afnog.org and put
your request in the body of the message (i.e use "help" for help)

This list is maintained by owner-afnog at afnog.org