Hello Viktor,

First of all, thank you for your answers and your patience with me.

Yes, you are right - in $mydestination is, as described in the documentation, $myorigin = tachtler.net - NOT - included and $virtual_mailbox_domains = tachtler.net (only).

https://www.postfix.org/VIRTUAL_README.html#virtual_mailbox
-> NEVER list a virtual MAILBOX domain name as a mydestination domain!
-> NEVER list a virtual MAILBOX domain name as a virtual ALIAS domain!

In /etc/aliases is defined

# Person who should get root's mail. Don't receive mail as root!
# Tachtler
# default: #root: you
root: kl...@tachtler.net

but this is ignored?

So, if I understand this correctly, /etc/aliases is not used because I transfer the e-mail via lmtp(8) to dovecot and therefore local(8) is not used?


Thanks for the explanations for my better understanding.

Best regards
Klaus.

Translated with DeepL.com (free version)

On 4/21/25 08:51, Viktor Dukhovni via Postfix-users wrote:
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.



--

---------------------------------------
e-Mail  : kl...@tachtler.net
Homepage: https://www.tachtler.net
DokuWiki: https://dokuwiki.tachtler.net
---------------------------------------

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

Reply via email to