Problem with user-specific filename rules

Garry Glendown garry at glendown.de
Fri Apr 22 10:44:06 UTC 2016


Hi,

> You could try instead, rules like
>
> From: /^?!someuser[12]@domain\.de$/ and To: @domain.de
> /etc/MailScanner/filename.rules.conf
>
> I.e., add a negative lookahead condition so the To: @domain.de rule
> doesn't match those senders. In practice, it would probably be
> different, e.g.,
>
> From: /^?!(usera|otherperson)@domain\.de$/ and To: @domain.de
> /etc/MailScanner/filename.rules.conf
>
I tried to, but somehow this caused all mail to be sent through the
default rule... here's the setup I had entered:

#  Block more securely for mails to internal users
From:   /^?!theuser at domain.de$/ and To: @domain.de           
/etc/MailScanner/filename.rules.conf
From:   /^?!theuser at domain.de$/ and To: @domain.de              
/etc/MailScanner/filename.rules.conf

# Default - Somewhat less secure, allowing e.g. .docm etc.
To:     default         /etc/MailScanner/filename.toexternal-rules.conf

As a result, all mails were let through using the more relaxed rules
set. I tried altering the regexp pattern based on doing some tests,
changing it to e.g. /^(?!(theuser at domain.de))$/ (which at least was
accepted by the regexp tester I used), but it still didn't seem to match
any sender ... am I missing something here?



Thanks, Garry

--

PGP Fingerprint: A79F A33F 5B13 BEB7 A51D 274F F99C 3AE2 4BCB 7015

 

-- 
PGP Fingerprint: A79F A33F 5B13 BEB7 A51D 274F F99C 3AE2 4BCB 7015

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailscanner.info/pipermail/mailscanner/attachments/20160422/431cb740/attachment.html>


More information about the MailScanner mailing list