Home // Postfix Guides // Master.cf


The master.cf file will contain a listing of the processes that will be running for Postfix. In addition to the standard postfix processes, you may want to have the following types of additional entries:

Once you’ve passed a message from your primary instance of Postfix to a filter or scanner, and need to get it back into the mail queue, you won’t need to run all of the restrictions and checks that you did the first time that the message was received. You can thus create an instance of Postfix that will listen ONLY on the localhost address, and will not run any of the checks that were run before. inet n – y – 100 smtpd

-o content_filter=
-o smtpd_proxy_filter=
-o myhostname=injector.domain.extention
-o mynetworks=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o header_checks=
-o body_checks=
-o receive_override_options=no
-o smtpd_authorized_xforward_hosts=

If you want to pass all messages to a shell script, you will want to set your content_filter=shellfilter, and then add the following to master.cf (all on one line):

shellfilter unix – n n – – pipe user=filter argv=/usr/local/bin/filter.sh ${sender} ${recipient}

Note: It will be up to the shell script to re-inject the message into a Postfix queue. You will probably want to use a re-injection listener like the one described above.

Leave a Reply

Your email address will not be published. Required fields are marked *