Hi linuxy peoples of Ottawa and beyond. Bit of a long email...
I've had my postfix server working for a while, and wanted to add a
second domain, and things are not working as I'd hoped.
My initial requirement was to have a catchall, as that was something I'd
used for years with my registrar, and allowed me to ignore organisations
I didn't want to hear from, but with whom I had to register. Also, I
could trace who leaks / sells email addresses.
My registrar quietly discontinued the catchall, so I was motivated to
set up the postfix server. All went well. I was happy with a single
domain. I got dovecot and roundcube working on top of postfix.
I'm looking to find out whether I've made some fundamental mistake that
stops my multi-domain setup working.
Minor semi-tangent. When I decided to add a new domain, the internet
first encouraged me to change
myhostname = mydomain1.com
to
myhostname = mail.mydomain1.com
The justification seemed sort of sensible, but I wonder whether the
faffing was worth it. Is this "correct" or "who cares", given I doubt I
will ever have multiple IP addresses, so don't need to distinguish web
sites from email servers?
This was my working single domain setup
myhostname = mail.domain1.com
mydomain = domain1.com
myorigin = domain1.com
mydestination = localhost, localhost.$mydomain, domain1.com
I'm using linux system accounts, and had administered catchall via
/etc/postfix/virtual
user [ at ] mydomain1 [ dot ] com user
@mydomain1.com user
I decided to add a 2nd domain. It seems that not all domains are equal,
and there has to be a primary domain - there can only be one "myhostname".
My current situation is that mydomain2.com is not working, but I can
catchall emails destined for it, and everything ends up in the
user [ at ] mydomain1 [ dot ] com inbox. So not catastrophic, but not working either.
One step at a time.
postconf -n (heavily snipped)
mydomain = mydomain1.com
mydestination = localhost, localhost.$mydomain, mydomain1.com
myhostname = mail.mydomain1.com
myorigin = mydomain1.com
# opendkim on port 8891, and rspamd on 11332
smtpd_milters = inet:localhost:8891, inet:localhost:11332
virtual_alias_domains = mydomain2.com
virtual_alias_maps = hash:/etc/postfix/virtual
/etc/postfix/virtual contains
user [ at ] mydomain1 [ dot ] com user
user [ at ] mydomain2 [ dot ] com user
user2 [ at ] mydomain2 [ dot ] com user2
@mydomain1.com user
@mydomain2.com user
/etc/postfix/virtual.db is generated
"postalias -q" correctly identifies the system user for the explicitly
listed email addresses, but fails to identify the catchall users.
Catchall works, in so far as everything external is delivered to
user [ at ] mydomain1 [ dot ] com
Is the above a/the correct starting point? If this is good, then at
least I can limit where I create further mess.
The next step seems to be to move mydomain1.com from mydestination to
virtual_alias_domains, but when I did that, all email got bounced, so, I
stopped doing it.
Thank you for your ideas.
Tug
To unsubscribe send a blank message to linux+unsubscribe [ at ] linux-ottawa [ dot ] org
To get help send a blank message to linux+help [ at ] linux-ottawa [ dot ] org
To visit the archives: https://lists.linux-ottawa.org