Relay access denied and need fully-qualified hostname

senzacionale asked:

Jul 15 20:33:32 ubuntu-server postfix/smtpd[2294]: connect from cpe-90-157-232-208.static.amis.net[90.157.232.208]
Jul 15 20:33:32 ubuntu-server postfix/smtpd[2294]: NOQUEUE: reject_warning: RCPT from cpe-90-157-232-208.static.amis.net[90.157.232.208]: 504 5.5.2 <MitjaBNotebok>: Helo command rejected: need fully-qualified hostname; from=<webmaster@agadomarketing.com> to=<mitja_agad@gmail.com> proto=ESMTP helo=<MitjaBNotebok>
Jul 15 20:33:32 ubuntu-server postfix/smtpd[2294]: NOQUEUE: reject: RCPT from cpe-90-157-232-208.static.amis.net[90.157.232.208]: 554 5.7.1 <mitja_agado@gmail.com>: Relay access denied; from=<webmaster@agadomarketing.com> to=<mitja.bombac@gmail.com> proto=ESMTP helo=<MitjaBNotebok>
Jul 15 20:33:35 ubuntu-server postfix/smtpd[2294]: disconnect from cpe-90-157-232-208.static.amis.net[90.157.232.208]

my /etc/hosts

127.0.0.1       localhost
127.0.1.1       ubuntu-server.agadomarketing.com        ubuntu-server

why i always get this error when sending mail from client?

My answer:


It looks like you’re trying to log in to your own mail server to send outgoing mail.

To do this securely and properly, you need to set up SMTP authentication for Postfix. This is a non-trivial task, but the Postfix docs should get you started.

Once set up properly, you will connect to your mail server on port 587 (instead of 25), authenticate to it with your username and password, and your mail will go through.

The benefit of this is that when you have SMTP authentication set up, authenticated users do not have to deal with the usual restrictions of having an IP address with a reverse DNS entry or a fully qualified hostname or the other restrictions that mail servers impose for security reasons.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.