Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The catch-all works well for existing mailboxes, but not for random mailboxes. What is wrong?

Sending to a non-existing mailbox gives (/etc/log/maillog):

Dec 27 23:09:42 vps40198 postfix/smtpd[18623]: NOQUEUE: reject: RCPT from mail-oa0-f47.google.com[209.85.219.47]: 550 5.1.1 <random@fake.tld>: Recipient address rejected: User unknown in virtual mailbox table; from=<fake@gmail.com> to=<random@fake.tld> proto=ESMTP helo=<mail-oa0-f47.google.com>

My mail server being at fake.tld and random being the non-existing user.

These are the relevant /etc/postfix/*.cf files:

#mysql-domains.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT 1 FROM domain WHERE domain = '%s'

#mysql-email2email.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT username FROM user WHERE username = '%s'

#mysql-forwards.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT dst FROM forward WHERE src = '%s'

#mysql-mailboxes.cf
host = localhost
user = postfix
password = xxxx
dbname = postfix
query = SELECT CONCAT(SUBSTRING_INDEX(username,'@',-1),'/mail/',username,'/') FROM user WHERE username = '%s'

The domain for the user exists in the database.

What is wrong?

EDIT:

I suppose it needs a directory to save its mail to, how would I redirect mail but not save them to disk?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

It appeared I used virtual_mailbox_alias_maps instead of virtual_alias_maps. The former doesn't exist but Postfix didn't complain. No idea how this came to be, maybe some faulty guide or my own mistyping.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.