Postfix Config

Hello everyone, need some help here please.

I am at the point that I am able to send test messages with the following:

telnet localhost 25
some test
Subject: Just a test</></> 

when attempting:

root@li369-146:~# telnet 25
Connected to
Escape character is '^]'.
220 ESMTP Postfix (Debian/GNU)
MAIL FROM: <>250 2.1.0 Ok
RCPT TO: <>554 5.7.1 <>: Relay access denied</></></> 

which setting(s) should I be looking at for this? The file contains:

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

append_dot_mydomain = no

readme_directory = no

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname =
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination =,, , localhost
relayhost = 
mynetworks =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

Thanks for your thoughts!

2 Replies

You are attempting to send mail to and your mail server is rightfully denying you as you are just another user to it. You need to look into SASL.

Have a look at … 0.04-lucid"> to get you started

No, from his command-line he is obviously ON the machine. It should allow relaying from its own source IPs and should not require authentication via SASL.

First, clean up your mydestination line:

mydestination =,, , localhost 

get rid of the extra comma-space before localhost.

Second, I see you are forging the from address in the envelope – do you have a smtpdsenderrestrictions parameter configured? If so, please provide that line from your as well, although I would expect a different error if that was the cause.

Do you really want to be allowing relaying from 16 IPs?

> mynetworks =

If not, change the /28 to a /32 for just your .146 IP.

What is your mydomain parameter defined as?

As a test, try commenting out your mynetworks parameter and replace it with a mynetworks_style, restart, and test. That should tell you if it's related to your network declaration:

mynetworks = blah

mynetworks_style = host

Is this all of your Please provide output of 'postconf -n'.


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct