1

we've followed the guide HERE to configure a Postfix. After sending a message via telnet we receive the following error:

Oct  8 18:52:01 mail postfix/smtpd[3719]: connect from unknown[10.10.10.9]
Oct  8 18:52:01 mail postfix/smtpd[3719]: warning: smtpd_client_event_limit_exceptions: non-null host address bits in "10.10.10.5/22", perhaps you should use "10.10.8.0/22" instead
Oct  8 18:52:02 mail postfix/smtpd[3719]: warning: mynetworks: non-null host address bits in "10.10.10.5/22", perhaps you should use "10.10.8.0/22" instead
Oct  8 18:52:02 mail postfix/smtpd[3719]: NOQUEUE: reject: RCPT from unknown[10.10.10.9]: 451 4.3.0 <admin@acme.org>: Temporary lookup failure; from=<ArchivematicaSystem@archivematica.org> to=<admin@acme.org> proto=ESMTP helo=<UBUNTUSRV-16-ARCHIVEMATICA>
Oct  8 18:52:02 mail postfix/smtpd[3719]: warning: smtpd_client_event_limit_exceptions: non-null host address bits in "10.10.10.5/22", perhaps you should use "10.10.8.0/22" instead
Oct  8 18:52:02 mail postfix/smtpd[3719]: lost connection after RSET from unknown[10.10.10.9]
Oct  8 18:52:02 mail postfix/smtpd[3719]: disconnect from unknown[10.10.10.9] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 commands=4/5

Following the main.cf content:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
# 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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = mail.myDomain.com
mydomain = myDomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
#myorigin = /etc/mailname
myorigin = $mydomain
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost
relayhost = 
mynetworks = 127.0.0.0/8, 10.10.10.5/22
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
#inet_protocols = all
inet_protocols = ipv4
home_mailbox = Maildir/
# SMTP-Auth settings
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject

Any help is appreciated

Thanks Simone

  • 1
    non-null host address bits in "10.10.10.5/22" your ip/netmask looks wrong. – Dennis Nolte Oct 9 '18 at 15:56
  • @Dennis Nolte that is the static IP assigned to the host – Simone Ceccolini Oct 10 '18 at 7:46
  • I've also added the ip from which I am trying to send the email. From the local smtp the sending is ok, from outside it's not working – Simone Ceccolini Oct 10 '18 at 9:18
  • what ip should be allowed? 10.10.10.5 or the network 10.10.10.4/22? cause the network 10.10.10.5/22 still looks wrong/invalid. subnet-calculator.com/subnet.php?net_class=A see the documentation here> postfix.org/postconf.5.html examples: mynetworks = 127.0.0.0/8 168.100.189.0/28 mynetworks = !192.168.0.1, 192.168.0.0/28 mynetworks = 127.0.0.0/8 168.100.189.0/28 [::1]/128 [2001:240:587::]/64 looks like you should give it a netmask, not an IP if you give the subnetbits. This is exactly the message the logs give you. – Dennis Nolte Oct 15 '18 at 11:17
0

for those who will face the same issue, I found this good article:

https://support.plesk.com/hc/en-us/articles/115003578873-Mail-service-is-not-available-non-null-host-address-bits-in-IP-address

I've enabled the whole subnet segment by setting the *0/24 in the 'mynetworks' parameters as reference to the host which is using the smtp

Thanks Simone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.