On Wed, 2004-05-05 at 10:06, Jussi Vainionpaa wrote:
> I'm running courier with virtual users and courier's quotas. My problem is
> that some users are constantly over their quota and the spam they get
> creates DSNs to the faked senders.
>
> Is it possible to configure courier to do over quota rejection at the SMTP
> stage so that there would be no need for DSNs?
Rejecting because quota in the SMTP stage seems a good idea. Maybe using
Gordon's pythonfilter and this snippet of code somebody can implement
it. (Gordon?)
#!/usr/bin/env python
# Program to see the usage of a mailir using quota, not used by quica
# First argument is a maildir
import sys, string, os.path
suma_size = 0
suma_count = 0
file = open(os.path.join(sys.argv[1], 'maildirsize'), 'r')
(quota_size, quota_count) = file.readline().strip().split(',')
quota_size = int(quota_size[:-1])
quota_count = int(quota_count[:-1])
while 1:
line = file.readline()
if line == '':
break
(size, count) = line.strip().split()
suma_size = suma_size + int(size)
suma_count = suma_count + int(count)
print 'Alloc Size: ' + \
string.zfill(repr(int(suma_size * 100 / quota_size)), 3) + '%'
print 'Messages: ' + \
string.zfill(repr(int(suma_count * 100 / quota_count)), 3) + '%'
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users