1

In postfix I want to create a (so to speak) rewrite rule to rewrite the "mail from" - field matching one specific from-address "mail@localdomain.com" to "myrealaccount@aol.com" (for use with aol smarthost), if (as a condition) the "To"-field matches *@aol.com"

I must do that, because aol denies to use another "mail-from"-address than the real registered account ...

is that possible maybe via header_checks?

sgohl
  • 1,382
  • 1
  • 11
  • 17

1 Answers1

2

This should do it.

/^From: (.*?)@gmail.com$/ REPLACE From: John Smith <jsmith@aol.com>
/^From: mail@localdomain.com/ REPLACE From: myrealaccount@aol.com

Also, you don't need to postmap regexp files.

Jacob Evans
  • 7,886
  • 3
  • 29
  • 57