Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ClamAV: users

Quarantine issue with new 0.95.x clamav-milter

 

 

ClamAV users RSS feed   Index | Next | Previous | View Threaded


cheeks at swcp

Nov 9, 2009, 12:30 PM

Post #1 of 15 (2054 views)
Permalink
Quarantine issue with new 0.95.x clamav-milter

I recently upgraded to ClamAV 0.95.3 and have been grappling with
the new milter. I understand why it was rewritten, but there's one
aspect of the previous functionality that I really miss. I'm hoping
there's a way to emulate it (possibly with Sendmail config) and
wonder if anyone has any advice.

Prior to 0.95, I had my clamav-milter configured to quarantine messages
and reject them. So the sender got a 550 SMTP response, and we got
a copy of the payload they were trying to send.

In 0.95.3, I have the choice to tell the milter to Reject the message
(which results in no quarantine) or to quarantine the message (which
results in sendmail giving the sender a 200 "message accepted"
response).

The problem with this is false positives. We don't see many FPs
with ClamAV, but we do get them a few times per year. We don't see
FPs with the main ClamAV databases, but we see a few with the
supplemental signatures from SaneSecurity for example.

The FP rate is very low, but in the case of an FP it's very helpful
if (1) the sender got a reject so they know the message was not delivered
*and* (2) we have a copy of the payload to look at, diagnose, whitelist,
and possibly report the FP.

Does anyone know a way to make sendmail return a 550 for quarantined
messages? I'm using Sendmail 8.14.3.

Thanks,

Mark
--
Mark Costlow | Southwest Cyberport | Fax: +1-505-232-7975
cheeks [at] swcp | Web: www.swcp.com | Voice: +1-505-232-7992

abq-strange.com -- Interesting photos taken in Albuquerque, NM
Last post: Shoe Pole - 2009-07-07 20:18:22
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


gesbbb at yahoo

Nov 9, 2009, 2:52 PM

Post #2 of 15 (1977 views)
Permalink
Quarantine issue with new 0.95.x clamav-milter [In reply to]

On Mon, 9 Nov 2009 13:30:34 -0700
Mark Costlow <cheeks [at] swcp> replied:

> I recently upgraded to ClamAV 0.95.3 and have been grappling with
> the new milter. I understand why it was rewritten, but there's one
> aspect of the previous functionality that I really miss. I'm hoping
> there's a way to emulate it (possibly with Sendmail config) and
> wonder if anyone has any advice.
>
> Prior to 0.95, I had my clamav-milter configured to quarantine
> messages and reject them. So the sender got a 550 SMTP response, and
> we got a copy of the payload they were trying to send.
>
> In 0.95.3, I have the choice to tell the milter to Reject the message
> (which results in no quarantine) or to quarantine the message (which
> results in sendmail giving the sender a 200 "message accepted"
> response).
>
> The problem with this is false positives. We don't see many FPs
> with ClamAV, but we do get them a few times per year. We don't see
> FPs with the main ClamAV databases, but we see a few with the
> supplemental signatures from SaneSecurity for example.
>
> The FP rate is very low, but in the case of an FP it's very helpful
> if (1) the sender got a reject so they know the message was not
> delivered *and* (2) we have a copy of the payload to look at,
> diagnose, whitelist, and possibly report the FP.
>
> Does anyone know a way to make sendmail return a 550 for quarantined
> messages? I'm using Sendmail 8.14.3.

You don't want to bounce the message, yet you are telling the sender
that it was not delivered. That is inconsistent. Why not simply send a
notice to the email originator that the message was quarantined? That
would be consistent and factually correct.


--
Jerry
gesbbb [at] yahoo

|::::=======
|::::=======
|===========
|===========
|

Modeling paged and segmented memories is tricky business.


P. J. Denning

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


michael at orlitzky

Nov 9, 2009, 3:08 PM

Post #3 of 15 (1976 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

Jerry wrote:
>
> You don't want to bounce the message, yet you are telling the sender
> that it was not delivered. That is inconsistent. Why not simply send a
> notice to the email originator that the message was quarantined? That
> would be consistent and factually correct.
>

It's not inconsistent at all. That's what you're supposed to do with
mail you know you can't deliver at SMTP-time. The sender's mail server
sees the "550", and reports the non-delivery to him or her.

Accept-and-bounce has been frowned upon for some time; it's called
backscatter and will make you a bad person:

http://www.backscatterer.org/?target=backscatter

Furthermore, almost all virus mail has a forged sender, so this is a
particularly bad place to accept-and-bounce.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


steve at greengecko

Nov 9, 2009, 3:26 PM

Post #4 of 15 (1970 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

On Mon, 2009-11-09 at 17:52 -0500, Jerry wrote:
> On Mon, 9 Nov 2009 13:30:34 -0700
> Mark Costlow <cheeks [at] swcp> replied:

> You don't want to bounce the message, yet you are telling the sender
> that it was not delivered. That is inconsistent. Why not simply send a
> notice to the email originator that the message was quarantined? That
> would be consistent and factually correct.

No that's not right. The difference is that when you're performing the
SMTP handshaking, you're talking to the server attempting to deliver it
( not necessarily the originator, but back up the pipeline ). Bouncing
the message is returning to the sender as defined in the reply to:
header in the message itself... which is just the payload that SMTP has
delivered, and does not necessarily have anything to do with the real
sender at all.

This is actually a good way of ensuring that the spam itself arrives at
a larger audience without and extra effort on the spammers part at all.

Which is a bad thing (:

Cheers,

Steve
--
Steve Holdoway <steve [at] greengecko>
http://www.greengecko.co.nz
MSN: steve [at] greengecko
GPG Fingerprint = B337 828D 03E1 4F11 CB90 853C C8AB AF04 EF68 52E0
Attachments: signature.asc (0.19 KB)


gesbbb at yahoo

Nov 9, 2009, 3:28 PM

Post #5 of 15 (1976 views)
Permalink
Re: [Bulk] Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

On Mon, 09 Nov 2009 18:08:10 -0500
Michael Orlitzky <michael [at] orlitzky> replied:

> Jerry wrote:
> >
> > You don't want to bounce the message, yet you are telling the sender
> > that it was not delivered. That is inconsistent. Why not simply
> > send a notice to the email originator that the message was
> > quarantined? That would be consistent and factually correct.
> >
>
> It's not inconsistent at all. That's what you're supposed to do with
> mail you know you can't deliver at SMTP-time. The sender's mail
> server sees the "550", and reports the non-delivery to him or her.
>
> Accept-and-bounce has been frowned upon for some time; it's called
> backscatter and will make you a bad person:
>
> http://www.backscatterer.org/?target=backscatter
>
> Furthermore, almost all virus mail has a forged sender, so this is a
> particularly bad place to accept-and-bounce.

Unless I am totally misunderstanding you, you want a copy of the
message. Is that correct? If so, you have in fact accepted the message
no matter how you try to word it. If you then tell the originator of the
message that it was not accepted, that would be factually incorrect. At
no point did I suggest implementing a 'backscatter' routine.

You really only have two options:

1) bounce the message
2) accept it and set up routing rules for questionable mail.

--
Jerry
gesbbb [at] yahoo

|::::=======
|::::=======
|===========
|===========
|

Execute every act of thy life as though it were thy last.


Marcus Aurelius

_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


tshaw at oitc

Nov 9, 2009, 5:59 PM

Post #6 of 15 (1970 views)
Permalink
Re: [Bulk] Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

At 6:28 PM -0500 11/9/09, Jerry wrote:
>On Mon, 09 Nov 2009 18:08:10 -0500
>Michael Orlitzky <michael [at] orlitzky> replied:
>
>> Jerry wrote:
>> >
>> > You don't want to bounce the message, yet you are telling the sender
>> > that it was not delivered. That is inconsistent. Why not simply
>> > send a notice to the email originator that the message was
>> > quarantined? That would be consistent and factually correct.
>> >
>>
>> It's not inconsistent at all. That's what you're supposed to do with
>> mail you know you can't deliver at SMTP-time. The sender's mail
>> server sees the "550", and reports the non-delivery to him or her.
>>
>> Accept-and-bounce has been frowned upon for some time; it's called
>> backscatter and will make you a bad person:
>>
>> http://www.backscatterer.org/?target=backscatter
>>
>> Furthermore, almost all virus mail has a forged sender, so this is a
>> particularly bad place to accept-and-bounce.
>
>Unless I am totally misunderstanding you, you want a copy of the
>message. Is that correct? If so, you have in fact accepted the message
>no matter how you try to word it. If you then tell the originator of the
>message that it was not accepted, that would be factually incorrect. At
>no point did I suggest implementing a 'backscatter' routine.
>
>You really only have two options:
>
>1) bounce the message
>2) accept it and set up routing rules for questionable mail.

Jerry,

Not to incite a flame war here but STMP error codes are not built to
capture the nuance that Michael is wrestling with.

As I understand it he wants his mailserver to accept the message and
quarantine it for analysis and not for later delivery and NOT deliver
it to the recipient.

It seems to me perfectly acceptable to return a 5xx as the message
has not been accepted for delivery to the recipient.

Tom
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


michael at orlitzky

Nov 9, 2009, 7:27 PM

Post #7 of 15 (1968 views)
Permalink
Re: [Bulk] Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

Tom Shaw wrote:
>>
>> You really only have two options:
>>
>> 1) bounce the message
>> 2) accept it and set up routing rules for questionable mail.
>
> Jerry,
>
> Not to incite a flame war here but STMP error codes are not built to
> capture the nuance that Michael is wrestling with.
>
> As I understand it he wants his mailserver to accept the message and
> quarantine it for analysis and not for later delivery and NOT deliver it
> to the recipient.
>
> It seems to me perfectly acceptable to return a 5xx as the message has
> not been accepted for delivery to the recipient.
>
> Tom

I wasn't the OP, just pointing out that option #1 was a bad idea.
Personally, I don't see enough virus mail from legit senders that I
would want to notify the sender, even with a 550 at SMTP-time. We use
scoring to (in theory) avoid quarantining the false positives from
third-party signatures.

However, for someone using the milter, 550-and-quarantine seems
worthwhile, and certainly doesn't hurt anything -- especially since (I
gather) it worked in the past.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


acabng at digitalfuture

Nov 10, 2009, 4:11 AM

Post #8 of 15 (1963 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

Mark Costlow wrote:
> Prior to 0.95, I had my clamav-milter configured to quarantine messages
> and reject them. So the sender got a 550 SMTP response, and we got
> a copy of the payload they were trying to send.
>
> In 0.95.3, I have the choice to tell the milter to Reject the message
> (which results in no quarantine) or to quarantine the message (which
> results in sendmail giving the sender a 200 "message accepted"
> response).

Hi,

This was requested and tried before. However it never worked and the
code was reverted.

Despite libmiter api's theorically allowing quarantine+reject, in
practice, sendmail doesn't obey and only performs one of the actions
(reject but not quarantine, IIRC).

-acab
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


nathan at cmpublishers

Nov 10, 2009, 5:10 AM

Post #9 of 15 (1954 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

* aCaB wrote:
> Mark Costlow wrote:
>> Prior to 0.95, I had my clamav-milter configured to quarantine messages
>> and reject them. So the sender got a 550 SMTP response, and we got
>> a copy of the payload they were trying to send.
>>
>> In 0.95.3, I have the choice to tell the milter to Reject the message
>> (which results in no quarantine) or to quarantine the message (which
>> results in sendmail giving the sender a 200 "message accepted"
>> response).
>
> Hi,
>
> This was requested and tried before. However it never worked and the
> code was reverted.
>
> Despite libmiter api's theorically allowing quarantine+reject, in
> practice, sendmail doesn't obey and only performs one of the actions
> (reject but not quarantine, IIRC).
>
I understand that part of the problem.
Sendmail's fault not yours.

However, form a user's perspective, if the old version did, and the
upgrade can't, then the upgrade was a downgrade. At which point a
different solution may need to be considered.

Its very hard to claim that you CAN'T fly, when a user base of several
thousand SAW you fly.


--
Sincerely,

Nathan Gibbs

Systems Administrator
Christ Media
http://www.cmpublishers.com
Attachments: signature.asc (0.19 KB)


ged at jubileegroup

Nov 10, 2009, 10:19 AM

Post #10 of 15 (1940 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

Hi there,

On Tue, 10 Nov 2009 Mark Costlow wrote:

> Prior to 0.95, I had my clamav-milter configured to quarantine messages
> and reject them. So the sender got a 550 SMTP response, and we got
> a copy of the payload they were trying to send.
>
> In 0.95.3, I have the choice to tell the milter to Reject the message
> (which results in no quarantine) or to quarantine the message (which
> results in sendmail giving the sender a 200 "message accepted" response).

You're not the first to mention this. Nor was I:

http://www.mail-archive.com/clamav-users%40lists.clamav.net/msg27971.html

As you have now seen there is a widely held misconception that reading
the text of an incoming message and accepting the message amount to the
same thing. As you know, they are not the same at all. It's necessary
to read an incoming mail to see if it has a malicious content, and of
course you might then not want to deliver it. So although you will
reject the message during the SMTP conversation, you've still read it.
It should come as no surprise to anyone that having read the message,
it's possible to store it somewhere in the filesystem, e.g. for later
analysis, despite the fact that the message is to be rejected.

> Does anyone know a way to make sendmail return a 550 for quarantined
> messages? I'm using Sendmail 8.14.3.

Not if the quarantining is caused by clamav-milter. When I asked
about this a while ago, the new milter's author said "if you don't
like it, you can always use the old version which is kept under
/contrib/old-clamav-milter". To be fair, I don't think his first
qualification was in Customer Relations. :)

The old milter and the new milter view quarantining differently. The
old milter wrote the message to a file in a quarantine directory of
its own. The new one doesn't do that, instead it uses the Sendmail
milter API to tell Sendmail to quarantine the message in the Sendmail
queue directory. The milter API definition states that flagging a
message for quarantine makes no other change to the message status, so
Sendmail won't reject it just for that reason:

https://www.milter.org/developers/api/index

That means that if you use the new clamav-milter to quarantine the
messages, then you're stuck with the behaviour that you've described
unless you want to do a bit of coding in the milter, or to shout loud
enough for the clamav developer concerned to notice. He also said
that if Sendmail is told both to quarantine and to reject a message it
doesn't do what it's told. That makes sense, so I haven't tried. (*)

You do need to think what is meant by 'quarantine'. I think there's a
basic incompatibility between the idea of 'quarantine' as implemented
by the Sendmail code and as in "put the message there and reject it".
Sendmail means 'defer delivery until somebody has had a look at this'.
So when it quarantines a message, practically all that Sendmail will
do is change the way the file is stored in its queue directory. This
results in the message being ignored by the queue runner (which would
otherwise cause the message to be delivered) until the 'quarantined'
status is removed from the message. The administrator can take a
coffee break, or go on holiday, before he gets around to doing this
and obviously nobody would expect the sending servers to sit around
waiting for a return code while he's lying on a beach in the Bahamas.
So Sendmail is pretty much obliged to accept those messages which it
quarantines in its own queue directory.

When the old clamav-milter quarantined a message by putting it in a
directory of its own, not within the grasp of Sendmail, as far as all
the mail servers were concerned if Sendmail then rejected the message
that was the end of it. You would have a copy, but Sendmail neither
knows nor cares about that.

To mimic the old behaviour you could have clamav-milter add headers to
infected messages, and use another milter to read those headers then
store and reject the mail if it sees an 'infected' header. MIMEDefang
can do what you want, at the price of some complexity and overhead.

A simpler alternative is to write all the incoming mail to a log file,
as it comes in, during the SMTP conversation. One of the milters that
I use (milter-regex, which I highly recommend) does this as an option.
If a message is rejected for any reason, the full text (or, depending
on how you configure things, perhaps just the text up to the point at
which a decision was made to reject) will be in the log. It's a bit
of a pain to retrieve messages from the logs, and naturally they grow
rapidly and will need to be rotated regularly.

..oOo..

* To try it, all you'd probably need to do is change one line in the
function action_quarantine() clamfi.c and recompile:

static sfsistat action_quarantine(SMFICTX *ctx) {
if(smfi_quarantine(ctx, "quarantined by clamav-milter") != MI_SUCCESS) {
logg("^Failed to quarantine message\n");
return SMFIS_TEMPFAIL;
}
return SMFIS_ACCEPT;
}

Change SMFIS_ACCEPT to SMFIS_REJECT and see what happens. If it does
work, please let us know. If it doesn't work, then maybe we can come
up with something. It might mean quite a bit of coding to set up a
quarantine directory, and I probably wouldn't have time for that, but
a lot of the work has probably been done in the old milter. The odds
are that the code wouldn't make it into the ClamAV trunk unless a lot
of people make their appreciation known on this list.

--

73,
Ged.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


nathan at cmpublishers

Nov 10, 2009, 11:58 AM

Post #11 of 15 (1937 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

