By chidovi
Hi, we try to build a public postfix mail server on a centos7 machine. all test on the internet give no error. But I could not send or receive email only if i add 0.0.0.0/0 to mynetwork line: mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 160.242.193.8/29 0.0.0.0/0 I know i shouldn’t do that. here my /etc/postfix/main.cf:
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (CentOS) biff = no
append_dot_mydomain = no
#delay_warning_time = 4h
readme_directory = no
smtpd_tls_cert_file=/etc/letsencrypt/live/mymailserver.com/fullchain.pem smtpd_tls_key_file=/etc/letsencrypt/live/mymailserver.com/privkey.pem smtpd_use_tls=yes smtpd_tls_auth_only = yes smtp_tls_security_level = may smtpd_tls_security_level = may smtpd_sasl_security_options = noanonymous, noplaintext smtpd_sasl_tls_security_options = noanonymous
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination smtpd_sender_restrictions = reject_unknown_sender_domain myhostname = mymailserver.com alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases mydomain = mymailserver.com myorigin = $mydomain mydestination = $mydomain, localhost, mail, mail.$mydomain relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 160.242.193.8/29 mailbox_size_limit = 0 recipient_delimiter = + inet_interfaces = all inet_protocols = all
virtual_transport = lmtp:unix:private/dovecot-lmtp
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, mysql:/etc/postfix/mysql-virtual-email2email.cf
please will you help me to solve the issue. Best regards Rachid
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Heya,
Checking the logs, you can see the following errors after some messages:
:25: Connection timed out
port 25 is closed for external use. There are a few ways to go about the problem
To expand more on blocking port 25 for new accounts, this is something DigitalOcean has been doing to reduce spam on it’s network. It is more that we simply cannot accurately determine who is going to send it.
Stopping spam is a constant fight, so DigitalOcean has implemented some restrictions on newer accounts. Having said that, you can always contact them and ask for the port block to be lifted on:
https://www.digitalocean.com/support/
More information here:
https://docs.digitalocean.com/support/why-is-smtp-blocked/
Hope that helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.