Re: [exim] Combine hosts/sender_domains in condition?

トップ ページ
このメッセージを削除
このメッセージに返信
著者: MRob
日付:  
To: exim-users
題目: Re: [exim] Combine hosts/sender_domains in condition?
On 2021-09-08 07:02, nb via Exim-users wrote:
> Le 2021-09-08 06:46, MRob via Exim-users a écrit :
>> On 2021-09-08 05:03, Jasen Betts via Exim-users wrote:
>> > On 2021-09-07, MRob via Exim-users <exim-users@???> wrote:
>> > > Hellos, I was trying to write a clause that needs to combine
>> > > 'sender_domains' and 'hosts' in *OR* condition so I can't put on two
>> > > separate lines.
>> > >
>> > > Is only way for this to repeat the full clause, once with
>> > > sender_domains
>> > > and one with hosts?
>> >
>> >
>> > if it was an accept or deny rule you could just have another
>> > rule for the other condition
>> >
>> > So it must be a require rule
>> >
>> > change it to a deny rule and invert both conditions.
>> > De Morgan's theorem.
>>
>> It's a deny rule, but I can't change it to accept because if it
>> doesn't
>> match I want it to continue to the next clause.
>>
>> --
>> ## List details at https://lists.exim.org/mailman/listinfo/exim-users
>> ## Exim details at http://www.exim.org/
>> ## Please use the Wiki with this list - http://wiki.exim.org/
>>
> Hi,
>
> I'm not sure this is what you want but I have an "or" condition:
>
>     condition = ${if or{\
>       {match{$mime_content_type}{(?i)executable}}\

>
> {match{$mime_filename}{\N(?i)\.(exe|com|vbs|bat|pif|scr|hta|js|cmd|chm|cpl|jsp|reg|vbe|lnk|dll|sys|btm|dat|msi|prf|vb)$\N}}\
>       }}
> Here I use mime type and filename extension.


I don't think you can put hosts or sender_domains in like that:
${if or{{hosts = ...}{sender_domains = ...}}}