I have a working OpenSMTPD configuration that I am happy with.
I do not have a virtuser file and I do not reference "domain_mail" or virtual anywhere in my config file, which is here:
table aliases file:/usr/local/etc/mail/aliases
filter check_dyndns phase connect match rdns regex { '.*\.dyn\..*', '.*\.dsl\..*' } \
disconnect "550 no residential connections"
filter check_rdns phase connect match !rdns \
disconnect "550 no rDNS"
filter check_fcrdns phase connect match !fcrdns \
disconnect "550 no FCrDNS"
listen on 100.150.200.135 port 10028 tag DKIM
listen on 100.150.200.135 filter \
{ check_dyndns, check_rdns, check_fcrdns }
listen on 100.150.200.135 port submission
action "local_mail" mbox alias <aliases>
action "relay_dkim" relay host smtp+notls://100.150.200.135:10027
action "outbound" relay helo mail.example.com
match tag DKIM for any action "outbound"
match from any for domain "example.com" action "local_mail"
match from any auth for any action "outbound"
match for local action "local_mail"
match for any action "relay_dkim"
Again, everything works great and I am happy - I just want to add a catchall address so that emails to [email protected] can be directed into a mailbox.
I thought this would be a five minute fix - just add a line like this:
@ catchall
... to my aliases file and be done. BUT, opensmtpd does not allow something simple and convenient like that - you cannot use the '@' catchall in the aliases file even though that would be very simple and safe and help many use-cases.
Instead, it looks like I need to put the '@' rule in a virtusertable and add all of that complexity to my (nice and simple) opensmtpd conf file.
Two hours later I have not succeeded.
I don't understand how to make aliases and virtuals work together and I don't understand why I would rip out all of my working aliases and move them to virtuals but I also can't get the two of them to coexist nicely.
So the question is:
IF ALL I want out of virtual users is just that simple '@' catchall, is it possible to specify just that simple rule, by itself, inside the opensmtpd config file without adding in all of the virtual action/match logic and maintaining a second mapping table in addition to the aliases file I already have ?
Thank you.