Postfix is delivering all mail to 1@domain.tld

-1

I am attempting to email an address on my own box (username@domain.tld), and postfix is attempting to deliver to 1@domain.tld - the username is replaced with the number 1. This message is included in mailer-daemon's response:

<1@domain.tld> (expanded from <user@domain.tld>): host mail.domain.tld[private/dovecot-lmtp] said: 550 5.1.1 <1@domain.tld> User doesn't exist: 1@domain.tld (in reply to RCPT TO command)

Searching the mail log, the first result that refers to 1@domain.tld is this:

Oct 19 13:41:44 servername postfix/lmtp[16232]: A547EC29C2: to=<1@domain.tld>, orig_to=<username@domain.tld>, relay=mail.domain.tld[private/dovecot-lmtp], delay=0.19, delays=0.16/0.01/0.01/0.02, dsn=5.1.1, status=bounced (host mail.domain.tld[private/dovecot-lmtp] said: 550 5.1.1 <1@domain.tld> User doesn't exist: 1@domain.tld (in reply to RCPT TO command))

username@domain.tld exists, and can send mail outwards. 1@domain.tld does not exist, obviously.

So why is Postfix repeatedly delivering all mail to 1@domain.tld?

sgfit

Posted 2016-10-19T16:37:46.927

Reputation: 99

Answers

0

Running doveconf -n to verify the confirmation revealed the following line:

virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf, mysql:/etc/postfix/mysql-virtual-email2email.cf

Checking /etc/postfix/mysql-virtual-email2email.cf revealed the actual error:

query = SELECT 1 FROM virtual_users WHERE email='%s'

So, after carefully searching the database, it would select the number 1, for any user where the email was the given address. To fix this, change 1 in the query to the actual proper column name your table uses.

sgfit

Posted 2016-10-19T16:37:46.927

Reputation: 99