Daniel L. Miller wrote:
Nate Carlson wrote:
On Thu, 5 Mar 2009, Wietse Venema wrote:
I've found tricks to remove or edit Received headers for specific IP's via 'header_checks'; however, what I'd like to be able to do is either remove the header altogether or modify the IP to one of the IP's that we own for
all authenticated users that submit mail via 465/587.

$ man header_checks | less +/IGNORE
$ man header_checks | less +/REPLACE

Thanks.. I've got that, but I'm not finding a way to only match mail that comes in via Submission, and not via regular SMTP. Is there a way to tell Postfix to only apply the header_checks to certain mail processes?

I suppose I could do something like 'no_header_body_checks' on the main SMTP process, but it'd be nice to be able to do some checks there in the future too.
You can make the change in master.cf. Find the "submission" line, and add the parameter. For example:

submission inet n       -       -       -       -       smtpd
 -o header_checks=hash:/etc/postfix/maps/submission_header_checks


You're on the right track, but your example won't work - header_checks are a property of the cleanup process, not smtpd. And while it's legal to use hash: maps for header_checks, it's not very useful.

The solution is to define an alternate cleanup service for "submission", and then define alternate header_checks for that cleanup

submission ... smtpd
  -o cleanup_service_name=cleanup_submission

cleanup_submission ... cleanup
  -o header_checks=pcre:/path/to/header_checks

Reply via email to