Symptoms
- Unable to send emails from a server running Postfix.
- The following errors appear in
:
/var/log/maillog
mail postfix/smtpd[19055]: fatal: non-null host address bits in "203.0.113.2/24", perhaps you should use "203.0.113.0/24" instead
mail postfix/smtpd[19055]: NOQUEUE: reject: RCPT from server[203.0.113.4]: 451 4.3.0 <server[203.0.113.4]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mail.example.com>
Cause
Incorrect configuration of Postfix
file.
main.cf
Resolution
-
Connect to the server via SSH;
Note: if direct SSH access to the server is not possible, contact server administrator for further assistance.
-
Check Postfix configuration file:
# grep -w mynetworks /etc/postfix/main.cf | grep -v “#”
mynetworks = 127.0.0.0/8, [::1]/128, 203.0.113.2/24 -
Change the
value to
203.0.113.2./24
or
203.0.113.2/32
, if it is required to allow send emails from whole subnet segment.
203.0.113.0/24 -
Restart postfix:
# service postfix restart