* G.W. Haywood wrote:
> Hi there,
>
> It should come as no surprise to anyone that having read the message,
> it's possible to store it somewhere in the filesystem, e.g. for later
> analysis, despite the fact that the message is to be rejected.
>

:-)

>> Does anyone know a way to make sendmail return a 550 for quarantined
>> messages? I'm using Sendmail 8.14.3.
>
> Not if the quarantining is caused by clamav-milter. When I asked
> about this a while ago, the new milter's author said "if you don't
> like it, you can always use the old version which is kept under
> /contrib/old-clamav-milter". To be fair, I don't think his first
> qualification was in Customer Relations. :)
>

Chomp, chomp, chomp.
Down, be nice.

>
> When the old clamav-milter quarantined a message by putting it in a
> directory of its own, not within the grasp of Sendmail, as far as all
> the mail servers were concerned if Sendmail then rejected the message
> that was the end of it. You would have a copy, but Sendmail neither
> knows nor cares about that.
>

I understand the desire to have someone else's code do the work, but
there is a gain in flexibility when you do it yourself.

> To mimic the old behaviour you could have clamav-milter add headers to
> infected messages, and use another milter to read those headers then
> store and reject the mail if it sees an 'infected' header. MIMEDefang
> can do what you want, at the price of some complexity and overhead.
>
> A simpler alternative is to write all the incoming mail to a log file,
> as it comes in, during the SMTP conversation. One of the milters that
> I use (milter-regex, which I highly recommend) does this as an option.
> If a message is rejected for any reason, the full text (or, depending
> on how you configure things, perhaps just the text up to the point at
> which a decision was made to reject) will be in the log. It's a bit
> of a pain to retrieve messages from the logs, and naturally they grow
> rapidly and will need to be rotated regularly.
>
> ..oOo..
>

Added complexity to something that should be simple.
Then again, why do it simply when we can get the users to do it
back-tailwards.

Grrrr, ROAR.
DOWN!

> * To try it, all you'd probably need to do is change one line in the
> function action_quarantine() clamfi.c and recompile:
>
> static sfsistat action_quarantine(SMFICTX *ctx) {
> if(smfi_quarantine(ctx, "quarantined by clamav-milter") != MI_SUCCESS) {
> logg("^Failed to quarantine message\n");
> return SMFIS_TEMPFAIL;
> }
> return SMFIS_ACCEPT;
> }
>

C Coding, something that, fortunately for this project, I don't know how
to do.

> Change SMFIS_ACCEPT to SMFIS_REJECT and see what happens. If it does
> work, please let us know. If it doesn't work, then maybe we can come
> up with something. It might mean quite a bit of coding to set up a
> quarantine directory, and I probably wouldn't have time for that, but
> a lot of the work has probably been done in the old milter. The odds
> are that the code wouldn't make it into the ClamAV trunk unless a lot
> of people make their appreciation known on this list.
>

HERE! HERE!


_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


cheeks at swcp

Nov 11, 2009, 5:10 PM

Post #12 of 15 (1914 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

On Tue, Nov 10, 2009 at 08:10:51AM -0500, Nathan Gibbs wrote:
> * aCaB wrote:
> > Mark Costlow wrote:
> >> Prior to 0.95, I had my clamav-milter configured to quarantine messages
> >> and reject them. So the sender got a 550 SMTP response, and we got
> >> a copy of the payload they were trying to send.
> >>
> >> In 0.95.3, I have the choice to tell the milter to Reject the message
> >> (which results in no quarantine) or to quarantine the message (which
> >> results in sendmail giving the sender a 200 "message accepted"
> >> response).
> >
> > Hi,
> >
> > This was requested and tried before. However it never worked and the
> > code was reverted.
> >
> > Despite libmiter api's theorically allowing quarantine+reject, in
> > practice, sendmail doesn't obey and only performs one of the actions
> > (reject but not quarantine, IIRC).
> >
> I understand that part of the problem.
> Sendmail's fault not yours.
>
> However, form a user's perspective, if the old version did, and the
> upgrade can't, then the upgrade was a downgrade. At which point a
> different solution may need to be considered.
>
> Its very hard to claim that you CAN'T fly, when a user base of several
> thousand SAW you fly.

Well put :-)

