Re: [Mimedefang] SA scores

2006-10-18 Thread David F. Skoll
Kees Theunissen wrote:

>   grep LOCAL_STATE_DIR `which sa-update`
>   grep LOCAL_STATE_DIR `which spamassassin`
>   grep LOCAL_STATE_DIR `which spamd`

It's possible to install the Mail::SpamAssassin Perl module without installing
sa-update, spamassassin or spamd.  I admit that it's unlikely, but still:
In principle, a distribution could split SpamAssassin into something
like perl-Mail-SpamAssassin and spamassassin-tools, for example.

There should be a way to query Mail::SpamAssassin for this info.

Regards,

David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] SA scores

2006-10-18 Thread Kees Theunissen
On Wed, 18 Oct 2006, Philip Goisman wrote:

> Date: Wed, 18 Oct 2006 10:17:22 -0400
> From: "David F. Skoll" <[EMAIL PROTECTED]>
> Subject: Re: [Mimedefang] SA scores
> To: mimedefang@lists.roaringpenguin.com
>
> Mike Lambert wrote:
>
> > In spamassassin's Makefile.PL, LOCAL_STATE_DIR is set by macro on my
> > system to "/var/lib/spamassassin". But in mimedefang.pl,
> >  LOCAL_STATE_DIR = '/var/lib'.
> >
> We should file a bug with SpamAssassin, because there is *no way* to
> determine the proper value for LOCAL_STATE_DIR unless you can get
> the output of spamassassin's configure script.
>
> Regards,
>
> David.

There *is a way* to determine the proper value for LOCAL_STATE_DIR.
I admit that it is a dirty way, but it can be done.
Just execute one of the following commands:
  grep LOCAL_STATE_DIR `which sa-update`
  grep LOCAL_STATE_DIR `which spamassassin`
  grep LOCAL_STATE_DIR `which spamd`
Parsing the output of these commands *is* prone to errors because
it depends on text formatting that can vary between SA releases.
That's why I call it a dirty way.

Determining the value of LOCAL_STATE_DIR should be done at
run time (start up time will be fine I guess) of MimeDefang.
Determining this value at install time of MimeDefang will fail
sometimes as the value varies between SA releases.

On a Slackware 10.2 Linux system with SpamAssassin 3.1.4 installed
from CPAN (I'm not absolutely sure but but I think it was a first
time installation):

  [EMAIL PROTECTED]:~$ grep LOCAL_STATE_DIR `which spamassassin`
  my $LOCAL_STATE_DIR = '/var/lib';# substituted at 'make' time
  LOCAL_STATE_DIR => $LOCAL_STATE_DIR,

The same system, still Slackware 10.2, with SpamAssassin
upgraded from CPAN to version 3.1.7 a few minutes ago:

  [EMAIL PROTECTED]:~$  grep LOCAL_STATE_DIR `which spamassassin`
  my $LOCAL_STATE_DIR = '/var/lib/spamassassin';# substituted at
  'make' time
  LOCAL_STATE_DIR => $LOCAL_STATE_DIR,


>
>Why not make LOCAL_STATE_DIR = '/usr/share/spamassassin'?  The directory
>"/var/lib/spamassassin" does not exist on my system - rhel4.
>
>Philip

It looks like the directory used by SA varies greatly between
installations/versions. It might be possible to fix this directory,
as far as MimeDefang is concerned, to for instance
/usr/share/spamassassin.  Some testing is needed to be sure about this.
But this has a side effect. Running spamassassin or spamd/spamc
from the commandline or running SpamAssassin from MimeDefang will
run different tests. It's your choice whether this is acceptable
or not in your situation. But I would be carefull to introduce
such a (extra) difference as a general case.

-- 
Kees Theunissen
F.O.M.-Institute for Plasma Physics Rijnhuizen, Nieuwegein, Netherlands
E-mail: [EMAIL PROTECTED],  Tel: (+31|0)306096724,  Fax: (+31|0)306031204

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] SA scores

2006-10-18 Thread Kenneth Porter
--On Wednesday, October 18, 2006 10:17 AM -0400 "David F. Skoll" 
<[EMAIL PROTECTED]> wrote:



We should file a bug with SpamAssassin, because there is *no way* to
determine the proper value for LOCAL_STATE_DIR unless you can get
the output of spamassassin's configure script.


Done:




___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] SA scores

