MailScanner per user mail size limit
carinus.carelse at mrc.ac.za
carinus.carelse at mrc.ac.za
Fri Feb 24 09:25:43 GMT 2006
Try some Permutation of the following I think this might work. Not sure
tho.
From: doron at crc.co.za 1024 Yes
FromOrTo: default -1 No
Carinus
"Doron Shmaryahu" <doron at crc.co.za>
Sent by: mailscanner-bounces at lists.mailscanner.info
2006/02/24 08:05
Please respond to
MailScanner discussion <mailscanner at lists.mailscanner.info>
To
"MailScanner discussion" <mailscanner at lists.mailscanner.info>
cc
Subject
RE: MailScanner per user mail size limit
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.
--
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!
--
This e-mail and its contents are subject to the
South African Medical Research Council
e-mail legal notice available at http://www.mrc.ac.za/about/EmailLegalNotice.htm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20060224/1d911fd1/attachment.html
More information about the MailScanner
mailing list