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: mouss (mlist.onlyfree.fr)
Date: Wed Oct 17 2007 - 15:37:39 CDT


Juan Miscaro wrote:
> --- Victor Duchovni <Victor.DuchovniMorganStanley.com> wrote:
>
>> 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.
>
>
> I didn't think of the issues raised in the RFC. Any suggestions on how
> I can avoid them without using maildrop? I can't use the mentioned
> vacation tool because my users are virtual (I believe I need a $HOME).

I already told you this is harder than it looks, and I though yoy got it
(you said "Gotcha"), but apparently, you did not ;-p

Now, the first question to ask yourself is why go to this trouble at all?
- tell the user that his address will be removed after N days/weeks and
that he should inform his pen pals if he does not want to lose mail.
- he can then send mail to all addresses that he can find in his address
book or so
- for other addresses, he can do that once he gets a message.

and this makes it even easier for people, because "standard" MUAs will
automatically save the address (This is annoying sometimes, but that's
not the point here).

If you insist on auto-responding, then find a program that correctly
implements the recommendations.

whatever program you use, make sure
- you don't auto-respond to spam
- you auto-respond to the enveope sender, not to the From or Reply-To
headers.