Hello, Dne čt, srp 28, 2025 at 02:43:59 CEST napsal(a) Markus Schönhaber via Postfix-users: > 28.08.25, 14:20 +0200, Jan Marek via Postfix-users: > > > But why `postmap -q` don't reply? > > >From man postmap(1): > > | -q key Search the specified maps for key and write the first value > | found to the standard output stream. The exit status is zero when > | the requested information was found. > | > | Note: this performs a single query with the key as > | specified, and does not make iterative queries with substrings > | of the key as described for access(5), canonical(5), > | transport(5), virtual(5) and other Postfix table-driven > | features.
it's quite confusing: /etc/postfix/virtual: [email protected] account1 [email protected] account2 @virtual.domain other_account postmap -q [email protected] hash:/etc/postfix/virtual account1 postmap -q [email protected] hash:/etc/postfix/virtual (nothink and exit status of 1) /etc/postfix/virtual.pcre /[email protected]/ account1 /[email protected]/ account2 /.*@virtual.domain$/ other_account postmap -q [email protected] pcre:/etc/postfix/virtual.pcre account1 postmap -q [email protected] pcre:/etc/postfix/virtual.pcre other_account It would be advantage to test maps in way as in pcre... And some proposal for documentation in https://www.postfix.org/VIRTUAL_README.html: Can you, please, add section to Notes after example in section: "Postfix virtual ALIAS example: separate domains, UNIX system accounts" ----%<---- If your hostname is the same as virtual_alias_domains, you have add in file /etc/postfix/virtual explicit domain like: 1 /etc/postfix/virtual: 2 [email protected] postmaster@localhost 3 [email protected] joe@localhost 4 [email protected] jane@localhost 5 # Uncomment entry below to implement a catch-all address 6 # @example.com jim@localhost Instead of "localhost" domain can be any domain from $mydestination variable. ----%<---- I'm sorry for my english, it's not my native laguage... > > -- > Regards > mks Sincerely Jan Marek -- Ing. Jan Marek University of South Bohemia Academic Computer Centre Phone: +420389032080 http://www.gnu.org/philosophy/no-word-attachments.cs.html
signature.asc
Description: PGP signature
_______________________________________________ Postfix-users mailing list -- [email protected] To unsubscribe send an email to [email protected]
