Martin Neitzel wrote in <20220726172558.1760b34...@marshlabs-mx.gaertner.de>: |SB> Is there a simple way of expanding an email alias, [...] | |The command | | sendmail -bv some_alias | |should help you. With the original sendmail(8) you get the result |on stdout while with Postfix' sendmail-compatibility-shim ends you |an email with a pseudo delivery report, listing all alias expansions |as "Final-Recipients".
I was short of suggesting s-nail (the MUA i maintain), but for one the package was not updated to the long current v14.9.24, then we only support a subset of postfix aliases(5) mta-aliases [Option] If set to a path pointing to a text file in valid MTA (Postfix) aliases(5)[729] format, the file is loaded and cached (manageable with mtaaliases[236]), and henceforth plain ‘name’ (see expandaddr[417]) message receiver names are recursively expanded as a last expansion step, after the distribution lists which can be created with alias[144]. Constraints on aliases(5)[730] content support: only local addresses (names) which are valid usernames (‘[a-z_][a-z0-9_-]*[$]?’) are treated as expandable aliases, and [v15 behaviour may differ] ‘:include:/file/name’ directives are not supported. By including ‘-name’ in expandaddr[417] it can be asserted that only expanded names (mail addresses) are passed through to the MTA. and then this mail made me realize that we support the desired functionality for Mail aliases, but not for MTA aliases; the mtaaliases command only offers show aka list mode $ s-nail -RS mta-aliases=/tmp/test -X 'mtaa;x' root: steffen mltest: "|\"/usr/local/lib/s-ml/urunml send.sh testml /tmp\"" mailer-daemon: postmaster postmaster: root bin: root daemon: root ... and the output is wrapped to fit on the terminal. But what he wants is this: $ s-nail -# -X 'alias ich;x' alias ich 'Steffen Nurpmeso <stef...@sdaoden.eu>' I was in implementing it in the other window. (It is not _so_ trivial to implement postfix aliases(5).) --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)