[Top] [Prev] [Next] [Bottom]




Blocking on size


Email can be a very quick and easy way of distributing information using attachments. However, it can also be highly inefficient if these attachments are large. For this reason, you may wish to limit the size of email messages that can be sent.

This is achieved by editing the [Validation] configuration section, to ensure that the DetectSize directive is no longer commented out. This section is found in the validation configuration file, VALIDATE.CFG.

That is, change:

[Validation]
;DetectSize=VALATTR

to

[Validation]
DetectSize=VALATTR

The [DetectSize] configuration section should also be edited, to set the message limit that you wish to impose.

For example:

[DetectSize]
;ParkMessage=MessageSize>524228
HaveSize=MessageSize>1048576

This example sets a message size limit of 1Mb.

If DetectSize is activated for MAILsweeper, any message with a total estimated size greater than the specified limit is discarded. The sender of the message is informed accordingly.

For SMTP systems the message size should be increased by about 30%, to allow for UUE and MIME encapsulation.

The MAILsweeper service will have to be restarted for these changes to come into effect.

Parking

If you have email transferring over slow network links you may wish to delay sending large messages until off peak times. This ensures that the majority of business emails can get to their destinations in a timely fashion. The larger emails can be sent off peak, when network traffic is at a minimum.

This is achieved by `parking' messages greater than a set limit. The parked messages are stored in the [Parked Messages] quarantine area and automatically released at a preset time, usually outside working hours.

Parking can be configured by editing the [Validation] configuration section, to ensure that the DetectSize directive is no longer commented out, as explained on the previous page.

The [DetectSize] configuration section should be edited, as follows:

That is, change:

[DetectSize]
;ParkMessage=MessageSize>524228
HaveSize=MessageSize>1048576

to

[DetectSize]
ParkMessage=MessageSize>524228
;HaveSize=MessageSize>1048576

In this example, all messages greater than 512Kbytes in size are parked.

You should also edit the [ParkedMessages] quarantine area, found in the mail configuration file, MIMESWP.CFG, to set the time period during which the parked messages are to be released. This is achieved using the ReleaseTime directive.

The time period is specified in 24hr clock.

For example:

[ParkedMessages]
Location=C:\MSW\Qtine\Parked\
File=C:\MSW\Qtine\Parked\QUARNTNE.LST
ReleaseTime=21:00-22:00

In this example, messages are released between 21:00 and 22:00.

Two other directives can be used to control the release of parked messages. These are ReleaseDisposal and ReleaseCount. See page 7-28 for more details.

If required, you can park messages whose size exceeds one limit and block messages whose size exceeds a higher limit.

This is achieved by:

For example:

[DetectSize]
ParkMessage=MessageSize>524228
HaveSize=MessageSize>1048576

In this example, messages greater than 512Kb but less than or equal to 1Mb are parked, while messages greater than 1Mb are blocked and discarded.

The directives are executed in the order that they appear in the [DetectSize] configuration section.

You may wish the size limit or parking facility to apply to certain users or groups of users only.

This can be achieved by creating a new AMUcheck rule to name the users and then setting an attribute during AMUcheck validation. This attribute can subsequently be checked in the [DetectSize] section, using a PerformIf directive (to apply the size limit or parking facility to certain users only) or a SkipIf directive (to exclude certain users from the size limit or parking facility).

For example:



In AUTHFILE.TXT:

RESPONSE allow 
RESPONSE isjunkmail PRIORITY 1
RESPONSE copyadministrator PRIORITY 1
RESPONSE deny PRIORITY 2
RESPONSE No_BlockSize PRIORITY 2

FROM *@* To *@* allow     ;allow everything

FROM	user1@company.com ;List of users allowed
	user2@company.com ;to send large messages
	user3@company.com
 To *@* No_BlockSize

FINISH

A new AMUcheck rule is defined.

In this example, the rule names the users who are allowed to send large messages.1 When the addresses of a message match with this rule the <Response> generated by AMUcheck is No_BlockSize.

A new RESPONSE statement is also listed in the first section of the file, to define the No_BlockSize <Response>.

In VALIDATE.CFG:

[AMU]
AuthFile=C:\MSW\CONFIG\AUTHFILE.TXT
If=No_BlockSize, PriveledgedPersons=TRUE, allow

If the <Response> generated by AMUcheck is No_BlockSize then an attribute called PriveledgedPersons is created, with the value TRUE. This is the attribute that is checked by the SkipIf directive in the [DetectSize] configuration section.

The <Response> is then reset to allow. This is the actual <Response> generated by AMUcheck. It allows the message to be delivered normally, assuming no higher priority <Response> is generated by one of the configured plug-in validator instances.

[DetectSize]
SkipIf=PriveledgedPersons==TRUE
;ParkMessage=MessageSize>524228
HaveSize=MessageSize>1048576

The value of the PriveledgedPersons attribute is checked in the [DetectSize] configuration section, using a SkipIf directive.

If the value is TRUE then checking by the [DetectSize] section is skipped.



For a similar configuration, using PerformIf to apply the size limit or parking facility to certain users only, see the blocking attachments example on page 5-29.

See the AMUcheck section on page 7-97 for more details. Also, for more details on the If, PerformIf and SkipIf directives, see the Common validator directives section on page 7-102.
 


[Top] [Prev] [Next] [Bottom]



1 These users are allowed to send large messages, so checking the message size can be skipped. This is achieved by including a SkipIf directive in the [DetectSize] section.

msw.support@mimesweeper.com

Copyright © 1998, Content Technologies Limited. All rights reserved.