Advertisement
Guest User

Untitled

a guest
Jul 30th, 2018
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.60 KB | None | 0 0
  1. # --------------------
  2. # INSTALL-TIME CONFIGURATION INFORMATION
  3. #
  4. # location of the Postfix queue. Default is /var/spool/postfix.
  5. queue_directory = /var/spool/postfix
  6.  
  7. # location of all postXXX commands. Default is /usr/sbin.
  8. command_directory = /usr/sbin
  9.  
  10. # location of all Postfix daemon programs (i.e. programs listed in the
  11. # master.cf file). This directory must be owned by root.
  12. # Default is /usr/libexec/postfix
  13. daemon_directory = /usr/libexec/postfix
  14.  
  15. # location of Postfix-writable data files (caches, random numbers).
  16. # This directory must be owned by the mail_owner account (see below).
  17. # Default is /var/lib/postfix.
  18. data_directory = /var/lib/postfix
  19.  
  20. # owner of the Postfix queue and of most Postfix daemon processes.
  21. # Specify the name of a user account THAT DOES NOT SHARE ITS USER OR GROUP ID
  22. # WITH OTHER ACCOUNTS AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.
  23. # In particular, don't specify nobody or daemon. PLEASE USE A DEDICATED USER.
  24. # Default is postfix.
  25. mail_owner = postfix
  26.  
  27. # The following parameters are used when installing a new Postfix version.
  28. #
  29. # sendmail_path: The full pathname of the Postfix sendmail command.
  30. # This is the Sendmail-compatible mail posting interface.
  31. #
  32. sendmail_path = /usr/sbin/sendmail.postfix
  33.  
  34. # newaliases_path: The full pathname of the Postfix newaliases command.
  35. # This is the Sendmail-compatible command to build alias databases.
  36. #
  37. newaliases_path = /usr/bin/newaliases.postfix
  38.  
  39. # full pathname of the Postfix mailq command. This is the Sendmail-compatible
  40. # mail queue listing command.
  41. mailq_path = /usr/bin/mailq.postfix
  42.  
  43. # group for mail submission and queue management commands.
  44. # This must be a group name with a numerical group ID that is not shared with
  45. # other accounts, not even with the Postfix account.
  46. setgid_group = postdrop
  47.  
  48. # external command that is executed when a Postfix daemon program is run with
  49. # the -D option.
  50. #
  51. # Use "command .. & sleep 5" so that the debugger can attach before
  52. # the process marches on. If you use an X-based debugger, be sure to
  53. # set up your XAUTHORITY environment variable before starting Postfix.
  54. #
  55. debugger_command =
  56. PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  57. ddd $daemon_directory/$process_name $process_id & sleep 5
  58.  
  59. debug_peer_level = 2
  60.  
  61. # --------------------
  62. # CUSTOM SETTINGS
  63. #
  64.  
  65. # SMTP server response code when recipient or domain not found.
  66. unknown_local_recipient_reject_code = 550
  67.  
  68. # Do not notify local user.
  69. biff = no
  70.  
  71. # Disable the rewriting of "site!user" into "user@site".
  72. swap_bangpath = no
  73.  
  74. # Disable the rewriting of the form "user%domain" to "user@domain".
  75. allow_percent_hack = no
  76.  
  77. # Allow recipient address start with '-'.
  78. allow_min_user = no
  79.  
  80. # Disable the SMTP VRFY command. This stops some techniques used to
  81. # harvest email addresses.
  82. disable_vrfy_command = yes
  83.  
  84. # Enable both IPv4 and/or IPv6: ipv4, ipv6, all.
  85. inet_protocols = all
  86.  
  87. # Enable all network interfaces.
  88. inet_interfaces = all
  89.  
  90. #
  91. # TLS settings.
  92. #
  93. # SSL key, certificate, CA
  94. #
  95. smtpd_tls_key_file = /etc/letsencrypt/live/mail.svjetlostkomerc.ba/privkey.pem
  96. smtpd_tls_cert_file = /etc/letsencrypt/live/mail.svjetlostkomerc.ba/fullchain.pem
  97. #smtpd_tls_CAfile = /etc/letsencrypt/live/mail.svjetlostkomerc.ba/chain.pem
  98. #smtpd_tls_CApath = /etc/letsencrypt/live/mail.svjetlostkomerc.ba/fullchain.pem
  99.  
  100. #
  101. # Disable SSLv2, SSLv3
  102. #
  103. smtpd_tls_protocols = !SSLv2 !SSLv3
  104. smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
  105. smtp_tls_protocols = !SSLv2 !SSLv3
  106. smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
  107. lmtp_tls_protocols = !SSLv2 !SSLv3
  108. lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
  109.  
  110. #
  111. # Fix 'The Logjam Attack'.
  112. #
  113. smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
  114. smtpd_tls_dh512_param_file = /etc/pki/tls/dh512_param.pem
  115. smtpd_tls_dh1024_param_file = /etc/pki/tls/dh2048_param.pem
  116.  
  117. tls_random_source = dev:/dev/urandom
  118.  
  119. # Log only a summary message on TLS handshake completion — no logging of client
  120. # certificate trust-chain verification errors if client certificate
  121. # verification is not required. With Postfix 2.8 and earlier, log the summary
  122. # message, peer certificate summary information and unconditionally log
  123. # trust-chain verification errors.
  124. smtp_tls_loglevel = 1
  125. smtpd_tls_loglevel = 1
  126.  
  127. # Opportunistic TLS: announce STARTTLS support to remote SMTP clients, but do
  128. # not require that clients use TLS encryption.
  129. smtpd_tls_security_level = may
  130.  
  131. # Produce `Received:` message headers that include information about the
  132. # protocol and cipher used, as well as the remote SMTP client CommonName and
  133. # client certificate issuer CommonName.
  134. # This is disabled by default, as the information may be modified in transit
  135. # through other mail servers. Only information that was recorded by the final
  136. # destination can be trusted.
  137. #smtpd_tls_received_header = yes
  138.  
  139. # Opportunistic TLS, used when Postfix sends email to remote SMTP server.
  140. # Use TLS if this is supported by the remote SMTP server, otherwise use
  141. # plaintext.
  142. # References:
  143. # - http://www.postfix.org/TLS_README.html#client_tls_may
  144. # - http://www.postfix.org/postconf.5.html#smtp_tls_security_level
  145. smtp_tls_security_level = may
  146.  
  147. # Use the same CA file as smtpd.
  148. smtp_tls_CApath = /etc/pki/tls/certs
  149. smtp_tls_CAfile = $smtpd_tls_CAfile
  150. smtp_tls_note_starttls_offer = yes
  151.  
  152. # Enable long, non-repeating, queue IDs (queue file names).
  153. # The benefit of non-repeating names is simpler logfile analysis and easier
  154. # queue migration (there is no need to run "postsuper" to change queue file
  155. # names that don't match their message file inode number).
  156. #enable_long_queue_ids = yes
  157.  
  158. # Reject unlisted sender and recipient
  159. smtpd_reject_unlisted_recipient = yes
  160. smtpd_reject_unlisted_sender = yes
  161.  
  162. # Header and body checks with PCRE table
  163. header_checks = pcre:/etc/postfix/header_checks
  164. body_checks = pcre:/etc/postfix/body_checks.pcre
  165.  
  166. # A mechanism to transform commands from remote SMTP clients.
  167. # This is a last-resort tool to work around client commands that break
  168. # interoperability with the Postfix SMTP server. Other uses involve fault
  169. # injection to test Postfix's handling of invalid commands.
  170. # Requires Postfix-2.7+.
  171. #smtpd_command_filter = pcre:/etc/postfix/command_filter.pcre
  172.  
  173. # HELO restriction
  174. smtpd_helo_required = yes
  175. smtpd_helo_restrictions =
  176. permit_mynetworks
  177. permit_sasl_authenticated
  178. check_helo_access pcre:/etc/postfix/helo_access.pcre
  179. reject_non_fqdn_helo_hostname
  180. reject_unknown_helo_hostname
  181.  
  182. # Sender restrictions
  183. smtpd_sender_restrictions =
  184. reject_unknown_sender_domain
  185. reject_non_fqdn_sender
  186. reject_unlisted_sender
  187. permit_mynetworks
  188. permit_sasl_authenticated
  189. check_sender_access pcre:/etc/postfix/sender_access.pcre
  190.  
  191. # Recipient restrictions
  192. smtpd_recipient_restrictions =
  193. reject_non_fqdn_recipient
  194. reject_unlisted_recipient
  195. check_policy_service inet:127.0.0.1:7777
  196. permit_mynetworks
  197. permit_sasl_authenticated
  198. reject_unauth_destination
  199.  
  200. # END-OF-MESSAGE restrictions
  201. smtpd_end_of_data_restrictions =
  202. check_policy_service inet:127.0.0.1:7777
  203.  
  204. # Data restrictions
  205. smtpd_data_restrictions = reject_unauth_pipelining
  206.  
  207. proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
  208.  
  209. # Avoid duplicate recipient messages. Default is 'yes'.
  210. enable_original_recipient = no
  211.  
  212. # Virtual support.
  213. virtual_minimum_uid = 2000
  214. virtual_uid_maps = static:2000
  215. virtual_gid_maps = static:2000
  216. virtual_mailbox_base = /var/vmail
  217.  
  218. # Do not set virtual_alias_domains.
  219. virtual_alias_domains =
  220.  
  221. #
  222. # Enable SASL authentication on port 25 and force TLS-encrypted SASL authentication.
  223. # WARNING: NOT RECOMMENDED to enable smtp auth on port 25, all end users should
  224. # be forced to submit email through port 587 instead.
  225. #
  226. #smtpd_sasl_auth_enable = yes
  227. #smtpd_sasl_security_options = noanonymous
  228. #smtpd_tls_auth_only = yes
  229.  
  230. # hostname
  231. myhostname = mail.svjetlostkomerc.ba
  232. myorigin = mail.svjetlostkomerc.ba
  233. mydomain = mail.svjetlostkomerc.ba
  234.  
  235. # trusted SMTP clients which are allowed to relay mail through Postfix.
  236. #
  237. # Note: additional IP addresses/networks listed in mynetworks should be listed
  238. # in iRedAPD setting 'MYNETWORKS' (in `/opt/iredapd/settings.py`) too.
  239. # for example:
  240. #
  241. # MYNETWORKS = ['xx.xx.xx.xx', 'xx.xx.xx.0/24', ...]
  242. #
  243. mynetworks = 127.0.0.1 [::1]
  244.  
  245. # Accepted local emails
  246. mydestination = $myhostname, localhost, localhost.localdomain
  247.  
  248. alias_maps = hash:/etc/postfix/aliases
  249. alias_database = hash:/etc/postfix/aliases
  250.  
  251. # Default message_size_limit.
  252. message_size_limit = 15728640
  253.  
  254. # The set of characters that can separate a user name from its extension
  255. # (example: user+foo), or a .forward file name from its extension (example:
  256. # .forward+foo).
  257. # Postfix 2.11 and later supports multiple characters.
  258. recipient_delimiter = +
  259.  
  260. # The time after which the sender receives a copy of the message headers of
  261. # mail that is still queued. Default setting is disabled (0h) by Postfix.
  262. #delay_warning_time = 1h
  263. #
  264. # Lookup virtual mail accounts
  265. #
  266. transport_maps =
  267. proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
  268. proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf
  269. proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
  270.  
  271. sender_dependent_relayhost_maps =
  272. proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
  273.  
  274. # Lookup table with the SASL login names that own the sender (MAIL FROM) addresses.
  275. smtpd_sender_login_maps =
  276. proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
  277.  
  278. virtual_mailbox_domains =
  279. proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
  280.  
  281. relay_domains =
  282. $mydestination
  283. proxy:mysql:/etc/postfix/mysql/relay_domains.cf
  284.  
  285. virtual_mailbox_maps =
  286. proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
  287.  
  288. virtual_alias_maps =
  289. proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf
  290. proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf
  291. proxy:mysql:/etc/postfix/mysql/catchall_maps.cf
  292. proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
  293.  
  294. sender_bcc_maps =
  295. proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf
  296. proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
  297.  
  298. recipient_bcc_maps =
  299. proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf
  300. proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
  301.  
  302. #
  303. # Postscreen
  304. #
  305. postscreen_greet_action = drop
  306. postscreen_blacklist_action = drop
  307. postscreen_dnsbl_action = drop
  308. postscreen_dnsbl_threshold = 2
  309. postscreen_dnsbl_sites =
  310. zen.spamhaus.org=127.0.0.[2..11]*3
  311. b.barracudacentral.org=127.0.0.2*2
  312.  
  313. postscreen_dnsbl_reply_map = texthash:/etc/postfix/postscreen_dnsbl_reply
  314. postscreen_access_list = permit_mynetworks cidr:/etc/postfix/postscreen_access.cidr
  315.  
  316. # Require Postfix-2.11+
  317. #postscreen_dnsbl_whitelist_threshold = -2
  318. #
  319. # Dovecot SASL support.
  320. #
  321. smtpd_sasl_type = dovecot
  322. smtpd_sasl_path = private/dovecot-auth
  323. virtual_transport = dovecot
  324. dovecot_destination_recipient_limit = 1
  325.  
  326. #
  327. # mlmmj - mailing list manager
  328. #
  329. mlmmj_destination_recipient_limit = 1
  330.  
  331. #
  332. # Amavisd + SpamAssassin + ClamAV
  333. #
  334. content_filter = smtp-amavis:[127.0.0.1]:10024
  335.  
  336. # Concurrency per recipient limit.
  337. smtp-amavis_destination_recipient_limit = 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement