If I understood correctly, you mean that

$ postmap -q '[email protected]' $(postconf -xh virtual_alias_maps)

Should return:

yuko3000,[email protected]

Is that correct?

Does it mean that I need to implement a way to recursively resolve all
aliases (as postfix can not do it)?

Thank you.


On Mon, 26 Jun 2023 at 20:44, Viktor Dukhovni via Postfix-users <
[email protected]> wrote:

> On Mon, Jun 26, 2023 at 04:03:51PM +0900, Alberto Lepe wrote:
>
> > > > I have a mailing list like:
> > > >
> > > > [email protected]:
> > > >         [email protected]
> > > >         [email protected]
> > > >         [email protected]
> > > >         [email protected]
> > >
> > > Post the output of:
> > >
> > >     $ postmap -q '[email protected]' $(postconf -xh
> virtual_alias_maps)
> > >
> >
> > output:  [email protected],peter0000,sam0000,jennifer0000
>
> So the mapping you implemented is not as you suggest, rather, it is:
>
>     [email protected]:
>         peter0000
>         sam0000
>         jennifer0000
>         [email protected]
>
> and, more importantly, the last expands to:
>
> > >     $ postmap -q '[email protected]' $(postconf -xh virtual_alias_maps)
> > >
> >
> > output: yuko3000
>
>     [email protected]:
>         yuko3000
>
> > As usernames are not emails, postfix seems to stop here and it doesn't
> > resolve the next forward:
>
> Not "seems", rather "of course".  Your virtual alias map does not return
> the intended addresses.  You'll have to fix that.
>
>
> > postmap -q '[email protected]' $(postconf -xh virtual_alias_maps)
> > Output:  yuko3000,[email protected]
>
> This is not reachable from the lists above.
>
> > There is no attempt to forward the email to gmail, so Gmail is not
> getting
> > anything. There is no warning, no error, here are the logs (not
> forwarding
> > to gmail):
>
> Yes, given the unintended virtual mappings.
>
> > Jun 25 13:55:20 email postfix/qmgr[1736207]: 1E08662DDD:
> > from=<[email protected]>, size=2640, nrcpt=4 (queue active)
>
> The message expands to 4 recipients:
>
> > Jun 25 13:55:20 email postfix/smtp[1780462]: 93DBF62D81:
> >   to=<[email protected]>, orig_to=<[email protected]>,
> > Jun 25 13:55:20 email postfix/smtp[1780462]: 93DBF62D81:
> >   to=<[email protected]>, orig_to=<[email protected]>,
> > Jun 25 13:55:20 email postfix/smtp[1780462]: 93DBF62D81:
> >   to=<[email protected]>, orig_to=<[email protected]>,
> > Jun 25 13:55:20 email postfix/smtp[1780462]: 93DBF62D81:
> >   to=<[email protected]>, orig_to=<[email protected]>,
>
> > Here are the logs when sending to "[email protected]" (not forwarding to
> > gmail):
> >
> > Jun 25 14:44:12 email postfix/qmgr[1736207]: D5DB162DE2:
> >  from=<[email protected]>, size=1372, nrcpt=1 (queue active)
>
> Expands to just as one recipient as above.  Nothing unexpected.
>
> > Jun 25 14:44:12 email postfix/smtp[1803635]: 68AAA62DE6:
> >  to=<[email protected]>, orig_to=<[email protected]>,
> >
> > Here are the logs when sending directly to `[email protected]`:
>
> Not relevant.
>
> > Thank you, I agree. However we used to run that customer's mail server
> in a
> > monolithic setup using real linux accounts (not in MySQL) and worked
> > without issues (same mailing lists, same forwarding rules).
>
> The lists weren't the same.  Your expansion queries don't return the
> data you'd like them to return.  Postfix uses the lists you implemented,
> not the lists you wanted to implement.  Computers do what you say, not
> what you meant to say.
>
> --
>     Viktor.
> _______________________________________________
> Postfix-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
>
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to