hi all,

is there a way to limit the maximum size of a single message in postfix?

i am writing a customized local delivery agent (in Perl!!) so that i can
do mail delivery in the absense of local unix accounts (and, since it's
Perl, i can authenticate via database; i also store quotas, mail box path,
etc, in the database).

i am using Graham Barr's Mail::Internet to do my magic, and there seems to
be no way to determine the length of a given message except using the
Mail::Internet::as_string() function to output the message into a Perl
string, and then use length() to determine the size.

now using Mail::Internet::as_string() is probably CPU-expensive, but i
can't avoid it. since the typical mailbox quota is 5MB, i want to limit
maximum message size to maybe 2.5MB, this will put a cap on the CPU usage
of delivering a big message.

also, if someone sends a 200MB message, i want it bounced immediately (i
don't want it to reach my local delivery agent) because it will bounce
anyway since it exceeds the quota.


---------------------------------------------------------------------
Orlando Andico <[EMAIL PROTECTED]>       POTS Phone: +63   (2) 937-2293
Mosaic Communications, Inc.            GSM Mobile: +63 (917) 531-5893
I'm not suffering from insanity -- I'm enjoying  every minute of it!!

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to