OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
From: Wietse Venema (wietseporcupine.org)
Date: Wed Apr 04 2001 - 18:59:48 CDT

  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

    The topic is virtual users, not necessarily users with a login
    shell and with a home directory.

            Wietse

    Michael Ghens:
    > I take a simpler route on this. I still use the bsd/linux vaction program.
    > When I edit the .vacation.msg file and add a From: header at the top of
    > the file.
    >
    > Example
    >
    > From: Michael Ghens <michaelspconnect.com>
    > Subject: Away from mail
    >
    > Mail text
    >
    >
    > It seems to work.
    >
    > On Wed, 4 Apr 2001, Wietse Venema wrote:
    >
    > > Date: Wed, 4 Apr 2001 15:44:18 -0400 (EDT)
    > > From: Wietse Venema <wietseporcupine.org>
    > > To: Postfix users <postfix-userspostfix.org>
    > > Subject: Re: virtual autoresponder (was: deliver to file in virtual map?)
    > >
    > > This was answered a while ago in the list. It needs a FAQ entry.
    > > I would appreciate it if someone could develop the recipe below
    > > into a working example.
    > >
    > > Wietse
    > >
    > > When a user goes on vacation, add usernameautoreply.domain.com
    > > to their address forwarding, for example:
    > >
    > > /etc/postfix/main.cf:
    > > virtual_maps = hash:/etc/postfix/virtual
    > >
    > > /etc/postfix/virtual:
    > > userdomain.com userautoreply.domain.com userdomain.com
    > >
    > > This will send the mail to the user as usual (virtual domain or
    > > not), but will also send a copy of every message to an identical
    > > address in the autoreply subdomain.
    > >
    > > To process the autoreplies, use a pipe-driven script that processes
    > > recipients one at a time:
    > >
    > > /etc/postfix/main.cf:
    > > transport_maps = hash:/etc/postfix/transport
    > > autoreply_destination_recipient_limit = 1
    > >
    > > /etc/postfix/transport:
    > > autoreply.domain.com autoreply:
    > >
    > > /etc/postfix/master.cf:
    > > autoreply .... pipe user=foo argv=/some/where/autoreply $sender $user
    > >
    > > The autoreply script checks the sender address and the message headers.
    > > The script should NEVER send an autoreply when:
    > >
    > > sender is owner-whatever or whatever-request (mailing list mail)
    > > user is not listed in the To: or Cc: headers (mailing list mail)
    > >
    > > This is to prevent the autoresponder from replying to mailing lists.
    > >
    > > The script should set the envelope address to the null string, in
    > > order to prevent autoreply mailer loops.
    > >
    > > Be careful: the autoreply script processes data from an untrusted
    > > source. Don't let it near a shell. For example, use PERL code like:
    > >
    > > $SENDMAIL = "/usr/sbin/sendmail"
    > >
    > > open(MAIL, "|$SENDMAIL -f '' -t") || die "Cannot execute $SENDMAIL: $!\n";
    > > print MAIL <<EOF
    > > From: MAILER-DAEMON (Automatic reply service)
    > > To: $sender
    > > Subject: $user is away from the mail
    > >
    > > Some other text here.
    > > EOF
    > > close MAIL || die "$SENDMAIL failed: $!\n";
    > > exit 0;
    > >
    > > -
    > > To unsubscribe, send mail to majordomopostfix.org with content
    > > (not subject): unsubscribe postfix-users
    > >
    >
    >
    > -
    > To unsubscribe, send mail to majordomopostfix.org with content
    > (not subject): unsubscribe postfix-users
    >
    >

    -
    To unsubscribe, send mail to majordomopostfix.org with content
    (not subject): unsubscribe postfix-users