procmail
[Top] [All Lists]

Re: Autoresponder still doesn't work

2004-07-06 05:27:08
Michael Bluejay wrote:

SENDMAIL=/usr/sbin/sendmail

That's generally superfluous, sometimes bad. Almost always the best idea is to let procmail use its compiled-in value for $SENDMAIL and not to override it in the rcfile nor in /etc/procmailrc.

:0:

The action line on that recipe has no output file and needs no output file, so there is no need for a lock (if you want a lockfile anyway, the action gives nothing for procmail to guess a lockfile name from, so you'd have to supply an explicit name). Get rid of the second colon; even your logfile tells you it's a problem.

* !^FROM_DAEMON
* !^FROM_MAILER

Redundant. ^FROM_DAEMON is a superset of ^FROM_MAILER, so anything that
doesn't match the former certainly won't match the latter.

* !^X-Loop: AustinMusic(_at_)michaelbluejay(_dot_)com

You should escape the period: leaving it unescaped is harmless here, but it's a sloppy habit that might hurt you on another occasion.

| (formail -t -r -A"X-Loop: austinmusic(_at_)michaelbluejay(_dot_)com " ; \
echo "Your message was tagged as spam and deleted. If it wasn't spam,
please visit my website and send your mail through the form there." )\
| $SENDMAIL $SENDMAILFLAGS -t

The trailing space in your X-Loop: line is a little ugly, but it should be harmless because you didn't right-anchor the condition.

I don't have such a good feeling about the lack of a backslash in the middle of the quoted text that is being echoed, but the quotes around it seem to be taking care of it, per the logfile. Maybe that's because a shell is handling it rather than procmail itself, thanks to the pipe and the semicolon. But in a procmailrc action, I feel more comfortable breaking up a multi-line echo line by line (and since your individual lines of text are as long as my mailer settings will tolerate, to avoid making garbage of my advice, I need further to separate the word "echo" onto a line of its own):

 | (formail -t -r -A"X-Loop: austinmusic(_at_)michaelbluejay(_dot_)com" ; \
 echo \
 "Your message was tagged as spam and deleted.  If it wasn't spam," ; \
 echo \
 please visit my website and send your mail through the form there." ) \
 | $SENDMAIL $SENDMAILFLAGS -t

The only thing that doesn't work is that the autoresponse doesn't get
sent.

Maybe it gets sent but it's eaten at the other end (the original sender, whose message triggered the autoresponder). Do you have access to the MTA logs on your system to see whether something went out?



____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail