0

On my last server i could send smtp automatic emails on port 25 but after migrating the server on virtualmin install, i can't make it work

Here's the old working postfix config

myhostname = ##REVERSE_DNS_IPV4##
myorigin = ##REVERSE_DNS_IPV4##
mydestination = localhost.localdomain, localhost, ##REVERSE_DNS_IPV4##
relayhost =
mynetworks = 127.0.0.0/8, ##IPV4_PUBLIQUE_SERVEUR##
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_aliases.cf,mysql:/etc/postfix/mysql-virtual_aliases_comptes.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domaines.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_comptes.cf
virtual_mailbox_base = /var/spool/vmail/
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000

virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = mysql:/etc/postfix/mysql-virtual_quotas.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "La boite mail de votre destinataire est pleine, merci de reessayez plus tard."
virtual_overquota_bounce = yes


# adresses d'expedition
smtpd_sender_restrictions =
        permit_mynetworks,
        warn_if_reject reject_unverified_sender

# adresses de destination
smtpd_recipient_restrictions =
        permit_mynetworks,
        reject_unauth_destination,
        reject_non_fqdn_recipient

# client
smtpd_client_restrictions =
        permit_mynetworks

Here is the current not working configuration

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
append_dot_mydomain = no
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
# 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
myhostname = vsweb03.help-amor.be
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = 7dd18f2b56a5, vsweb03.help-amor.be, localhost.help-amor.be, loc$
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reje$
allow_percent_hack = no
sender_dependent_default_transport_maps = hash:/etc/postfix/dependent
inet_protocols = ipv4

I must that the old configuration allowed php mail function, impa/pop/smtp emails and django with no user smtp automatic emails

The new one allow everything except django with no user on port 25 automatic smtp emails.

DOes somebody know which directive i need to modify?

Un big thank you to any help

Jul6art
  • 219
  • 3
  • 14

1 Answers1

0

Ok i found the problem,

I just add this and it works with smtp non auth user on port 25

smtpd_sender_restrictions =
        permit_mynetworks,
        warn_if_reject
Jul6art
  • 219
  • 3
  • 14