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
MAIL FROM: <test@test.net>RCPT TO: <my_email@gmail.com>DATA
some test
.
Subject: Just a test</my_email@gmail.com></test@test.net> 

when attempting:

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

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

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

append_dot_mydomain = no

readme_directory = no

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

myhostname = fms.csr-az.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = fms.csr-az.com, localhost.csr-az.com, , localhost
relayhost = 
mynetworks = 127.0.0.0/8 96.126.120.146/28
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

Thanks for your thoughts!

2 Replies

You are attempting to send mail to gmail.com 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 http://library.linode.com/email/postfix … 0.04-lucid">http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.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 = fms.csr-az.com, localhost.csr-az.com, , 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 main.cf 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 = 127.0.0.0/8 96.126.120.146/28

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 main.cf? Please provide output of 'postconf -n'.

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct