Time of day size restrictions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Time of day size restrictions

Jeffrey Shawn Klotz-2
Does anyone know a way to set the message size restriction based on time
of day?

In the AM I have a large volume of outgoing traffic.  If users send
large messages it exceeds the bandwith of the circuit.
The AM messages are time sensitive so max outgoing performance is critical.

In the PM there is very light volume so large messages are not a
problem. The PM messages are not time sensitive so slower performance
isn't an issue.

This is a dedicated list server so if I can restrict the size of
incoming mail based on time of day it will also limit the size of the
outgoing.

Thanks...


Reply | Threaded
Open this post in threaded view
|

Re: Time of day size restrictions

Ralf Hildebrandt
* Jeffrey Shawn Klotz <[hidden email]>:
> Does anyone know a way to set the message size restriction based on time  
> of day?

With a cronjob

0 0 * * *  postconf -e "message_size_limit = big" && postfix reload
0 8 * * *  postconf -e "message_size_limit = small" && postfix reload

--
Ralf Hildebrandt ([hidden email])          [hidden email]
Postfix - Einrichtung, Betrieb und Wartung       Tel. +49 (0)30-450 570-155
http://www.arschkrebs.de
This universe shipped by weight, not by volume.  Some expansion of the
contents may have occurred during shipment.
Reply | Threaded
Open this post in threaded view
|

Re: Time of day size restrictions

Brian Evans - Postfix List
In reply to this post by Jeffrey Shawn Klotz-2
Jeffrey Shawn Klotz wrote:

> Does anyone know a way to set the message size restriction based on
> time of day?
>
> In the AM I have a large volume of outgoing traffic.  If users send
> large messages it exceeds the bandwith of the circuit.
> The AM messages are time sensitive so max outgoing performance is
> critical.
>
> In the PM there is very light volume so large messages are not a
> problem. The PM messages are not time sensitive so slower performance
> isn't an issue.
>
> This is a dedicated list server so if I can restrict the size of
> incoming mail based on time of day it will also limit the size of the
> outgoing.
>
> Thanks...
>
>
You need a policy daemon that supports ACLs by time.
Make sure to use a 450 response code so a mailer will try again later.

Note: this will NOT work on items you are sending out that do not come
in via smtpd (aka sendmail command).

A quick check finds www.apolicy.org but I'm sure there are others. (No
experience with this one, so YMMV.)

Ralf also has a suggestion.

Brian