Re: Rewrite From field if blank
>What do you mean with a blank (i.e. not filled in) From: header?
> We use Postfix to relay mail. Usually the From field is filled in and the
> mail is sent on. However, on occasion, the From field is blank and needs to
> be filled in. Is it possible for Postfix to sense that if the From field is
> filled in, leave the From field alone but if it is blank, populate it with
> something for the from address so that it is not blank?
With "local_header_rewrite_clients = permit_mynetworks" Postfix
rewrites headers from "local" clients as follows:
- IF THE MAIL HAS NO FROM: HEADER POSTFIX WILL ADD ONE with the
envelope sender address.
- If the mail has a From: header then Postfix will rewrite addresses
in that header as documented for canonical_maps, masquerade_domains,
append_dot_myorigin and append_at_mydomain. If there is no address
in the From: header then it is not rewritten.
That's all the built-in rewriting for headers from local clients.
You can also use REPLACE actions in header_checks but that will
also change mail from remote clients.