On Thu, 14 Apr 2022, [email protected] wrote:

I'm not active these days, but waking up because this thread is getting out of 
hands :-)



Thank you very much - this worked, but I have a follow-up clarification below ...



My goal is to add exactly one catchall rule and keep my config simple inside 
smtpd.conf without
dealing with virtual users and virtusertable, etc.


what you want is:

   action "catchall" mbox virtual { "@" = username }

   match from any for any action "catchall"


OK, this worked. However, I originally had my 'match' rules in this order:


    match tag DKIM for any action "outbound"
    match from any for domain "domain.com" action "local_mail"
    match from any for any action "catchall"
    match from any auth for any action "outbound"
    match for local action "local_mail"
    match for any action "relay_dkim"


... and it failed ... [email protected] produced 550 Invalid recipient.

So I changed the order to:


    match tag DKIM for any action "outbound"
    match from any for any action "catchall"
    match from any for domain "domain.com" action "local_mail"
    match from any auth for any action "outbound"
    match for local action "local_mail"
    match for any action "relay_dkim"


... and it works as expected - again, thank you.


Two follow-up questions:


1) Am I still using my aliases that are defined in:

table aliases file:/usr/local/etc/mail/aliases
action "local_mail" mbox alias <aliases>

... or are those superceded now by the catchall ?


2) Are any of my 'match' rules in that list redundant/unnecessary now that the catchall rule is match #2 ?


Thanks.



Reply via email to