General discussion

  • Creator
    Topic
  • #2332413

    Howto change “From” in procmail respondr

    Locked

    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

All Comments

  • Author
    Replies
    • #3594428

      Howto change “From” in procmail respondr

      by qnex ·

      In reply to Howto change “From” in procmail respondr

      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

    • #3589359

      Howto change “From” in procmail respondr

      by rouse ·

      In reply to Howto change “From” in procmail respondr

      This question was closed by the author

    • #3588520

      Howto change “From” in procmail respondr

      by rouse ·

      In reply to Howto change “From” in procmail respondr

      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 blow with the ‘from: root…’, but as it stands now – works fine!

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

Viewing 2 reply threads