Geoff Shang: > On Fri, 12 Apr 2013, Geoff Shang wrote: > > >> submission inet n - - - - smtpd > >> -o cleanup_service=submission_cleanup > >> > >> submission_cleanup unix n ............................ cleanup > >> -o header_checks=pcre:/etc/postfix/header_checks > >> > >> would do the job. > > > > Thanks Wietse. I think I will opt for this latter option. > > hmm. This didn't work. I'm a bit stuck as to why. I thought that > perhaps it might be running before the Received: header is created, but in > that case, I don't know why the example I linked to earlier that searches > for an authenticated header would work, while this would not.
You need to do "postfix reload" after editing master.cf. The submission_cleanup service will see the Received: header that was prepended by the submission server. However, if your Milter adds headers then those aren't seen by header_checks; you would need to use milter_header_checks. Wietse