Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable SMTPS per RFC 8314 #564

Open
almereyda opened this issue Jul 19, 2024 · 0 comments
Open

Enable SMTPS per RFC 8314 #564

almereyda opened this issue Jul 19, 2024 · 0 comments

Comments

@almereyda
Copy link
Contributor

almereyda commented Jul 19, 2024

Impacted versions

all

Steps to reproduce

  1. Read RFC 8314
  2. Find the unconfigured SMTPS port in
    #smtps inet n - - - - smtpd
    # -o syslog_name=postfix/smtps
    # -o smtpd_tls_wrappermode=yes
    # -o smtpd_sasl_auth_enable=yes
    # -o smtpd_reject_unlisted_recipient=no
    # -o smtpd_client_restrictions=$mua_client_restrictions
    # -o smtpd_helo_restrictions=$mua_helo_restrictions
    # -o smtpd_sender_restrictions=$mua_sender_restrictions
    # -o smtpd_recipient_restrictions=
    # -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
    # -o milter_macro_daemon_name=ORIGINATING

Expected behavior

master.cf

26,28c26,28
<   -o smtpd_client_restrictions=permit_sasl_authenticated,reject
<   -o smtpd_helo_restrictions=
<   -o smtpd_sender_restrictions=reject_sender_login_mismatch
---
>   -o smtpd_client_restrictions=$mua_client_restrictions
>   -o smtpd_helo_restrictions=$mua_helo_restrictions
>   -o smtpd_sender_restrictions=$mua_sender_restrictions
31,38c31,39
< #smtps     inet  n       -       -       -       -       smtpd
< #  -o syslog_name=postfix/smtps
< #  -o smtpd_tls_wrappermode=yes
< #  -o smtpd_sasl_auth_enable=yes
< #  -o smtpd_reject_unlisted_recipient=no
< #  -o smtpd_client_restrictions=$mua_client_restrictions
< #  -o smtpd_helo_restrictions=$mua_helo_restrictions
< #  -o smtpd_sender_restrictions=$mua_sender_restrictions
---
> smtps     inet  n       -       -       -       -       smtpd
>   -o syslog_name=postfix/smtps
>   -o tls_preempt_cipherlist=yes
>   -o smtpd_tls_wrappermode=yes
>   -o smtpd_sasl_auth_enable=yes
>   -o smtpd_reject_unlisted_recipient=no
>   -o smtpd_client_restrictions=$mua_client_restrictions
>   -o smtpd_helo_restrictions=$mua_helo_restrictions
>   -o smtpd_sender_restrictions=$mua_sender_restrictions
41c42,43
< #  -o milter_macro_daemon_name=ORIGINATING
---
>   -o milter_macro_daemon_name=ORIGINATING
>   -o smtpd_proxy_filter=inet:[127.0.0.1]:10026
153c155
<         -o local_header_rewrite_clients=
---
>         -o local_header_rewrite_clients=permit_mynetworks,permit_sasl_authenticated

main.cf, between ## Recipient restriction rules and ## Postscreen settings

# Sender restriction rules
smtpd_sender_restrictions =
    permit_mynetworks
    reject_non_fqdn_sender
    reject_unknown_sender_domain
    reject_unknown_reverse_client_hostname

# Relay restriction rules
smtpd_relay_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination

# Custom restriction classes
smtpd_restriction_classes =
    mua_sender_restrictions
    mua_client_restrictions
    mua_helo_restrictions

mua_client_restrictions =
    permit_sasl_authenticated
    reject

mua_sender_restrictions =
    permit_sasl_authenticated
    reject_sender_login_mismatch

mua_helo_restrictions =
    permit_mynetworks
    reject_invalid_hostname
#    reject_non_fqdn_hostname

We're running this configuration quite stable since a few years. It has not been audited for security.

Also note the commented reject_non_fqdn_hostname rule, which hasn't affected us badly, yet. Also smtpd_recipient_restrictions and smtpd_relay_restrictions from the commented smtps part in master.cf remain untouched, to mirror the given submission configuration.

There's more discussion in the thread at https://discord.com/channels/930814728928895078/1203376038793584720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant