On Mon, Apr 21, 2025 at 08:33:44AM +0200, Klaus Tachtler via Postfix-users 
wrote:

> When creating the e-mail using
> 
> echo “Test email (virtual domain)” | /usr/sbin/sendmail root
> 
> Is not taken into account in the subsequent configuration of virtual domains
> /etc/aliases:

See ADDRESS_CLASS_README.  The aliases(5) map is used as part of
local(8) delivery.  If "root@$myorigin", after any rewrites, resolves to
a local(8) transport (usually there's only one, the "local/unix" entry
in master.cf), then $alias_maps will be used as part of delivery, as
documented.
> 
> virtual_mailbox_domains = lmdb:/etc/postfix/virtual_mailbox_domains_maps,
>         proxy:mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
> virtual_mailbox_maps = lmdb:/etc/postfix/virtual_mailbox_maps,
>         proxy:mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
>         
> proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
> virtual_alias_domains = lmdb:/etc/postfix/virtual_alias_domains_maps
> virtual_alias_maps = lmdb:/etc/postfix/virtual_alias_maps,
>         proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
>         proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
>         
> proxy:mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
> virtual_transport = lmtp:inet:dovecot.tachtler.net:24

Well, is "$myorigin" listed in $mydestination, or is it in some other
address class?  What is "root@$myorigin" rewritten to?

> In this example, all lmdb are empty (but prepared), but converted to
> lmdb format with postmap - but there is no evaluation of /etc/aliases.


> Apr 21 06:16:06 server postfix/qmgr[1078]: 619E4180084:
> from=<r...@postfix.idmz.tachtler.net>, size=287, nrcpt=1 (queue active)

This seems to suggest that "$myorigin" might be set to
"postfix.idmz.tachler.net"...
What are the domains that match $virtual_mailbox_domains?

> Apr 21 06:16:06 server postfix/lmtp[1154]: Verified TLS connection
>   established to dovecot.tachtler.net[fd00::10:10:0:0:80]:24: TLSv1.3 with
>   cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519
>   server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature
>   RSA-PSS (2048 bits) client-digest SHA256
> Apr 21 06:16:06 server postfix/lmtp[1154]: 619E4180084:
>   to=<r...@tachtler.net>, orig_to=<root>,
>   relay=dovecot.tachtler.net[fd00::10:10:0:0:80]:24, delay=0.17,
>   delays=0.06/0.04/0.03/0.04, dsn=2.0.0, status=sent (250 2.0.0
>   <r...@tachtler.net> Od6tMYXGBWj4AwAAhuu2+w Saved)

On the other hand the recipient is "r...@tachler.net" and was not
subject to non-trivial rewrites, so perhaps $myorigin is "tachler.net"?

Delivery appears to be via "virtual_transport", or in any case via
lmtp(8), rather than local(8).  Naturally aliases(5) don't come into
play in that case.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to