Re: [exim] exim filter for incoming mail to be spam

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Victor Ustugov
日付:  
To: Amjad Qasem via Exim-users
題目: Re: [exim] exim filter for incoming mail to be spam
Amjad Qasem via Exim-users wrote on 29.03.2018 1:54:
> I have test that too doesn't work



# cat /usr/local/etc/exim/system_filter-test
if
"${if forany{${addresses:$rh_from:}}{eq{$item}{a@???}}{yes}{no}}" is "yes"
then
        headers add "X-Spam-Score: 100"
endif



# echo -e "From: a@???\n\n" | exim -f a@??? -bfl test -bfd
example.net -bF /usr/local/etc/exim/system_filter-test
Return-path copied from sender
Sender      = a@???
Recipient   = test@???
Testing Exim filter file "/usr/local/etc/exim/system_filter-test"


Headers add "X-Spam-Score: 100"
Filtering did not set up a significant delivery.
Normal delivery will occur.


# echo -e "From: name <a@???>\n\n" | exim -f a@??? -bfl test -bfd
example.net -bF /usr/local/etc/exim/system_filter-test
Return-path copied from sender
Sender      = a@???
Recipient   = test@???
Testing Exim filter file "/usr/local/etc/exim/system_filter-test"


Headers add "X-Spam-Score: 100"
Filtering did not set up a significant delivery.
Normal delivery will occur.


# echo -e "From: \"name lastname\" <a@???>\n\n" | exim -f a@??? -bfl
test -bfd example.net -bF /usr/local/etc/exim/system_filter-test
Return-path copied from sender
Sender      = a@???
Recipient   = test@???
Testing Exim filter file "/usr/local/etc/exim/system_filter-test"


Headers add "X-Spam-Score: 100"
Filtering did not set up a significant delivery.
Normal delivery will occur.



Please, show the content of your filter and the headers of your test
message.


> On 28 March 2018 at 04:46, Victor Ustugov via Exim-users <
> exim-users@???> wrote:
>
>> Amjad Qasem via Exim-users wrote on 27.03.2018 21:01:
>>> Thanks for your reply
>>>
>>> I have tested the below but it' didn't work
>>>     if $h_from: contains "xxx@???"
>>>     then
>>>         headers add X-Spam-Score: 100
>>>     endif

>>
>> untested:
>>
>> if
>> "${if
>> forany{${addresses:$rh_from:}}{eq{$item}{xxx@???}}{yes}{no}}" is
>> "yes"
>> then
>> headers add "X-Spam-Score: 100"
>> endif
>>
>>
>>> On 26 March 2018 at 23:04, Heiko Schlittermann via Exim-users <
>>> exim-users@???> wrote:
>>>
>>>> Amjad Qasem via Exim-users <exim-users@???> (So 25 Mär 2018
>> 16:16:13
>>>> CEST):
>>>>> Dear all,
>>>>>
>>>>> I'm try to add Exim filter to make mail as spam , but I don't know
>>>>> the command or the action to change the Spam static, as below
>>>>>
>>>>> if ("$h_from:" contains "xxxx@???")
>>>>>    then
>>>>>     spam_score = 100 ???
>>>>>   endif

>>>>>
>>>>> or
>>>>>
>>>>> if ("$h_from:" contains "xxxx@???")
>>>>>    then
>>>>>     X-Spam-Score = Yes ???
>>>>>   endif

>>>>
>>>> I think, this is incorrect syntax. If you want to set a header, you have
>>>> to arrange the filter to be a system filter AND you've to fix the
>>>> syntax:
>>>>
>>>> UNTESTED!
>>>>
>>>>     if $h_from: contains "xxx@???"
>>>>     then
>>>>         headers add X-Spam-Score: 100
>>>>     endif

>>>>
>>>>
>>>>     Best regards from Dresden/Germany
>>>>     Viele Grüße aus Dresden
>>>>     Heiko Schlittermann
>>>> --
>>>>  SCHLITTERMANN.de ---------------------------- internet & unix support -
>>>>  Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
>>>>  gnupg encrypted messages are welcome --------------- key ID: F69376CE -
>>>>  ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -

>>>>
>>>> --
>>>> ## 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/
>>>>
>>>>
>>
>>
>> --
>> Best wishes
>> Victor Ustugov        mailto:victor@corvax.kiev.ua
>> public GnuPG/PGP key: https://victor.corvax.kiev.ua/corvax.asc
>> Skype ID: corvax_nb   JID: victor@???

>>
>> --
>> ## 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/
>>



-- 
Best wishes
Victor Ustugov        mailto:victor@corvax.kiev.ua
public GnuPG/PGP key: https://victor.corvax.kiev.ua/corvax.asc
Skype ID: corvax_nb   JID: victor@???