Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
Beide Seiten, vorherige Überarbeitung Vorherige Überarbeitung Nächste Überarbeitung | Vorherige Überarbeitung | ||
lpi2:postfix-virtual-domains [2024/08/07 06:24] ingo_wichmann |
lpi2:postfix-virtual-domains [2024/08/10 13:08] (aktuell) ingo_wichmann |
||
---|---|---|---|
Zeile 11: | Zeile 11: | ||
postmap hash:/etc/postfix/virtual_mailbox_domains.txt | postmap hash:/etc/postfix/virtual_mailbox_domains.txt | ||
+ | -> erzeugt ''/etc/postfix/virtual_mailbox_domains.txt.db'' | ||
Domain nachschlagen testen: | Domain nachschlagen testen: | ||
postmap -q example.com hash:/etc/postfix/virtual_mailbox_domains.txt | postmap -q example.com hash:/etc/postfix/virtual_mailbox_domains.txt | ||
+ | -> ''yes'' | ||
<file txt /etc/postfix/virtual_alias_maps.txt> | <file txt /etc/postfix/virtual_alias_maps.txt> | ||
# postmap hash:/etc/postfix/virtual_alias_maps.txt | # postmap hash:/etc/postfix/virtual_alias_maps.txt | ||
Zeile 26: | Zeile 27: | ||
Empfänger nachschlagen testen: | Empfänger nachschlagen testen: | ||
postmap -q postmaster@example.com hash:/etc/postfix/virtual_alias_maps.txt | postmap -q postmaster@example.com hash:/etc/postfix/virtual_alias_maps.txt | ||
- | postmap -q user2@example.com hash:/etc/postfix/virtual_alias_maps.txt | + | -> ''user1@example.com'' |
+ | postmap -q user1@example.com hash:/etc/postfix/virtual_alias_maps.txt | ||
+ | -> ''user1@example.com'' | ||
===== Postfix konfigurieren ===== | ===== Postfix konfigurieren ===== | ||
<file txt /etc/postfix/main.cf> | <file txt /etc/postfix/main.cf> | ||
+ | mydestination = localhost | ||
+ | |||
virtual_mailbox_domains = hash:/etc/postfix/virtual_mailbox_domains.txt | virtual_mailbox_domains = hash:/etc/postfix/virtual_mailbox_domains.txt | ||
virtual_mailbox_maps = hash:/etc/postfix/virtual_alias_maps.txt | virtual_mailbox_maps = hash:/etc/postfix/virtual_alias_maps.txt | ||
Zeile 37: | Zeile 42: | ||
virtual_transport = lmtp:unix:private/dovecot-lmtp | virtual_transport = lmtp:unix:private/dovecot-lmtp | ||
</file> | </file> | ||
+ | postfix reload | ||
+ | |||
+ | ===== testen ===== | ||
+ | Client: | ||
+ | swaks --from user1@example.com --to user2@example.com -s example.com -a -au user1@example.com -ap xxxxxx | ||
+ | -> ''Ok: queued as 46AE13EB41'' | ||
+ | |||
+ | Server: | ||
+ | journalctl -g 46AE13EB41 | ||
+ | -> ''postfix/lmtp[…]: 46AE13EB41: to=<user2@example.com>, relay=example.com[private/dovecot-lmtp], …, status=sent'' | ||
====== Dokumentation ====== | ====== Dokumentation ====== | ||
* http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox | * http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox | ||