1

I am running a Debian Jessie 8.1 server with a functioning postfix, dovecot, and suirrelmail/rainloop. I have multiple domains on the server. The main server domain is set via example.com.vhost because it is configured with ispconfig3. However, each additional domain is configured through /etc/apache2/sites-available/another.com.conf

I have configured the main domain to serve as a catch-all by editing /etc/postfix/virtual with:

@example.com myuser
info@example.com  info

Then I update postifx with:

nano /etc/postfix/main.cf
virtual_alias_maps = hash:/etc/postfix/virtual
postmap /etc/postfix/virtual
service postfix reload

Question is, as I have said, there are other virtual domains on the server. How can I make them all catch-all to their respective info@another.com or at least to the main info@example.com email?

I did try adding to /etc/postfix/virtual something like @another.com info but it did not help. Any other suggestions?

  • Did you run postmap on /etc/postfix/virtual after changing it? – tarleb Jan 3 '16 at 19:21
  • Yes, i did. It should work in that way? – KingsInnerSoul Jan 3 '16 at 19:21
  • Sound right to me, but I'm not familiar with ispconfig and don't know how it interacts with postfix. What's the output of postconf mydestination? (feel free to censor for additional privacy) – tarleb Jan 3 '16 at 19:41
  • 1
    Try adding your other domains to the virtual_alias_domains parameter and reload postfix. You may have to remove your example.com domain from mydestination. – tarleb Jan 3 '16 at 20:19
  • 1
    @tarleb, thanks that was it. I was missing virtual_alias_domains. Once I added it, restarted/reloaded postfix it worked. Any idea how to configure catch-all for all the virtual domains in a single line? – KingsInnerSoul Jan 3 '16 at 20:32
1

There are two ways to fix this:

  1. Add mappings for all virtual domains to /etc/postfix/virtual. Postfix will accept a message if any entry in that file matches.

  2. Setting virtual_alias_domains to the list of other domains you want to receive mail for. You can then use a regexp table virtual_alias_maps = pcre:/etc/postfix/virtual.pcre where the latter contains something like /.*/ info.

Beware: This is untested.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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