On the server I was upgrading, I've made do with "reject but don't
quarantine". I have another server that I plan to upgrade in the
next week or so. I'll try the suggested fix against the latest
sendmail (although I don't think there's abeen a sendmail release
in over 12 months, so I doubt anything has changed). I'll report
back here what it does.

Thanks for all the input guys.

Mark
--
Mark Costlow | Southwest Cyberport | Fax: +1-505-232-7975
cheeks [at] swcp | Web: www.swcp.com | Voice: +1-505-232-7992

abq-strange.com -- Interesting photos taken in Albuquerque, NM
Last post: Shoe Pole - 2009-07-07 20:18:22
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


a_s_y at sama

Nov 19, 2009, 1:30 AM

Post #13 of 15 (1711 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

On Tuesday 10 November 2009, Mark Costlow wrote:

> Does anyone know a way to make sendmail return a 550 for quarantined
> messages?  I'm using Sendmail 8.14.3.

What do you think about replace (possible temporary) "clamav-milter" to
"mailfromd" ? It is possible but need of some programming on internal
script language of "mailfromd".

--
Regards,
Sergey
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


ged at jubileegroup

Nov 19, 2009, 9:35 AM

Post #14 of 15 (1702 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

Hi there,

On Thu, 19 Sergey wrote:

> On Tuesday 10 November 2009, Mark Costlow wrote:
>
> > Does anyone know a way to make sendmail return a 550 for quarantined
> > messages? ?I'm using Sendmail 8.14.3.
>
> What do you think about replace (possible temporary) "clamav-milter" to
> "mailfromd" ? It is possible but need of some programming on internal
> script language of "mailfromd".

Briefly scanning the commendably thorough documentation of mailfromd
left me with the impression that it would not be an ideal replacement
for ClamAV, but that the two could probably work together quite well.
In my installations mailfromd might replace two or three other milters,
which could both simplify the configuration and add useful capability.

Sergey, assuming you are the author of mailfromd, perhaps you can give
us some performance estimates? I'm particularly interested in the use
of mailfromd to scan mail (the SMTP conversation, individually named
headers, and the body) using regular expressions. At my sites, before
scanning by the more expensive filters like Clamav and MIMEDefang
takes place, all mail is scanned line-by-line by milter-regex, using
something like 1,000 regular expressions. The expressions are built
using macros, so they can each be fairly complex, but typically they
are simple strings which contain no special characters. Almost no
state is stored for a scanned line, so milter-regex can't for example
tell if the same pattern is matched more than once in a given message.
That's the kind of flexibility I've been looking for.

Again assuming that you are the author, now that it has moved quite a
way from its original purpose, have you considered changing the name
'mailfromd' to something less, er, contentious?

As this is probably going to stray well OT, please feel free to reply
to me privately, if you can send mail from a server which I haven't
firewalled and a domain I haven't blacklisted. Unfortunately Russia
and Ukraine are on the blacklist, and most IPs in eastern Europe are
dropped by my firewalls. :)

--

73,
Ged.
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml


a_s_y at sama

Nov 19, 2009, 3:12 PM

Post #15 of 15 (1684 views)
Permalink
Re: Quarantine issue with new 0.95.x clamav-milter [In reply to]

On Thursday 19 November 2009, G.W. Haywood wrote:

> left me with the impression that it would not be an ideal replacement
> for ClamAV

Not for ClamAV, for clamav-milter only. It repeats the some functionality
of clamav-milter without quarantine:

http://www.sisyphus.ru/en/srpm/Sisyphus/mailfromd/sources/12

> Sergey, assuming you are the author of mailfromd,

No, I only have the same name. :-)

> Almost no state is stored for a scanned line, so milter-regex can't
> for example tell if the same pattern is matched more than once in a
> given message. That's the kind of flexibility I've been looking for.

If I understand you correctly, it is possible. This is not a precise
example but it should be like:

http://www.sisyphus.ru/en/srpm/Sisyphus/mailfromd/sources/0

In this line

set ma_hit_num massallocated_hit(${client_ptr}, %massallocated_regexps)

massallocated_hit returns a number of regular expression which matched
with client_ptr. massallocated_hit is a user defined function:

http://www.sisyphus.ru/en/srpm/Sisyphus/mailfromd/sources/6

%massallocated_regexps defined in

http://www.sisyphus.ru/en/srpm/Sisyphus/mailfromd/sources/5

--
Regards,
Sergey
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://www.clamav.net/support/ml

ClamAV users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.