· 11 years ago · Jun 15, 2015, 10:01 AM
1pki mail.jitter.local certificate "/etc/ssl/mail.jitter.local.crt"
2pki mail.jitter.local key "/etc/ssl/private/mail.jitter.local.key"
3
4pki mail.jitter.eu certificate "/etc/ssl/mail.jitter.eu.crt"
5pki mail.jitter.eu key "/etc/ssl/private/mail.jitter.eu.key"
6
7queue encryption key "singthesongofthecredentialspostedtogithublalala"
8queue compression
9
10expire 6d
11bounce-warn 1h, 1d, 5d
12
13
14# tables
15table aliases "file:/etc/mail/aliases"
16table cred "file:/etc/mail/cred"
17table incoming "file:/etc/mail/incoming"
18
19# blacklist
20table reject_sender "file:/etc/mail/reject_sender"
21
22# what we handle internally
23table d_local { "jitter.local", "*.jitter.local", "jitter.eu", "*.jitter.eu", "interpol8.net", "*.interpol8.net" }
24
25# and from the bad internetz
26table d_final { "jitter.eu", "interpol8.net" }
27
28# have googles
29table d_google { "gmail.com", "googlemail.com", "google.com" }
30
31# have a folder for each
32table sort_recipient { "google@jitter.eu", "billing@jitter.eu", "alert@jitter.eu" }
33
34
35# the dangerous internetz
36listen on lo0 tls hostname mail.jitter.eu pki mail.jitter.eu no-dsn tag "ext"
37
38# the dangerous internet with authentication
39listen on lo0 smtps pki mail.jitter.eu auth <incoming> tag "auth"
40
41# local
42listen on lo1 smtps pki mail.jitter.local auth <incoming> mask-source tag "auth"
43listen on lo1 tls pki mail.jitter.local auth-optional <incoming> tag "int"
44
45
46# blacklist em out
47reject from any sender <reject_sender>
48
49# incoming
50accept tagged "auth" from any for domain <d_local> alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -e -f %{sender} -a %{rcpt} -d %{user.username}"
51accept tagged "ext" from any for any recipient <sort_recipient> alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -e -f %{sender} -a %{rcpt} -d %{user.username} -m INBOX.%{rcpt.user:lowercase|strip}"
52accept tagged "ext" from any for domain <d_final> alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -e -f %{sender} -a %{rcpt} -d %{user.username}"
53accept tagged "int" from any for domain <d_local> alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -e -f %{sender} -a %{rcpt} -d %{user.username} -m INBOX.internal"
54accept from local for local alias <aliases> deliver to mda "/usr/local/libexec/dovecot/dovecot-lda -e -f %{sender} -a %{rcpt} -d %{user.username} -m INBOX.local"
55
56# real ey's
57accept tagged "auth" from any for domain <d_google> relay via tls+auth://tom@smtp.gmail.com as "@gmail.com" auth <cred> hostname "mail.jitter.eu" verify
58accept tagged "auth" from any for ! domain <d_local> relay via tls+auth://ses@email-smtp.eu-west-1.amazonaws.com as "@jitter.eu" auth <cred> hostname "mail.jitter.eu" verify
59
60
61# end