On Sat, Aug 24, 2019 at 04:14:21PM +0200, Joseph A Borg wrote:
> I???m trying to match an email: nos...@domain.tld to expand to 
> webmas...@domain.tld and deliver to local mailbox.
> 
> My setup is pretty simple and works well for virtual mailboxes linked to a 
> couple of virtual domains. now I???m trying t add aliases to some accounts.
> 
> From the error, it seems like smtpd is not transforming the alias address 
> into the final address for delivery.
> Seems like I???m not understanding how smtpd transforms an recipient address 
> in an <alias_table> into the actual recipient for delivery.
> 
> I must be conceptually stumped on this one.
>
> [...]
> 
> the configuration files for the domain and tables follows.
> 
>
> # file:/etc/mail/domain.tld/accounts/valiases:
> =================================
> > nospam webmas...@domain.tld
> ## EOF
> 
> # file:/etc/mail/domain.tld/accounts/emails
> ================================
> > webmas...@domain.tld            9999:9999:/home/domain/mail/master
> > webdus...@domain.tld            9999:9999:/home/domain/mail/duster
> > webbus...@domain.tld            9999:9999:/home/domain/mail/buster
> ## EOF
> 

Your problem lies here.

expansion resolves an e-mail address into a user-part, so ultimately
what's looked up in a userbase is the part before '@'

if you're already using a virtual account, why not do something like
this ?

valiases:
==
nospam webmaster

emails:
==
webmaster       9999:9999:/hoome/domain/mail/master


if you really want the indirection, you can even:

nospam                 webmas...@domain.tld
webmas...@domain.tld   webmaster



> # file:/etc/mail/domain.sub.smtpd.conf
> =============================
> 
> > ## =====================
> > ## DOMAIN CONFIGURATION:
> > ## =====================
> > # TABLE DECLATATIONS:
> > # -------------------
> > table domains               \
> >         file:/etc/mail/domain.tld/domains
> > table valiases              \
> >         file:/etc/mail/domain.tld/accounts/valiases
> > table e-boxes               \
> >         file:/etc/mail/domain.tld/accounts/emails
> > 
> > # ACTIONS
> > # -------
> > action valiases_set             \
> >         expand-only                 \
> >         virtual <valiases>
> > action deliver_virtual_set      \
> >         maildir                 \
> >         userbase <e-boxes>
> > 
> > # MATCHES
> > # -------
> > match from any                  \
> >       for domain <domains>      \
> >       action valiases_set
> > match from any                  \
> >       for domain <domains>      \
> >       action deliver_virtual_set
> > 
> > 
> 

-- 
Gilles Chehade                                                 @poolpOrg

https://www.poolp.org            patreon: https://www.patreon.com/gilles

Reply via email to