Changeset - 67d9190a521a
[Not reviewed]
0 2 0
Branko Majic (branko) - 11 years ago 2015-04-07 23:01:27
branko@majic.rs
MAR-4: Added RBL support for Postifx SMTP checks.
2 files changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
roles/mail_server/templates/main.cf.j2
Show inline comments
 
@@ -13,49 +13,52 @@ biff = no
 
append_dot_mydomain = no
 

	
 
# Uncomment the next line to generate "delayed mail" warnings
 
#delay_warning_time = 4h
 

	
 
readme_directory = no
 

	
 
# TLS parameters
 
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
 
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
 
smtpd_use_tls=yes
 
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
 
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 

	
 
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
 
# information on enabling SSL in the smtp client.
 

	
 
myhostname = mail
 
alias_maps = hash:/etc/aliases
 
alias_database = hash:/etc/aliases
 
myorigin = /etc/mailname
 
mydestination = mail.example.com, mail, localhost.localdomain, localhost
 
relayhost = 
 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
 
mailbox_command = procmail -a "$EXTENSION"
 
mailbox_size_limit = 0
 
recipient_delimiter = +
 
inet_interfaces = all
 

	
 
# LDAP directory look-ups for domains, mailboxes and aliases.
 
virtual_mailbox_domains = ldap:/etc/postfix/ldap-virtual-mailbox-domains.cf
 
virtual_mailbox_maps = ldap:/etc/postfix/ldap-virtual-mailbox-maps.cf
 
virtual_alias_maps = ldap:/etc/postfix/ldap-virtual-alias-maps.cf
 

	
 
# Delivery of mails via Dovecot for virtual domains.
 
virtual_transport = dovecot
 
dovecot_destination_recipient_limit = 1
 

	
 
# SMTP authentication.
 
smtpd_sasl_type = dovecot
 
smtpd_sasl_path = private/auth
 
smtpd_sasl_auth_enable = yes
 
smtpd_tls_security_level = may
 
smtpd_tls_auth_only = yes
 
smtpd_tls_cert_file = {{ smtp_tls_certificate }}
 
smtpd_tls_key_file = {{ smtp_tls_key }}
 
smtpd_recipient_restrictions = permit_mynetworks
 
  permit_sasl_authenticated
 
  {% for rbl in smtp_rbl -%}
 
  reject_rbl {{ rbl }}
 
  {% endfor -%}
 
  reject_unauth_destination
testsite/group_vars/mail.yml
Show inline comments
 
---
 

	
 
ldap_client_config:
 
  - comment: Set the base DN
 
    option: BASE
 
    value: dc=example,dc=com
 
  - comment: Set the default URI
 
    option: URI
 
    value: ldap://ldap.example.com/
 
  - comment: Set the LDAP TLS truststore
 
    option: TLS_CACERT
 
    value: /etc/ssl/certs/truststore.pem
 

	
 
mail_ldap:
 
  url: ldap://ldap.example.com/
 
  tls_truststore: /etc/ssl/certs/truststore.pem
 
  root_dn: dc=example,dc=com
 
  postfix_password: postfix
 
  dovecot_password: dovecot
 

	
 
mail_user:
 
  name: vmail
 
  uid: 5000
 
  gid: 5000
 

	
 
imap_tls_certificate: /etc/ssl/certs/mail.example.com_imap.pem
 
imap_tls_key: /etc/ssl/private/mail.example.com_imap.key
 
smtp_tls_certificate: /etc/ssl/certs/mail.example.com_smtp.pem
 
smtp_tls_key: /etc/ssl/private/mail.example.com_smtp.key
 
imap_folder_separator: /
 
\ No newline at end of file
 
imap_folder_separator: /
 
smtp_rbl:
 
  - bl.spamcop.net
 
  - zen.spamhaus.org
 
\ No newline at end of file
0 comments (0 inline, 0 general)