<br><font size=3>Try some Permutation of the following I think this might
work. Not sure tho. </font>
<br>
<br><font size=3>From: </font><a href=mailto:doron@crc.co.za></u></font><font size=3 color=blue><u>doron@crc.co.za</a><font size=3>
1024 <b>Yes</b><br>
FromOrTo: default
-1 <b>No</b> </font>
<br>
<br>
<br><font size=3>Carinus</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>"Doron Shmaryahu"
<doron@crc.co.za></b> </font>
<br><font size=1 face="sans-serif">Sent by: mailscanner-bounces@lists.mailscanner.info</font>
<p><font size=1 face="sans-serif">2006/02/24 08:05</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
MailScanner discussion <mailscanner@lists.mailscanner.info></font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">"MailScanner discussion" <mailscanner@lists.mailscanner.info></font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">RE: MailScanner per user mail size limit</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=3>Hi,</font>
<br><font size=3> </font>
<br><font size=3>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</font>
<br><font size=3> I created a rule file contaiining the following:</font>
<br><font size=3> </font>
<br><font size=3>From: </font><a href=mailto:doron@crc.co.za></u></font><font size=3 color=blue><u>doron@crc.co.za</a><font size=3>
1024<br>
FromOrTo: default
-1 </font>
<br><font size=3> </font>
<br><font size=3>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.</font>
<br><font size=3> </font>
<br><font size=3>I see the correct size reporting from sendmal from=<</font><a href=mailto:doron@crc.co.za></u></font><font size=3 color=blue><u>doron@crc.co.za</a><font size=3>>,
size=317660. Is there anything else I am missing ?</font>
<br><font size=3> </font>
<br><font size=3>thanks again</font>
<br><font size=3><br>
Doron</font>
<br>
<br>
<hr><font size=3><b>From:</b> mailscanner-bounces@lists.mailscanner.info
[mailto:mailscanner-bounces@lists.mailscanner.info] <b>On Behalf Of </b>Brad
Beckenhauer<b><br>
Sent:</b> 24 February 2006 05:14 AM<b><br>
To:</b> MailScanner discussion<b><br>
Subject:</b> Re: MailScanner per user mail size limit<br>
</font>
<br><font size=3>>>> Doron Shmaryahu<doron@crc.co.za> 2/23/2006
4:22:49 PM >>></font>
<br><font size=3>Hi,<br>
<br>
I have MailScanner 4.50.15 running on a FreeBSD 4.11 machine. All is<br>
working perfectly. I have read through the docs on creating per user<br>
mail limits but until now I have still not been able to make it work. I<br>
would like the rule file to control mail size limits for each user.<br>
<br>
Are there any problems with this ?<br>
<br>
Could someone provide me a example rule file or any hints/docs would be<br>
appreciated.<br>
<br>
Thanks in advance<br>
<br>
Doron <br>
--</font>
<br><font size=3>This shoudl work for you.</font>
<br><font size=3>Create this file "MaximumAttachmentSize.rules"
in your "rules" </font>
<br><font size=3>directory and modify your MailScanner.conf as noted.</font>
<br><font size=3> </font>
<br><font size=3>#</font>
<br><font size=3># File Location/Name:<br>
# %rules-dir%/MaximumAttachmentSize.rules<br>
#<br>
# This is where you can build a ruleslist<br>
# that allows you to specify attachment size limits in bytes<br>
#<br>
# In MailScanner.conf change:<br>
# "Maximum Attachment Size = -1"<br>
# to<br>
# "Maximum Attachment Size = %rules-dir%/MaximumAttachmentSize.rules"<br>
#<br>
# Example values, adjust as needed<br>
# 1k = 1024 bytes<br>
# 10k = 10240 bytes<br>
# 100K = 102400 bytes<br>
# 1MB = 1024000 bytes<br>
# 10MB = 10240000 bytes<br>
# 100MB = 102400000 bytes<br>
# 250MB = 256000000 bytes<br>
# 500MB = 512000000 bytes<br>
# 1GB = 1024000000 bytes<br>
#<br>
# Size limits and Default should be smaller than the partition<br>
# where they are temporarily stored. ;-)<br>
#<br>
# Set addresses/domains to be limited as follows:<br>
# Direction Pattern
Size Limit<br>
# From: </font><a href=mailto:user@good.domain.com></u></font><font size=3 color=blue><u>user@good.domain.com</a><font size=3>
1024000 # Limit FROM specified user to 1MB<br>
# From: </font><a href=mailto:*@friendly.domain.com></u></font><font size=3 color=blue><u>*@friendly.domain.com</a><font size=3>
10240000 # Limit FROM specified domain to 10MB<br>
# From: 123.234.567.2
1024000 # Limit FROM IP address to 1MB<br>
# From: 123.234.
1024000 # Limit FROM IP range to
1MB<br>
# From: /^192\.168\.13[4567]\./ 1024000 # Limit FROM IP range
to 1MB<br>
# To: </font><a href=mailto:abc@xyz.com></u></font><font size=3 color=blue><u>abc@xyz.com</a><font size=3>
0 # No Attachments allowed TO this user<br>
# To: </font><a href=mailto:*@yahoo.com></u></font><font size=3 color=blue><u>*@yahoo.com</a><font size=3>
1024000
# Limit all TO this Domain to 1MB</font>
<br><font size=3>#</font>
<br><font size=3>To: </font><a href=mailto:user1@your.domain></u></font><font size=3 color=blue><u>user1@your.domain</a><font size=3>
102400 # Limit FROM specified user to 10Kbytes</font>
<br><font size=3>To: </font><a href=mailto:user2@your.domain></u></font><font size=3 color=blue><u>user2@your.domain</a><font size=3>
1024000 # Limit FROM specified user to 1MB<br>
To: </font><a href=mailto:user3@your.domain></u></font><font size=3 color=blue><u>user3@your.domain</a><font size=3>
10240000 # Limit FROM specified user to 10MB<br>
FromOrTo: default
-1 # Default, No attachment Size Checking.<br>
</font><font size=2><tt>-- <br>
MailScanner mailing list<br>
mailscanner@lists.mailscanner.info<br>
http://lists.mailscanner.info/mailman/listinfo/mailscanner<br>
<br>
Before posting, read http://wiki.mailscanner.info/posting<br>
<br>
Support MailScanner development - buy the book off the website! <br>
</tt></font>
<br><p><br />
--
<br />
This e-mail and its contents are subject to the <br />
<strong>South African Medical Research
Council </strong><br />
e-mail legal notice available at <a href="http://www.mrc.ac.za/about/EmailLegalNotice.htm">http://www.mrc.ac.za/about/EmailLegalNotice.html</a></p>