Kernel_Killer
September 23rd, 2005, 17:46
Ok, so I'm trying to get this auto-reply thing going. So far no good, or at least that I can tell. The server is setup to have transport and virtual all on MySQL, and have added the values needed as best I can.

In my transport, I added a new domain autoreply.domain.com, and set to autoreply: . In my virtual, I set the address to go to the user@domain.com@autoreply.domain.com (and vice versa for testing). I made a /usr/local/bin/autoreply script set 755, that all it does is run a mail command:

mail -s "Out of the Office" -a"From: <$2>" $1 < /etc/postfix/autoreply.txt

In my /etc/postfix/master.cf I added:

autoreply unix - n n - - pipe
flags= argv=/usr/local/bin/autoreply $sender $recipient

and have then restarted. if I have the original address send to autoreply, nothing goes through. If I reverse it, having the autoreply addy forward to original, then I get mail. Here's the biggest issue, it doesn't reply either way. The script runs fine, it's executable, but have to add the $1 and $2 entries. Either way, the script seems to be fine....I think. Any clues? TIA

optyk
September 25th, 2005, 08:25
If you're just after 'Out of Office' replies then read the vacation manpage.
It might be an easier solution to what you're trying to do.

Kernel_Killer
September 26th, 2005, 01:05
Thanks Optyk. I'm trying it now. Just trying to get it to work with virtual users (hope that works).

|MiNi0n|
September 30th, 2005, 13:35
As long as the users have homedirs (even in mysql) you can use the built in vaction response by just creating the appropriate .forward there.

optyk
September 30th, 2005, 19:12
Also check out postfixadmin (http://high5.net/postfixadmin/). Looks like they can do vacation for virtual users/domains. If they can, then you can. ;)