is possible modify the source address based on the subject?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

is possible modify the source address based on the subject?

kazabe
hello.
Is possible rewrite the sender address on a send mail when the subject
have some special expression?

By example: if i send an email from [hidden email] with the word in
the  subject UPDATES, so send the email like sended FROM
[hidden email] ??????

can i do that with regrex?

http://www.postfix.org/ADDRESS_REWRITING_README.html

Really and a little bit confused with that Readme.

Thanks in advance.
Reply | Threaded
Open this post in threaded view
|

Re: is possible modify the source address based on the subject?

Wietse Venema
kazabe:
> hello.
> Is possible rewrite the sender address on a send mail when the subject
> have some special expression?

Your best options involve using software outside of Postfix, because
"change message property X based on the content of some other message
property Y" is not built into Postfix.

- Have your updates sent a local mailing list (you may have to
  change your subscription, or use a Procmail rule). The mailing
  list manager will replace the sender address with the list sender
  address.

- Maybe some Procmail rule can do all this. I don't use Procmail.

- Use a MILTER (milter implementations exist for Perl, Python, C,
  and other languages). This can replace any property of an email
  message: sender, recipient, header, body, based on arbitrary
  criteria (i.e. code that you write).

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: is possible modify the source address based on the subject?

@lbutlr
On 07 Aug 2018, at 04:53, Wietse Venema <[hidden email]> wrote:
>  Maybe some Procmail rule can do all this. I don't use Procmail.

You can, with enough staples and duct tape, do *anything* in procmail.

However, it is old, krufty, not under development<1>, has several bugs, doesn’t understand mime, and I don’t recommend it to anyone.

All said, I’m still using it.

<1> Last update was in 2001, site is dead.


--
There is a road, no simple highway, between the dawn and the dark of
night