commit 89ef9981d4d5c87bb55d4ab98b73633d04967bf5 from: gonzalo date: Fri Oct 19 11:36:42 2018 UTC Making smtpd.conf great again, with the new syntax, while here I added an example for people like me, with neomutt running on the same mailserver as a mail client, making the login over lo0 possible. Super Hipster right? Fuck you GMAIL. commit - 59b0dd8d0c7eff4a86d0e8ac30fb71f9b4a9e54e commit + 89ef9981d4d5c87bb55d4ab98b73633d04967bf5 blob - 7f31f7f9523fdd624a4fdf20faf5e28401ce0ed9 blob + a8abe496ed1b102ba46146ce7464c75c28215920 --- templates/smtpd.conf.j2 +++ templates/smtpd.conf.j2 @@ -1,8 +1,3 @@ -set queue compression - -set bounce warn-interval 1h, 6h, 2d -set queue ttl 3d - ## PKI pki {{ domain }} cert "/etc/ssl/{{ domain }}_fullchain.pem" pki {{ domain }} key "/etc/ssl/private/{{ domain }}_private.pem" @@ -19,25 +14,31 @@ set smtp max-message-size 50M ## Ports listen on lo0 -listen on lo0 port 10028 tag DKIM_OUT -listen on egress port 25 tls pki {{ domain }} -listen on egress port 587 tls-require pki {{ domain }} auth +listen on egress tls pki {{ domain }} hostname \ + {{ domain }} +listen on egress smtps pki {{ domain }} hostname \ + {{ domain }} +## If you use neomutt as a client +## on the same server as me you need +## this rule +listen on lo0 port submission tls-require pki {{ domain }} \ + hostname {{ domain }} auth +## +listen on egress port submission tls-require pki {{ domain }} \ + hostname {{ domain }} auth +action "mda_with_aliases" mda \ + "/usr/local/bin/rspamc --mime -e '/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest}'" \ + alias user vmail + action "mda_with_virtuals" mda \ - "/usr/local/bin/rspamc --mime --exec '/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest}'" \ + "/usr/local/bin/rspamc --mime -e '/usr/local/libexec/dovecot/dovecot-lda -f %{sender} -d %{dest}'" \ virtual user vmail -action "relay" relay helo {{ domain }} -action "dkim" relay host smtp://127.0.0.1:10027 -## Block spammers -match from any mail-from for domain reject +action "relay" relay -# Accept mail sent from local server to a local account -match from local for local action "mda_with_virtuals" - +match from any mail-from for domain reject +match for local action "mda_with_aliases" match from any for domain action "mda_with_virtuals" - -match tag DKIM_OUT for any action "relay" - -match from local for any action dkim -match auth from any for any action dkim +match from local for any action "relay" +match auth from any for any action "relay"