OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: smtpd_proxy_filter by size

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Mon Dec 03 2007 - 09:49:02 CST


C. Vorwerk wrote:
> Noel Jones schrieb:
>> It's not possible to select a proxy based on some message property.
>> Postfix must open the proxy *first*, before any message property is
>> known.
>>
>> Perhaps you can configure your proxy to stop scanning (just pass
>> transparently) after some byte limit.
>>
>
>
> Well, i could start two instances of clamavd with different config
> files. There you can configure the max size of a file to scan. this
> would lead to more used resources which i don't want.
>
> I understand now why postfix can't help. Do you know another way for my
> problem?

I don't think there is a good solution to your goal of
scanning mail up to some size pre-queue and scan the rest
post-queue.

Running two clamd daemons and routing mail to the second one
as a post-queue content_filter is the only way I can think of.
  While resource usage probably wouldn't be terrible, it is
rather complex and awkward. This also requires some bit of
glue so postfix can select a FILTER based on the size of the
message. The SA plugin is one way, another way is a policy
service that either uses PREPEND to add a X-Size: header or
just returns a FILTER command itself.

more info here might help:
http://www.postfix.org/SMTPD_POLICY_README.html
http://www.postfix.org/addon.html#policy

--
Noel Jones