General discussion

Locked

Howto change "From" in procmail respondr

By rouse ·
Hello, I'm running sendmail with the following procmail recipe. It works fine, but it addresses itself from 'root@mypc.mydomain'. I'd rather have it address itself from something like autoresponder@mypc.mydomain, because some folks don't get the root thing...

:0 Whc: me.lock
* $^To:.*me
* !^FROM_DAEMON
* !^X-Loop: me@myisp.provider
| formail -rD 8192 me.cache
:0 ehc
| (formail -rI"Precedence: junk" \
-A"X-Loop: me@myisp.provider " ; \
echo "I received your mail,"; \
echo "Thanks very much."; \
echo "-- "; cat $HOME/.signature \
) | $SENDMAIL -oi -t

This a basic auto-responder recipe. But I can't decipher the man pages to figure out how to overide the "from". Thanks in advance.
Keith Stewart

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Howto change "From" in procmail respondr

by QNeX In reply to Howto change "From" in pr ...

Use formail option "-I", i.e. in your example, use something like this:

formail -r -I"Precedence: junk" \
-I"From: foo@bar.org" \
(and so on as in your example.

-I will remove original "From:" header and substitue it with provided by you.HTH, HAND

Collapse -

Howto change "From" in procmail respondr

by rouse In reply to Howto change "From" in pr ...

Poster rated this answer

Collapse -

Howto change "From" in procmail respondr

by rouse In reply to Howto change "From" in pr ...

This question was closed by the author

Collapse -

Howto change "From" in procmail respondr

by rouse In reply to Howto change "From" in pr ...

In case anyone is interested, the order of the parameters seems to be important. In the following, if I put the -I line after the -A line, then it would **** with the 'from: root...', but as it stands now - works fine!

| (formail -rI"Precedence: junk" \
-I"From: AutoResponder <me@myisp.provider>" ; \
-A"X-Loop: me@myisp.provider " ; \

Back to Linux Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums