procmail
[Top] [All Lists]

Re: using formail with -r & change From:

1999-05-03 09:52:51
Yann <yann(_at_)veritel(_dot_)com(_dot_)br> writes:
      I'm setting formail with sendmail to do auto-reply mails.

      I used the solutions following the book Mailing Lists (O' REILLY),
on page 93, putting this two lines in /etc/aliases:

owner-membership.agreement: user
membership.agreement: "|/usr/local/bin/formail -r | /bin/cat - \
/usr/local/adm/msg.test | /usr/lib/sendmail -t -oi"

      If I send a mail to membership(_dot_)agreement(_at_)my(_dot_)domain, I 
receive the
contents of /usr/local/adm/msg.test, from daemon(_at_)my(_dot_)domain(_dot_)

      I would like to change daemon(_at_)my(_dot_)domain to 
any_user(_at_)my(_dot_)domain, is
it possible? How?

Use the -I option of formail to add a From: header:

membership.agreement: "|/usr/local/bin/formail -rtI'From: 
any_user(_at_)my(_dot_)domain' \
        | /bin/cat - /usr/local/adm/msg.test | /usr/lib/sendmail -t -oi"

Note that you should almost always use the -t flag with the -r flag on
formail.


Philip Guenther

<Prev in Thread] Current Thread [Next in Thread>
  • Re: using formail with -r & change From:, Philip Guenther <=