4
votes

I am trying to send mail from centos using postfix and rails but I am getting error as

Nov 16 18:14:15 li664-186 postfix/smtpd[5477]: connect from localhost[::1]
Nov 16 18:14:15 li664-186 postfix/smtpd[5477]: NOQUEUE: reject: RCPT from localhost[::1]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<localhost.localdomain>
Nov 16 18:14:15 li664-186 postfix/smtpd[5477]: disconnect from localhost[::1]

Here is my main.cf

queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

mail_owner = postfix

myhostname = host.my-domain.com
#myhostname = virtual.domain.tld

#mydomain = domain.tld
mydomain = my-domain.com

#myorigin = $myhostname
myorigin = $mydomain

inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost

# Enable IPv4, and IPv6 if supported
inet_protocols = all

#proxy_interfaces =
#proxy_interfaces = 1.2.3.4


newaliases_path = /usr/bin/newaliases.postfix

mailq_path = /usr/bin/mailq.postfix

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.6.6/samples

readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES

I have removed all the commented line from main.cf file. Whether I have to configure any other files to send mail from my server

1
Instead of hand-editing the main.cf contents, please post the output from postconf -n to show the actual settings as Postfix sees them. - Magnus Bäck
@Seting Let me know the mynetwok entry? - Jeff

1 Answers

0
votes

*postconf -n** output please.

Probably the "mynetworks" parameter doesn't include IPv6 localhost (::1)