hi gIlles, thanks for dropping by. Tried both your methods and it’s still not working. I just duplicated the entry for webmaster:uid:gid:mailbox_dir to nospam:uid:gid:mailbox_dir in the <emails> table and it works. For what it’s worth, the setup is opensmtpd and openbsd at 6.5. , Dovecot is the imap server.
Some conjecturing from my part, read at your peril: Resolving many addresses TO one mailbox In my case, all I need to do is drop the mail to the relevant virtual mailbox. Adding another entry in the emails list that resolved to the same mailbox is good enough and it worked. It is however a maintenance nightmare. When the mailbox is deleted or I need to update the system to reflect some organisational change I need to make changes in too many points in the configuration. Not a deal breaker for me. Resolving one address TO many mailboxes and relays Correct me if Im wrong but smtpd shouldn’t care whether it’s an alias when receiving the mail. The alias is just an administrative convenience right? It only needs to check whether there is at least one mailbox for it or if it has to be relayed out to other servers. Having the aliases expand into mailbox references when the <virtual aliases> table is parsed would be enough for me. Maybe the alias tuples in the <mailboxes> table could be flagged as aliases for the [expand-only] directive. Is there a use case for the [expand-only] directive? Should an envelope that doesn’t resolve to a mailbox or a relay be enqueued even though it matches an entry in the <virtual_aliases> table? regards Joe > On 25 Aug 2019, at 03:56, Gilles Chehade <[email protected]> wrote: > > On Sat, Aug 24, 2019 at 04:14:21PM +0200, Joseph A Borg wrote: >> I???m trying to match an email: [email protected] to expand to >> [email protected] 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 [email protected] >> ## EOF >> >> # file:/etc/mail/domain.tld/accounts/emails >> ================================ >>> [email protected] 9999:9999:/home/domain/mail/master >>> [email protected] 9999:9999:/home/domain/mail/duster >>> [email protected] 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 [email protected] > [email protected] 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
