procmail
[Top] [All Lists]

Re: Autoresponder

2003-09-05 10:41:12
Steffen has this code:

:0 h c
* !^FROM_DAEMON
* !^From:.*bbs*

Well, the trailing asterisk there is wrong, but that's not what Christoph commented on.

* !^X-Loop:someone(_at_)somewhere(_dot_)com
| (formail -r -I"Precedence: junk" \
-A"X-Loop: someone(_at_)somewhere(_dot_)com" ; \
cat $HOME/.autoreply ) | $SENDMAIL -t

Christoph answered,

I think that recipe is borked:

The recipe is fine, Christoph; your interpretation, however, is, well, as you put it, borked.

* it will send the "reply" to the *recipient* of the message, most
  probably yourself

No; note the -r option to formail. That inverts the head so that the sender becomes the recipient.

* it will send the "reply" to any other person mentioned in Cc etc.
  headers.

No; note the -r option to formail. The recipient becomes the sender and all other addressees vanish.

> This is evil.

Yes to "evil" but no to "is," because it isn't actually happening.

* it produces a full quote

No; note the `h' flag and the -r (without -k) option to formail. `h' without `b' loses the body; plus, if you give the -r, -X, or -x option to formail, the body is dropped unless you also use -k. So there are in fact two safeguards against including the body of the incoming message: procmail never gives it to formail and formail is keyed to drop it if it were to get it.

* you should check for Precedence headers

Already being done: note the test for !^FROM_DAEMON.

Can't you just use "vacation", or did the "autoreply" mislead me
completely about the purpose of the recipe?

We'll have to hear from Stef about that.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>