MailScanner per user mail size limit

Doron Shmaryahu doron at crc.co.za
Fri Feb 24 06:05:44 GMT 2006


Hi,
 
thanks for response. I have done as suggested below. I changed the line
to read:Maximum Attachment Size =
/usr/local/etc/MailScanner/rules/MaximumAttachmentSize.rules

 I created a  rule file contaiining the following:
 
From: doron at crc.co.za   1024
FromOrTo:       default                -1  
 
so in theory that should block anything from me bigger than 1k. I have
also restarted MailScanner but it does not block it nothing. I have sent
a couple of attachments above 200k but still nothing. I turned Debug =
yes so i could check for errors and nothing.
 
I see the correct size reporting from sendmal from=<doron at crc.co.za>,
size=317660. Is there anything else I am missing ?
 
thanks again

Doron

________________________________

From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Brad
Beckenhauer
Sent: 24 February 2006 05:14 AM
To: MailScanner discussion
Subject: Re: MailScanner per user mail size limit


>>> Doron Shmaryahu<doron at crc.co.za> 2/23/2006 4:22:49 PM >>>

Hi,

I have MailScanner 4.50.15 running on a FreeBSD 4.11 machine. All is
working perfectly. I have read through the docs on creating per user
mail limits but until now I have still not been able to make it work. I
would like the rule file to control mail size limits for each user.

Are there any problems with this ?

Could someone provide me a example rule file or any hints/docs would be
appreciated.

Thanks in advance

Doron 
--

This shoudl work for you.
Create this file "MaximumAttachmentSize.rules" in your "rules" 
directory and modify your MailScanner.conf as noted.
 
#
# File Location/Name:
# %rules-dir%/MaximumAttachmentSize.rules
#
# This is where you can build a ruleslist
# that allows you to specify attachment size limits in bytes
#
# In MailScanner.conf change:
# "Maximum Attachment Size = -1"
# to
# "Maximum Attachment Size = %rules-dir%/MaximumAttachmentSize.rules"
#
# Example values, adjust as needed
# 1k    = 1024 bytes
# 10k   = 10240 bytes
# 100K  = 102400 bytes
# 1MB   = 1024000 bytes
# 10MB  = 10240000 bytes
# 100MB = 102400000 bytes
# 250MB = 256000000 bytes
# 500MB = 512000000 bytes
# 1GB   = 1024000000 bytes
#
# Size limits and Default should be smaller than the partition
# where they are temporarily stored. ;-)
#
# Set addresses/domains to be limited as follows:
# Direction     Pattern                   Size Limit
# From: user at good.domain.com   1024000  # Limit FROM specified user to
1MB
# From: *@friendly.domain.com    10240000 # Limit FROM specified domain
to 10MB
# From: 123.234.567.2                  1024000  # Limit FROM IP address
to 1MB
# From: 123.234.                          1024000  # Limit FROM IP range
to 1MB
# From: /^192\.168\.13[4567]\./   1024000  # Limit FROM IP range to 1MB
# To:   abc at xyz.com                        0         # No Attachments
allowed TO this user
# To:   *@yahoo.com                    1024000   # Limit all TO this
Domain to 1MB
#
To: user1 at your.domain       102400   # Limit FROM specified user to
10Kbytes
To: user2 at your.domain     1024000   # Limit FROM specified user to 1MB
To: user3 at your.domain   10240000   # Limit FROM specified user to 10MB
FromOrTo:       default                -1   # Default, No attachment
Size Checking.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20060224/bb6ec185/attachment.html


More information about the MailScanner mailing list