Hello!

On Wed, 30 Sep 2020 at 20:10:52 (+0700), Victor Sudakov wrote:

> > > А вот такие 2 условия, добавленные в acl_check_rcpt (контекст тоже 
> > > привожу),
> > > нормально выглядят или можно улучшить? А как бы их в одно логическое 
> > > выражение
> > > объединить, не подскажете?

> > >   # Accept mail for forwarded domains
> > >   accept condition      = 
> > > ${lookup{$local_part@$domain}lsearch{/etc/dovecot/aliases}{yes}}

> > >   # Accept valid recipient adresses in dovecot domains
> > >   accept condition      = 
> > > ${lookup{$local_part@$domain}lsearch{/etc/dovecot/users}{yes}}

> Хотел бы только понять синтаксис, как эти два условия объединить в ИЛИ.

[--- cut ---]
11.8 Combining expansion conditions
-----------------------------------

Several conditions can be tested at once by combining them using the and and or
combination conditions. Note that and and or are complete conditions on their
own, and precede their lists of sub-conditions. Each sub-condition must be
enclosed in braces within the overall braces that contain the list. No
repetition of if is used.

or {{<cond1>}{<cond2>}...}

    The sub-conditions are evaluated from left to right. The condition is true
    if any one of the sub-conditions is true. For example,

    ${if or {{eq{$local_part}{spqr}}{eq{$domain}{testing.com}}}...

    When a true sub-condition is found, the following ones are parsed but not
    evaluated. If there are several "match" sub-conditions the values of the
    numeric variables afterwards are taken from the first one that succeeds.

and {{<cond1>}{<cond2>}...}

    The sub-conditions are evaluated from left to right. The condition is true
    if all of the sub-conditions are true. If there are several "match"
    sub-conditions, the values of the numeric variables afterwards are taken
    from the last one. When a false sub-condition is found, the following ones
    are parsed but not evaluated.
[--- cut ---]

Что-нить в таком духе:
  accept condition      = ${or 
{lookup{$local_part@$domain}lsearch{/etc/dovecot/aliases}} \
                               
{lookup{$local_part@$domain}lsearch{/etc/dovecot/users}} \
                           }

-- 
George L. Yermulnik
[YZ-RIPE]

_______________________________________________
Exim-users mailing list
Exim-users@mailground.net
http://mailground.net/mailman/listinfo/exim-users

Ответить