But how can I do this?
In master.cf I add a service eg called "mycleanup" with
mycleanup unix ... cleanup -o header_checks=file
Essentially a renamed copy of the cleanup service with -o header_checks
Then I add the parameter -o cleanup_service_name=mycleanup to existing pickup
I don't need to touch smtpd if I don't mind getting the IP address via client_restrictions, too.
Is that correct?  Did I miss something?
-lutzn
 
Gesendet: Freitag, 22. März 2019 um 06:30 Uhr
Von: "Viktor Dukhovni" <postfix-us...@dukhovni.org>
An: "Postfix users" <postfix-users@postfix.org>
Betreff: Re: Add Header only if sent via sendmail
> On Mar 21, 2019, at 11:55 PM, lutz.niede...@gmx.net wrote:
>
> I am looking for a simple way to add a header if and only if mail is sent locally via sendmail (mail/mailx) command.
> We need to know who/what sent an email. We already get the client's IP address if sent using smtp via smtpd_client_restrictions, but if it is not sent via smtp I have no clue how to add a header except using header_checks that adds this header for all mails.
> Any (simple) ideas?

Separate cleanup(8) instances for pickup(8) and smtpd(8). Or separate
content_filters. Each cleanup(8) instance (chosen via cleanup_service_name)
can have its own setting of header_checks.

--
Viktor.
 

Reply via email to