Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SMTP Proxy Expression Filter

Hello NG,

i have a Question about the SMTP Proxy Expression Filter.
I entered some Strings like "porn", "sexy" etc. in the Expression Filter Field.
But it seems that the Filter doesnt work fine.

The Handbook says: "...if a eMail contains that String, it will be blocked..."

Mailtraffic from the Internet via the SMTP-Proxy of ASL (3.209) to our lokal Mailserver:
RBL enabled
Viruscheck enabled

I tried something:
- i entered one of the above strings in the Subject-Field of the eMail. The Mail goes through. No blocking.
- i entered one string in the Text-Field with text like "a cool porno link" or "some sexy pics"
--> the Mail goes through. No blocking.
- i entered two strings like "porn sexy" in one line --> the Mail goes through. No blocking.
- i entered one string "porn" in one line as a single word. --> ASL blocked the Mail.

so, my Question is now why the Mail isnt blocked if it contains for example "porno" or a sentence which includes my configured keywords ?

The Destinationaddress is NOT the Postmaster address

Thanks for any hints.
Thomas


This thread was automatically locked due to age.
Parents
  • I am having a problem that when the message contains words like 'entity' and the expression list contains 't!t' you fill int the !. The mail is blocked. Is there any way to resolve this and make the expression filter see entire words instead of substrings
  • I'm having a bigger frustration.
    If I have anything in the "Expression filter" ALL mail stays in the queue.
    I thought it was working on Friday when I entered 'nude teens' as an expression. Tested and everything appeared OK. Came in Monday morning to 1400 messages backed up in the queue. Cleared the entry and everything worked.
    Testing now repeats the problem every time.

    Current w/ 3.209 and rebooted, no change.

     - steve
  • Hi alltogether,

    the expression filter field interprets so called
    regular expressions. If you want to filter an
    expression like :-) you'd need to escape ")".
    The filter would be like :-\) - do you get me?

    By the way, stop and restart the SMTP proxy, and
    an error message should appear in either daemon
    or smtp log.

    read you 
    o|iver
  • The only string I'm placing in the filter is
    'nude teens'
    with the quotes.
    If I put that in the "Expression filter", ALL my mail stops in the queue. If I take it out, mail starts flowing again.
    Doesn't make a difference to the problems if I stop and restart the daemon or not.

    Any ideas?

     - steve
  • Well, now it seems to be working.
    Entered the string but without the quotes and monitoring tests OK.
    Last time I tried this nothing happened.
    I guess the reboot worked.

    I'll definately be monitoring this process, users don't like their email delayed.

     - steve
  • You said you used quotes around the expression filter, I have not. the filter works well but is to strict. I think it is checking the encoded attachments and blocking mail when the encoding has a blocked string.
  • I read up on exim and then was able to make it work.
    You don't want to use quotes.

    Overall I'm not impressed or very happy with it.
    With just a little testing I found it is easy to send messages that don't get scanned at all.
    Some of the expressions I'm trying to catch only get caught on a bounce rather than first time through.
    And if you put it a string that catches more than you want, there is no easy way to reset and release them.
  • I've had luck with the (?i)\bdrugs\b method below.
    Just modify it for each keyword or expression you want to filter.

    You get mails like this "RE: xcvbVjjagra"?

    try this "(?i)(re|fw|fwd)\:\s\w+(?i)agra\b"

    (?i) means "ignore case sensitivity to the following expression"
    (x|y) is a enumeration of expressions in this case RE, FW and FWD
    \: for the colon, without this it didn`t work. It says that the colon is just a colon.
    \s one whitespace
    \w+ one or more word characters like "xcvbVjj"
    (\w stands for word character and the following + for "one or more"
    (?i)agra means "agra" not case sensitiv
    \b end of word

    or try this:

    (?i)(re|fw|fwd)\:\s\w+R\w+(?i)lex\b

    works against Re: jsdhRoalex

    You want to filter short words like "drugs", but you are afraid about image- or pdf-streams with this expression.

    (?i)\bdrugs\b

    first \b means wordbeginning, second \b means end of word.

    You get also mails with one image and many words without bad words?

    filter image001.gif
Reply
  • I've had luck with the (?i)\bdrugs\b method below.
    Just modify it for each keyword or expression you want to filter.

    You get mails like this "RE: xcvbVjjagra"?

    try this "(?i)(re|fw|fwd)\:\s\w+(?i)agra\b"

    (?i) means "ignore case sensitivity to the following expression"
    (x|y) is a enumeration of expressions in this case RE, FW and FWD
    \: for the colon, without this it didn`t work. It says that the colon is just a colon.
    \s one whitespace
    \w+ one or more word characters like "xcvbVjj"
    (\w stands for word character and the following + for "one or more"
    (?i)agra means "agra" not case sensitiv
    \b end of word

    or try this:

    (?i)(re|fw|fwd)\:\s\w+R\w+(?i)lex\b

    works against Re: jsdhRoalex

    You want to filter short words like "drugs", but you are afraid about image- or pdf-streams with this expression.

    (?i)\bdrugs\b

    first \b means wordbeginning, second \b means end of word.

    You get also mails with one image and many words without bad words?

    filter image001.gif
Children
No Data