2006-10-18 Thread Philip Goisman
Date: Wed, 18 Oct 2006 10:06:38 -0400
From: Mike Lambert <[EMAIL PROTECTED]>
Subject: Re: [Mimedefang] SA scores
To: mimedefang@lists.roaringpenguin.com

Miha Verlic wrote:
>> X-Spam-Score: 2.25 (**) 
>> BAYES_50,EXTRA_MPART_TYPE,HTML_IMAGE_ONLY_20,HTML_MESSAGE
>>
>> Similiar message from spamassassin:
>>
>> X-Spam-Status: Yes, score=10.8 required=5.0 
>> tests=BAYES_50,EXTRA_MPART_TYPE,
>>HTML_IMAGE_ONLY_20,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,
>>SARE_GIF_ATTACH,SARE_GIF_STOX,TVD_FW_GRAPHIC_ID1,
>>TVD_FW_GRAPHIC_NAME_LONG,UNPARSEABLE_RELAY autolearn=no 
> 
> TVD_* rules are located in 80_additional.cf spamassassin 
configuration file
> 
> Plain "perl Makefile.PL, make, make install" only installs 10_* 
through 
> 60_* configuration files into /usr/share/spamassassin/, but when you 
run 
> sa-update it downloads updates with 70_* and 80_* rulesets into 
> /var/lib/spamassassin/3.001007/updates_spamassassin_org/. If you 
invoke 
> spamassassin via shell, it will use both configuration directories, 
> while mimedefang uses only /usr/share/spamassassin/.

In spamassassin's Makefile.PL, LOCAL_STATE_DIR is set by macro on my 
system to "/var/lib/spamassassin". But in mimedefang.pl, LOCAL_STATE_DIR = 
'/var/lib'.

In mimedefang.pl, I changed LOCAL_STATE_DIR from '/var/lib' to 
'/var/lib/spamassassin'. Problem solved. YMMV.

-Mike



--

Date: Wed, 18 Oct 2006 10:17:22 -0400
From: "David F. Skoll" <[EMAIL PROTECTED]>
Subject: Re: [Mimedefang] SA scores
To: mimedefang@lists.roaringpenguin.com

Mike Lambert wrote:

> In spamassassin's Makefile.PL, LOCAL_STATE_DIR is set by macro on my
> system to "/var/lib/spamassassin". But in mimedefang.pl, 
LOCAL_STATE_DIR
> = '/var/lib'.

We should file a bug with SpamAssassin, because there is *no way* to
determine the proper value for LOCAL_STATE_DIR unless you can get
the output of spamassassin's configure script.

Regards,

David.

Why not make LOCAL_STATE_DIR = '/usr/share/spamassassin'?  The directory
"/var/lib/spamassassin" does not exist on my system - rhel4.

Philip
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] SA scores

2006-10-18 Thread Roland Pope

Jeff Grossman wrote:

It appears there is a '--update-dir' command line switch for sa-update which
you can tell it where to place those newer files.  I have not tried it yet,
but it might do what we need with MIMEDefang.

Jeff

 
I use 'sa-update --update-dir=/etc/mail/spamassassin'which seems to work 
for me given that mimedefang uses /etc/mail/spamassassin as it's SA 
directory.


Cheers,
Roland
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] SA scores

2006-10-18 Thread David F. Skoll
Mike Lambert wrote:

> In spamassassin's Makefile.PL, LOCAL_STATE_DIR is set by macro on my
> system to "/var/lib/spamassassin". But in mimedefang.pl, LOCAL_STATE_DIR
> = '/var/lib'.

We should file a bug with SpamAssassin, because there is *no way* to
determine the proper value for LOCAL_STATE_DIR unless you can get
the output of spamassassin's configure script.

Regards,

David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] SA scores

2006-10-18 Thread Mike Lambert

Miha Verlic wrote:
X-Spam-Score: 2.25 (**) 
BAYES_50,EXTRA_MPART_TYPE,HTML_IMAGE_ONLY_20,HTML_MESSAGE


Similiar message from spamassassin:

X-Spam-Status: Yes, score=10.8 required=5.0 
tests=BAYES_50,EXTRA_MPART_TYPE,

   HTML_IMAGE_ONLY_20,HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,
   SARE_GIF_ATTACH,SARE_GIF_STOX,TVD_FW_GRAPHIC_ID1,
   TVD_FW_GRAPHIC_NAME_LONG,UNPARSEABLE_RELAY autolearn=no 


