reviving old thread (hopefully I can get here now)

> The "sendmail -bv" can be used by spamass-milter to resolve destination
> user and to use that users' spamassassin preferences:
>
>      -x      Pass the recipient address through sendmail -bv, which will per?
>              form virtusertable and alias expansion.  The resulting username
>              is then passed to spamc.  Requires the -u flag.  The spamass-mil?
>              ter configuration process does its best to find sendmail, but it
>              is possible to override this compiled-in setting via the

> only expanding virtual aliases should be fine.

Wietse Venema:
The following:

(postmap -q [email protected] maptype:mapname ||
    postmap -q @example.com)

will exit with status 0 (success) if a match was found.

It'll take more code to handle the third form: stripping an
address extension. Let me know if you need help.

On 28.08.20 14:30, Wietse Venema wrote:
In the course of Postfix 3.x development I made the table lookup
sequences configurable internally, but haven't found the time to
expose that as main.cf settings. For that, the underlying code needs
to make fewer assumptions about how it will be used.

The idea is that given a full email address,

   postmap -q [email protected] -m virtual_alias maptype:mapname

-m enables mime parsing, perhaps you meant a new option?

would query the table with the same sequence of full and partial
addresses as virtual_alias_maps, and thereby take some of the mystery
out of how Postfix works. I suppose it might be educational if postmap
can make its generated queries visible.

That would be great, but IIUC, it's not available now.

I could probably do it using postconf to get virtual_alias_maps and
"postmap -q" to expand aliases. But I'd like to know order in which they are
expanded by postfix:

- do I need to query repeatedly, until virtual_alias_expansion_limit is
 reached?
 (postmap -q returns first query)

- how to repeat queries, if multiple lookup maps are used?
 Repeat first map until no expansions are made or cycle through all maps
 with all lookups?

thanks.

--
Matus UHLAR - fantomas, [email protected] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory.

Reply via email to