Maximum Message Size / Attachments.

Denis Beauchemin Denis.Beauchemin at usherbrooke.ca
Mon Oct 24 14:55:23 IST 2011


Martin,

I'm pretty sure this is not true. The default clause can appear anywhere in the rules file. I have 2 rules files with default clauses right at the top and they work flawlessly.

Denis

De : mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] De la part de Martin Hepworth
Envoyé : 24 octobre 2011 09:46
À : MailScanner discussion
Objet : Re: Maximum Message Size / Attachments.

the default line needs to be last in the ruleset. the way rulesets are processed is a bit like firewalls, in the it trundles down the list till is finds a match and then stops reading the file. So by having the Default line at the top it will never read any further down the file.


-- 
Martin Hepworth
Oxford, UK

On 24 October 2011 13:58, Richard Mealing <richard at fastnet.co.uk> wrote:
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Jan
Johansson
Sent: 24 October 2011 13:23
To: MailScanner discussion
Subject: SV: Maximum Message Size / Attachments.
 
> 
>To:     *@mydomain.co.uk      5M
> 
>Again the email just comes through nicely, but not what I want!

I have not used this setting, but the doc says "size in bytes". That _may_ be one problem.

Also, aren't rules evaluated on a "first hit" basis? You probably want to move your "default" line to the end of the rule-set.
 
 
That doesn’t seem to make any difference in my setup. I did already try with the bytes thing, I checked previous posts and could see some people using the ‘M’ in the size part of the ruleset, so I assumed it would work. No one actually coming back and saying they got it working, though… Anyone?
 
I changed it to; 
 
To:          mydomain.com                                5242880
 
 
I then moved the default rule down to the bottom and reloaded mailscanner (I don’t think this would matter though, I have other rulesets with default at the top). I re-sent the email and I got it through again. The logs show the same result. 
 
Does anyone have this working?
 
Also, if this does work, can you configure the bounce message with a custom message?
 
 
Sendmail can only do this globally, as far as I can see. I don’t really want to install another milter, if mailscanner can do this.
 
 
Many thanks,
Rich

  

--
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!



More information about the MailScanner mailing list