TVD_* rules are located in 80_additional.cf spamassassin configuration file

Plain "perl Makefile.PL, make, make install" only installs 10_* through 
60_* configuration files into /usr/share/spamassassin/, but when you run 
sa-update it downloads updates with 70_* and 80_* rulesets into 
/var/lib/spamassassin/3.001007/updates_spamassassin_org/. If you invoke 
spamassassin via shell, it will use both configuration directories, 
while mimedefang uses only /usr/share/spamassassin/.


In spamassassin's Makefile.PL, LOCAL_STATE_DIR is set by macro on my system to 
"/var/lib/spamassassin". But in mimedefang.pl, LOCAL_STATE_DIR = '/var/lib'.

In mimedefang.pl, I changed LOCAL_STATE_DIR from '/var/lib' to 
'/var/lib/spamassassin'. Problem solved. YMMV.

-Mike

___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] Relay: Reject emails after receiving DATA negative result code from destination host?

2006-10-18 Thread David F. Skoll
Benoit Panizzon wrote:

> Is there a way to delay the 200 Queued message until I get the
> return code to 'DATA' from HOST B to pass this code to HOST A?

Yes.  You need to run your Sendmail in "interactive" delivery mode.
This may have other (undesired) side-effects, though.  Check the
Sendmail documentation.

Regards,

David.
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] Relay: Reject emails after receiving DATA negative result code from destination host?

2006-10-18 Thread Jan-Pieter Cornet
On Wed, Oct 18, 2006 at 12:28:40PM +0200, Benoit Panizzon wrote:
> Hi all
> 
> I use MIMEDefang as a Relay in front of other mailservers.
> 
> I do a md_check_against_smtp_server to check if the sender/recipient pair is 
> valid. So I can reject emails to invalid recipients directly without need to 
> bounce them.
> 
> Now I have come across the situation where I have a server which also does 
> some basic filtering and rejects emails after the 'DATA' part. At the moment 
> I have to send a bounce for those emails which, in case of unrecognized spam, 
> is sent to the fake address.

No, that's not possible. MIMEDefang doesn't do the actual delivery
of the email, that is the job of sendmail. Your best bet is probably
to copy (most of) the access rules that are present in the "other"
mailer. MIMEDefang can easily block exe files, for example.

(That said, I'm trying to do the same, by moving the actual delivery
to MIMEDefang. "Impossible" is not in my dictionary. This will be a huge
speedup improvement, especially since it's combined with md_check_against_
smtp_server anyway, but it will be quite hairy to get the details right).

-- 
Jan-Pieter Cornet <[EMAIL PROTECTED]>
!! Disclamer: The addressee of this email is not the intended recipient. !!
!! This is only a test of the echelon and data retention systems. Please !!
!! archive this message indefinitely to allow verification of the logs.  !!
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] Relay: Reject emails after receiving DATA negative result code from destination host?

2006-10-18 Thread Benoit Panizzon
Hi all

I use MIMEDefang as a Relay in front of other mailservers.

I do a md_check_against_smtp_server to check if the sender/recipient pair is 
valid. So I can reject emails to invalid recipients directly without need to 
bounce them.

Now I have come across the situation where I have a server which also does 
some basic filtering and rejects emails after the 'DATA' part. At the moment 
I have to send a bounce for those emails which, in case of unrecognized spam, 
is sent to the fake address.

Example:

HOST A => MIMEDefang => HOST B

** HOST A Connects to MIMEDefang.
<= mail from:<[EMAIL PROTECTED]>
=> 200 OK
<= rcpt to:<[EMAIL PROTECTED]>
** check_recipient md_check_against_smtp_server connecting to HOST B
=> 200 OK
<= DATA
=> 200 OK send your DATA
<= da...ta (including attachement)
** MIMEDefang does not find anything bad and return 200 QUEUED to HOST A
=> 550 EXE Files not accepted on HOST B
** MIMEDefang has to bounce as it already accepted the mail from HOST A

Is there a way to delay the 200 Queued message until I get the return code to 
'DATA' from HOST B to pass this code to HOST A?

Regards

Benoit Panizzon
-- 
I m p r o W a r e   A G-System Services
__

Zurlindenstrasse 29 Tel  +41 61 826 93 00
CH-4133 PrattelnFax  +41 61 826 93 01
Schweiz Web  http://www.imp.ch
__


pgprDr8tsTcA6.pgp
Description: PGP signature
___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang