Wietse Venema:
> Tan Mientras:
> > Sadly seems I'm unable to make it work.
> >
> > Users have mail address in ldap "mail" property
> > External users have mail address in ldap's "externalmail" property
> >
> > However it always shows /usr/bin/procmail -a "$EXTENSION"
> > > Oct 27 10:58:55 backend1 postfix/local[3916674]: 9DE86186: to=<
> > [email protected]>, orig_to=<[email protected]>, relay=local, delay=0.06,
> > delays=0.01/0/0/0.05, dsn=2.0.0, status=sent (delivered to command:
> > /usr/bin/procmail -a "$EXTENSION")
>
> Then you did not implement the virtual_alias_maps correctly. To
> repeat myself, this should return the external address or 'not
> found'.
If the user has and external address:
command: postmap -q user-a@your-domain ldap:/etc/postfix/virtual-alias-config
output: user@external-domain
command: echo $?
output: 0
If the user has no external address:
command: postmap -q user-b@your-domain ldap:/etc/postfix/virtual-alias-config
no output
command: echo $?
output: 1
Wietse
> >
> > On Fri, Oct 21, 2022 at 1:04 PM Wietse Venema <[email protected]> wrote:
> >
> > > Tan Mientras:
> > > > On Thu, Oct 20, 2022 at 5:00 PM Wietse Venema <[email protected]>
> > > wrote:
> > > >
> > > > >
> > > > > You can do this with a main.cf:virtual_alias_maps lookup table that
> > > > > takes as search key an email address in your domain like
> > > > > user123@yourdomain. If their email should be delivered externally,
> > > > > the lookup table returns the external email address like
> > > > > [email protected], otherwise it returns not found.
> > > > >
> > > > > That could be an LDAP table, or any other table lookup mechanism
> > > > > that Postfix has support for.
> > > > >
> > > >
> > > > I think i understand what you mean.
> > > > Would this be compatible with our "internal" users? ie: can postfix send
> > > > some mails locally (to procmail/maildir) and others remotely (smtp),
> > > > although all users are populated in the same LDAP?
> > >
> > > For those users, the table returns not found, and therefore, email
> > > deliveries do no change.
> > >
> > > Wietse
> > >
>