OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: automatically hold messages larger than 15MB?

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Thu Aug 16 2007 - 16:11:49 CDT


At 03:45 PM 8/16/2007, Gregory K. Ruiz-Ade wrote:
>This may seem like an odd request, but would there be a way for me to
>have postfix automatically do the equivalent of a "postsuper -h
><queue_id>" on any message that's larger than a certain size?
>
>I'm trying to debug a mail server problem (the ltmp daemon is
>crashing on large messages), but I don't want to stop up other mail
>in the process.
>
>This is a very temporary problem, but it's a pain to keep looking
>through mailq output and picking out queue ids of large messages to
>manually hold. :)

Nothing in postfix that can do that by itself.

How about putting all mail on hold and running a script that releases
mail smaller than the target size?
# main.cf
# put all smtp mail on hold
smtpd_sender_restrictions =
   static:hold

Sorry, don't have a sample 'release if less than 15M' script handy,
but you could do this by either parsing the output of mailq or by
searching the "hold" queue directory.

--
Noel Jones