You are not logged in.

#1 2014-08-26 00:46:05

lexan
Member
Registered: 2011-06-15
Posts: 45

Postfix mail server: send mail to non-local recipients

I can receive mail in my spool from hosted virtual accounts such as gmail, but when I try to send mail out, I get: 550 5.1.1 error: recipient address rejected: Local delivery only!

Below are my main.cf and master.cf stripped of comments.

## main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/bin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = mydomain.tld
mydomain = mydomain.tld
myorigin = $myhostname
mydestination = $myhostname, localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks_style = host
relay_domains = $mydestination
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps
home_mailbox = Maildir/
 
mailbox_command = /usr/bin/procmail -a "$DOMAIN"
  
debug_peer_level = 2
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/bin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /etc/postfix/sample
readme_directory = /usr/share/doc/postfix
inet_protocols = ipv4
append_dot_mydomain = no
default_transport = error: Local delivery only!
mailbox_size_limit = 51200000
message_size_limit = 10240000
## master.cf

smtp      inet  n       -       y       -       -       smtpd
submission inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
pickup    unix  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      unix  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
relay     unix  -       -       n       -       -       smtp
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache

Offline

#2 2014-09-01 07:43:24

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Postfix mail server: send mail to non-local recipients

Your issue is this one in main.cf:

default_transport = error: Local delivery only!

Change it to

default_transport = smtp

Offline

#3 2014-09-02 03:09:30

lexan
Member
Registered: 2011-06-15
Posts: 45

Re: Postfix mail server: send mail to non-local recipients

teekay wrote:

Your issue is this one in main.cf:

default_transport = error: Local delivery only!

Change it to

default_transport = smtp

Thanks for that.
That fixes the 550 error.

Now I'm getting 451 error <email@domainname.tld>: Temporary lookup failure when I use telnet after entering a "rcpt" address.

Would that mean my mysql databases are incorrect? I don't think those should matter at this point.

Last edited by lexan (2014-09-02 03:10:17)

Offline

#4 2014-09-02 14:40:12

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: Postfix mail server: send mail to non-local recipients

Looking at the config you posted, you're not using mysql at all.

The error means that the rcpt adress cannot be resolved (either because it doesn't exist, or because there's a network issue).

Offline

Board footer

Powered by FluxBB