1 = Postfix Dovecot Pam =
5 # xxx.xxx.xxx.xxx = ipadresse; um den smtp server auf eine ip zu binden
7 xxx.xxx.xxx.xxx:smtp inet n - - - - smtpd
9 dovecot unix - n n - - pipe
10 flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${recipient}
13 ''' virtual_domains '''
20 postmap /etc/postfix/virtual_domains
26 myhostname = mail.example.net
27 myorigin = /etc/mailname
29 virtual_mailbox_domains = hash:/etc/postfix/virtual_domains
30 virtual_mailbox_base = /srv/vmail
32 virtual_uid_maps = static:8
33 virtual_gid_maps = static:8
35 virtual_transport = dovecot
37 dovecot_destination_recipient_limit = 1
39 mydestination = localhost
40 mynetworks = 127.0.0.0/8,
42 smtpd_banner = $myhostname ESMTP Mailserver
44 mailbox_size_limit = 512000000
45 message_size_limit = 10240000
47 smtpd_sender_restrictions = reject_unknown_address
48 smtpd_client_restrictions = reject_invalid_hostname
50 smtpd_helo_required = yes
51 smtpd_helo_restrictions = reject_invalid_hostname,
52 reject_non_fqdn_hostname,
53 reject_invalid_hostname,
56 smtpd_recipient_restrictions =
57 reject_invalid_hostname,
58 reject_non_fqdn_hostname,
59 reject_non_fqdn_sender,
60 reject_non_fqdn_recipient,
61 reject_unknown_sender_domain,
62 reject_unknown_recipient_domain,
63 reject_unauth_destination,
65 reject_rbl_client list.dsbl.org,
66 reject_rbl_client sbl-xbl.spamhaus.org,
67 reject_rbl_client cbl.abuseat.org,
68 reject_rbl_client dul.dnsbl.sorbs.net,
71 strict_rfc821_envelopes = yes
75 #smtpd_tls_cert_file = /etc/postfix/mail.csr
76 #smtpd_tls_key_file = /etc/postfix/mail.key
79 smtpd_enforce_tls = no
80 smtpd_tls_auth_only = no
82 smtpd_error_sleep_time = 1s
83 smtpd_soft_error_limit = 10
84 smtpd_hard_error_limit = 20
86 # http://www.mailscanner.info
87 header_checks = regexp:/etc/postfix/header_checks
88 body_checks surf to http://www.malware.com.br
92 ''' /etc/postfix/header_checks '''
96 /^X-Spam-Level: (\*){8,}/ REDIRECT sa-spam
101 base_dir = /var/run/dovecot/
102 #log_path = /var/log/dovecot.log
105 verbose_proctitle = yes
106 #first_valid_uid = 3000
107 #last_valid_uid = 3000
110 #valid_chroot_dirs = /var/mail
111 mail_location = maildir:~/Maildir
112 maildir_copy_with_hardlinks = yes
122 path = /var/run/dovecot/auth-master
127 mechanisms = plain login
131 args = uid=vmail gid=vmail home=/srv/vmail/%u
136 postmaster_address = host@example.net
140 ''' addmailuser.sh '''
144 echo "usage: $0 <newusername>"
147 maildirmake /srv/vmail/$1/Maildir
148 chown vmail:vmail /srv/vmail/$1 -R
150 htpasswd /etc/dovecot/dovecot.passwd $1
153 ''' pam.d/dovecot '''
155 aptitude install libpam_pwdfile
160 auth required pam_pwdfile.so pwdfile=/etc/dovecot/dovecot.passwd debug
162 session sufficient pam_permit.so
163 account sufficient pam_permit.so
165 #@include common-auth
166 #@include common-account
167 #@include common-session
171 aptitude install policyd-weight
174 [[http://rikman.mtb-news.de/archives/2005/12/13/postgrey-unter-debian-einrichten/|postgrey-unter-debian-einrichten]]
176 [[http://packages.debian.org/etch/mailscanner|MailScanner Debian-package]]
178 [[http://www.delodder.be/index.php/2007/10/18/mailscanner-with-postfix-on-etch/#more-86|MailScanner With Postfix on Etch]]
180 [[http://www.delodder.be/index.php/2007/10/22/add-anti-virus-support-to-mailscanner/#more-88|Add Anti-Virus support to MailScanner]]
184 Um noch den Usern zu ermöglichen ihre Mails über den Server zu relayen sollte man eine SMTP Authentifizierung benutzen. Falls die Clients statisce IPs besitzen kann man diese natürlich auch in der main.cf unter my_networks eintragen. Wie eine mögliche SMTP Auth ausehen kann findet sich unter [[LittleMailserverSMTP]]
187 CategoryCodeSnippets CategoryTipsAndTricks