One typo fix.

Marek Kozlowski:
> >> So: yes, I can deal with it. One again the question: Can I do it at
> >> postfix (not postfix driver) level? Is there any postfix option which says:
> >>   "I'm serving only the following virtual domains; ignore those entries
> >> in virtual_alias_maps that don't match it"?
> > 
> > If you say "I'm serving only the following virtual domains; ignore
> > those entries in virtual_alias_maps that don't match it", then that
> > is exactly what the "domains" feature in ldap_table(5) does.
> 
> Well. But it is a solution at the postfix driver level. An LDAP driver
> filter.
> There can be a large set of virtual_alias_maps sources at the same time:
> LDAP, mysql, numerous files, etc. What I'm searching for is a switch
> which disables / enables some addresses for all of those sources at
> once.

If you want to apply the same filter to MULTIPLE maps:

/etc/postfix/main.cf:
    virtual_alias_maps =
        pipemap{pcre:/etc/postfix/domain_filter, ldap:/path/to/ldapfile}
        pipemap{pcre:/etc/postfix/domain_filter, mysql:/path/to/myselfile}

/etc/postfix/domain_filter:
    # Any non-empty right-hand side value will do.
    /^(.+@(domain1|domain2|domain3))$/  $1

This is available in Postfix 2.12 as of September.

Alternatively: append the "domains" list to multiple files:

    # cat makefile
    .SUFFIXES: .out .in

    .in.out: 
            (cat $*.in; echo domains = xx, yy, xx) > $*.out

    ldapfile.out: ldapfile.in
    mysqlfile.out: mysqlfile.in

> If that is now what you want, then you need to be more precise.

In this case, explain why "domains" works but still is not what you want.

        Wietse

Reply via email to