0

I'm using:

# cat /etc/*release
CentOS release 6.3 (Final)

# rpm -qa | grep post
postfix-2.6.6-2.2.el6_1.x86_64

on 2 servers: preferans.de and (yes, funny name) static.103.78.9.176.clients.your-server.de

I own several domains and would like all incoming mails addressing those domains to be forwarded to my Gmail address.

So I have setup the MX-records for my domains:

# host videoskat.de
videoskat.de has address 176.9.40.169
videoskat.de mail is handled by 100 static.103.78.9.176.clients.your-server.de.
videoskat.de mail is handled by 10 preferans.de.

# host balkan-preferans.de
balkan-preferans.de has address 176.9.40.169
balkan-preferans.de mail is handled by 100
static.103.78.9.176.clients.your-server.de.
balkan-preferans.de mail is handled by 10 preferans.de.

And at the both servers I have added:

# head /etc/postfix/virtual
@balkan-preferans.de First.Last@gmail.com
@videoskat.de First.Last@gmail.com

# postmap /etc/postfix/virtual

# postmap -q "@videoskat.de" /etc/postfix/virtual
First.Last@gmail.com

And have opened port 25 in the firewall:

# grep -w 25 /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports 25,22 -j ACCEPT

But now when I send a mail to spam@videoskat.de there is nothing to see in postfix logs:

# sudo tail /var/log/maillog
Jan 15 10:50:42 postfix/postfix-script[1401]: starting the Postfix mail system
Jan 15 10:50:42 postfix/master[1402]: daemon started -- version 2.6.6,
configuration /etc/postfix

So I'm probably missing something minor?

BTW the daily logwatch mails arrive from both servers just fine at my Gmail-inbox First.Last@gmail.com

UPDATE 2:

I've added these 2 lines to /etc/postfix/main.cf

inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, videoskat.de, balkan-preferans.de

and now I see incoming connections in /var/log/maillog, but they are rejected:

postfix/smtpd[3209]: NOQUEUE: reject: RCPT from static.114.69.9.176.clients.your-server.de[176.9.69.114]: 550 5.1.1 <test6@videoskat.de>: Recipient address rejected: User unknown in local recipient table; from=<afarber@preferans.de> to=<test6@videoskat.de> proto=ESMTP helo=<www>
postfix/smtpd[3209]: disconnect from static.114.69.9.176.clients.your-server.de[176.9.69.114]

The postconf -n output is below

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, videoskat.de, balkan-preferans.de
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

What does User unknown in local recipient table mean in the reject log message?

Alexander Farber
  • 714
  • 4
  • 17
  • 38

1 Answers1

1

If there is nothing in the mail log, then no mail was sent to your server.

The MX records you show mean that as long as preferans.de is responding to mail, the second MX will never be used.

Please include the output of postconf -n with your post, so we know what you're talking about.

What does User unknown in local recipient table mean in the reject log message?

As documented, postfix by default rejects mail for unknown local recipients. You should define any valid recipients beforehand.

Since your main.cf lacks a virtual_alias_maps entry, your virtual file is not used; add the following to main.cf and reload:

virtual_alias_maps = /etc/postfix/virtual
adaptr
  • 16,576
  • 23
  • 34