Differences

This shows you the differences between two versions of the page.

Link to this comparison view

current:configurepostfix [2015/01/13 13:27] (current)
Line 1: Line 1:
 +==== Configure postfix to use clapf ====
 +
 +Edit /​etc/​postfix/​master.cf,​ and add the following lines:
 +
 +<​code>​
 +127.0.0.1:​10026 ​    ​inet ​ n      -      n      -      10      smtpd -o content_filter=
 +                       -o receive_override_options=no_unknown_recipient_checks,​no_header_body_checks,​no_milters
 +                       -o smtpd_helo_restrictions=
 +                       -o smtpd_client_restrictions=
 +                       -o smtpd_sender_restrictions=
 +                       -o smtpd_recipient_restrictions=permit_mynetworks,​reject
 +                       -o mynetworks=127.0.0.0/​8
 +</​code>​
 +
 +
 +
 +Edit /​etc/​postfix/​main.cf and add the following lines:
 +
 +<​code>​
 +recipient_delimiter = +
 +
 +content_filter = smtp:​[127.0.0.1]:​10025
 +
 +# if you set this, then postfix will give the email address to clapf without
 +# rewriting it so make sure to set the email aliases to the email table
 +receive_override_options = no_address_mappings
 +
 +default_destination_concurrency_limit = 10
 +smtpd_recipient_limit = 128
 +
 +lmtp_send_xforward_command = yes
 +smtp_send_xforward_command = yes
 +smtpd_authorized_xforward_hosts = 127.0.0.0/8
 +</​code>​
 +
 +
 +If you want LMTP local delivery instead of SMTP, then set //​server_mode=0//​ in clapf.conf, and use the following content_filter reference:
 +
 +<​code>​
 +content_filter = lmtp:​[127.0.0.1]:​10025
 +</​code>​
 +
 +Issue the postfix reload command
 +
 +<​code>​
 +postfix reload
 +</​code>​
 +
 +
 +Edit the /​etc/​aliases file to accept spam@ and ham@ addresses as aliases (or you may use virtual aliases too):
 +
 +   ham: /dev/null
 +   spam: /dev/null
 +
 +Then issue the '​newaliases'​ command.
 +
 +
 +=== Further notes ===
 +
 +The clapf daemon can handle a finite number of recipients, 128 by default. If you want more recipients in a single session edit MAX_RCPT_TO in config.h then (re)compile clapf and adjust the //​smtpd_recipient_limit//​ variable in main.cf. If you want less than 128 you should only adjust the //​smtpd_recipient_limit//​ variable in main.cf.
 +
 +Please note that if you want to increase the concurrency,​ modify the default_destination_concurrency_limit in main.cf, the 127.0.0.1:​10026 entry in master.cf and the //​number_of_worker_processes//​ in clapf.conf, then reload postfix.
 +
 +The //​number_of_worker_processe//​ should be greater than //​default_destination_concurrency_limit//:​
 +
 +<​code>​
 +number_of_worker_processe ›= default_destination_concurrency_limit + 1
 +</​code>​