Max Message Size Rule

Julian Field MailScanner at
Thu Sep 29 20:05:22 IST 2005

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

Hash: SHA1

Alex Neuman wrote:

> Bernd Eidenschink wrote:
>> Dear List,
>> I'm asked to temporarily free a user's mailbox from messages greater 
>> than a defined size. After a few days the user wants the "big" 
>> messages back in her mailbox.
>> I think a 'Maximum Message Size' ruleset would be a fast solution to 
>> do this, right? Can I configure a rule to forward mails above x KB to 
>> a different mailbox?
> Not that I know of; the max size parameter is designed to drop mail 
> that passes the threshold. Assuming the user wants to read messages 
> from a low-bandwidth situation (dialup, for example), the user would 
> be better off using webmail, IMAP, the MUA's option not to download 
> messages larger than a certain size, or a service such as 
> that lets you read your mail from the web.

Yes. Applying a ruleset to "Maximum Message Size" would merely allow you 
to change the maximum allowed size dependent on the message, it doesn't 
change what happens to the message.

You could hook a Custom Function onto "Non-Spam Actions" which looked at 
the message size and looked at the message recipient. If it is too big 
and addressed to the relevant user, it could delete the recipients, 
replace them with a null address (i.e. an alias which is delivered to 
/dev/null) and also added the "different mailbox" file location into the 
$message->{archiveplaces} location list.

Not a trivial solution, I agree. But I can't see an easier way of doing 
it, sorry.

Ideally I would re-write a load of the code to add actions similar to 
the Spam Actions to lots more configuration parameters. But that isn't 
going to happen any time soon, sorry.

- -- 
Julian Field
Buy the MailScanner book at
Professional Support Services at
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

Version: PGP Desktop 9.0.2 (Build 2424)


This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki ( and
the archives (

Support MailScanner development - buy the book off the website!

More information about the MailScanner mailing list