OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: advice on automatic replies

From: Victor Duchovni (Victor.DuchovniMorganStanley.com)
Date: Wed Oct 17 2007 - 09:10:37 CDT


On Wed, Oct 17, 2007 at 10:05:22AM -0400, Juan Miscaro wrote:

> 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

It is a bad idea to not quote "$1" here. Sender addresses with whitespace
produce unexpected results. Also this fails to check for "List:" headers
"Auto-Submitted:" headers, "owner-foo" envelopes "foo-request" envelopes,
"Precedence: junk" headers...

See RFC 3834 for a comprehensive set of recommendations.

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:majordomopostfix.org?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.