|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Juan Miscaro (scry_mr
yahoo.ca)
Date: Wed Oct 17 2007 - 09:05:22 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
--- mouss <mlist.only
free.fr> wrote:
> Juan Miscaro wrote:
> > --- mouss <mlist.only
free.fr> wrote:
> >> [snip]
> >> vacation wants a $HOME/...
> >> you may be able to cheat with -a and -d (not sure this is the flag
> >> for
> >> the database) and maybe set the HOME variable, but I didn't test
> >> this.
> >
> >
> > I got it to work using an autoreply shell script (called from a
> > transport map and defined in master.cf) triggered by a destination
> > address in a virtual_alias_maps table.
>
> do you mean you wrote a warpper around vacation?
> make sure there is no problem in the case of it being called
> simultaneously for different recipients.
No. Here are my steps:
1. virtual users
virtual_alias_maps = mysql:/etc/postfix/sql/virtual_alias_maps.cf
I have then two rows in my mysql table:
user
example.com user
example.com
user
example.com user
autoreply.example.com
2. transport
transport_maps = hash:/etc/postfix/transport
user
autoreply.example.com user_autoreply:
3. master.cf
user_autoreply unix - n n - - pipe
flags= user=admin argv=/usr/local/bin/user_autoreply.sh
${sender} ${recipient}
4. user_autoreply.sh
#!/bin/sh
mail -s "User's name" $1 < /etc/postfix/user_autoreply.txt
5. user_autoreply.txt
User no longer works here...
// juan
Ask a question on any topic and get answers from real people. Go to Yahoo! Answers and share what you know at http://ca.answers.yahoo.com
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]