NOQUEUE: reject: RCPT 454

0

I can not get my webscript working sending out e-mails with postfix, while sending e-mails via local mail software works well.

Here's the output when the webscript is sending an e-mail:

Mar 24 11:34:50 rs2222333 postfix/smtpd[8478]: connect from rs2222333.rs.hostprovider.com[::1]
Mar 24 11:34:50 rs2222333 postfix/smtpd[8478]: NOQUEUE: reject: RCPT from rs2222333.rs.hostprovider.com[::1]: 454 4.7.1 <receiver@somedomain.com>: Relay access denied; from=<info@mydomain.com> to=<receiver@somedomain.com> proto=ESMTP helo=<localhost>
Mar 24 11:34:50 rs2222333 postfix/smtpd[8478]: disconnect from rs2222333.rs.hostprovider.com[::1]

I found only confusing or misleading answers on the internet regarding the 454 error, so I am stuck on this error message. Also strange for me, why the automatic given hostname rs2222333.rs.hostprovider.com still appears in the error message, even I changed the hostname already, also in /etc/postfix/main.cf. Restarting postfix didn't help.

Is this normal? Would be nice if you could help understanding this 454 error to lead me to the right direction to fix it.

lickmycode

Posted 2017-03-24T11:08:45.727

Reputation: 101

Answers

0

You need to make sure that you have either mynetworks or mynetworks_style set the way you're expecting, defining which hosts can send mail unauthenticated. (If it's just the local system, then mynetworks_style = host should work fine.)

Then, make sure that you have permit_mynetworks listed in an appropriate place in smtpd_relay_restrictions and/or smtpd_recipient_restrictions depending on your postfix version, allowing for you to relay messages out. You need to ensure that it's specified before reject_unauth_destination which will reject any message that your server isn't the destination for.

Usually, the defaults for these would work they way you're expecting, so I'm guessing one of them isn't the default value, and is set to block your outgoing email from localhost.

user169501

Posted 2017-03-24T11:08:45.727

Reputation: