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.
> 
> I get the following error in logs and a return mail from smtpd to sender:
> 
> > 
> > I'm sorry to have to inform you that your message could not
> > be delivered to one or more recipients.
> > 
> > 
> > <nos...@domain.tld>: host mx.domain.tld[xxx.xxx.xxx.xxx] said: 550 Invalid
> >    recipient: <nos...@domain.tld> (in reply to RCPT TO command)
> > Reporting-MTA: dns; st43p00im-zteg10071901.me.com
> > X-Postfix-Queue-ID: 4E253D8138E
> > X-Postfix-Sender: rfc822; sen...@domain2.tld
> > Arrival-Date: Sat, 24 Aug 2019 10:24:30 +0000 (UTC)
> > 
> > Final-Recipient: rfc822;nos...@domain.tld
> > Original-Recipient: rfc822;nos...@domain.tld
> > Action: failed
> > Status: 5.0.0
> > Remote-MTA: dns; mx.domain.tld
> > Diagnostic-Code: smtp; 550 Invalid recipient: <nos...@domain.tld>
> > 
> > From: <sen...@domain2.tld>
> > Subject: Fwd: Undelivered Mail Returned to Sender
> > Date: 24 August 2019 at 12:24:27 GMT+2
> > To: nos...@domain.tld
> > 
> 
> 
> 
> 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

I'm not sure this will work. I'm not sure you can map a virtual user to 
a single system user with multiple `homes'.

maybe try:

webmaster       9999:9999:/home/domain/mail/master

and see if that gets you further.

> ## EOF
> 
> # file:/etc/mail/domain.sub.smtpd.conf
> =============================
> 
> > ## =====================
> > ## DOMAIN CONFIGURATION:
> > ## =====================
> > # TABLE DECLARATIONS:
> > # -------------------
> > 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                 \ 

Seems like expand-only should work with `virtual' aliases, but I'm not sure.
Maybe remove it and see what happens.

> >         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
> > 
> > 
> 

Hope this helps.

Edgar

Reply via email to