[Mimedefang] find word in mail address

2004-09-06 Thread CONTRERAS, Pablo

Hi list! , I'm try to make a rule, It allow me find a word in the address ([EMAIL 
PROTECTED], user and domain).
I need to redirect all mail sent from addresses(in user name or domain) 
which contain some of this words for i.e. word.

*1
sub filter_end {
if ($Sender =  =~ /^?word\?$/i ) { 
# Is posible redirect the message?
}
this is correct?
Could you help me again?

Best Regards
Pablo

___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] Strange problem with SpamAssassin and mimedefang-2.44

2004-09-06 Thread Andrew Savin
Hello all.

We have some strange problem with MD  SA.
Bayes analyser of SA always gives score of 0.5. All other tests working (including 
network tests, like razor, dcc  so).

If we're run FC1, spamassassin-2.63-0.9.2 rpm.

$ spamassassin -p /etc/mail/sa-mimedefang.cf -t  
/usr/share/doc/spamassassin-2.63/sample-spam.txt
works and gives bayes score of 
-0.0 BAYES_44   BODY: Bayesian spam probability is 44 to 50%
[score: 0.4993]

Bayesian database filled from spam  ham mail via sa-learn and ok.

Any mail, passed through MimeDefang filter fails check with bayes score 0.5 :( 

Filter reads:



$SALocalTestsOnly   = 0;

if ($Features{SpamAssassin}) {
spam_assassin_init()-compile_now(1) if defined(spam_assassin_init());
}


if ($Features{SpamAssassin}) {
if (-s ./INPUTMSG  100*1024) {
my($hits, $req, $names, $report) = spam_assassin_check();
my($score);
if ($hits  40) {
$score = * x int($hits);
} else {
$score = * x 40;
}
if ($hits = $req) {
action_change_header(X-Spam-Score, $hits ($score) $names);
action_change_header(Subject, [SPAM] $Subject);
md_graphdefang_log('spam', $hits, $RelayAddr);


action_add_part($entity, text/plain, -suggest,
$report\n,
SpamAssassinReport.txt, inline);
} else {

action_delete_header(X-Spam-Score);
}
}



mimedefang-2.44


What can make such problem? We checked permissions hundred times, all looks ok... How 
to enable debug of SA processing?

Thanks,

-- 
WBR Andrew Savin, Netline system administrator.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] QDir path...

2004-09-06 Thread John Von Essen
I upgraded to MD-2.44.
In older versions, I told the user in the quarantine message to 
reference the real path of the quarantined message on my server when 
contacting an admin. So after the paragraph about why an attachment got 
blocked, it would say contact sysadmin and reference 
qdir-2004-09-02-15.23.33-001.

I forget which MIMEDefang scalar I was using in my filter file to get 
that path. I thought it was $QuarantineDir - but that just returns 
/var/spool/MD-Quarantine. And $QuarantineSubDir returns nothing.

Any ideas?
-john
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] match the sender user name

2004-09-06 Thread CONTRERAS, Pablo
Hi, list again, I'm finding  out in the mimedefang archive list and find
it, I need modify for match a word in the username sender, could you
help me? 

my($RawSender);
$RawSender = $Sender;

# Strip angle brackets
$RawSender =~ s/[]//g;

# What can I do for matching a word in sender username??
# for i.e. [EMAIL PROTECTED] or [EMAIL PROTECTED]
match the word in the string

if ($RawSender =~ /[EMAIL PROTECTED]/) {
$HTMLOK = 1;
} else {
$HTMLOK = 0;
}

Best Regards 
Pablo

___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] QDir path...

2004-09-06 Thread David F. Skoll
On Mon, 6 Sep 2004, John Von Essen wrote:

 I upgraded to MD-2.44.

 I forget which MIMEDefang scalar I was using in my filter file to get
 that path. I thought it was $QuarantineDir - but that just returns
 /var/spool/MD-Quarantine. And $QuarantineSubDir returns nothing.

Call the function get_quarantine_dir() to get the full path name of
the quarantine directory.

Regards,

David.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] 0x1f does not fulfill action requirements 0x3f

2004-09-06 Thread The Searcher
Hi,

Mimedefang starts without any problems, but when a mail arrives in the queue it's not 
processed by the milter and the syslog reports folowing:

MIMEDefang-2.44: st_optionneg[1090857776]: 
0x1f does not fulfill action requirements 0x3f

Below is a detailed log.

I'm running 
Red Hat 9
Sendmail 8.12.8
Spamassassin 2.64
Mcafee Virus Scan for Linux v4.32.0
Mimedefang 2.44

I followed the latest Mimedefang manual, with the exeption of chapter 4 Install POP3, 
IMAP, and webmail services (I skipped that one completely)

I installed all perl modules with the same version as the manual suggested, accept for 
Archive-Zip (I used 1.13 instead of 1.11)

Has anyone got a sugestion?

TIA,
Remon

Sep  6 18:05:53 localhost sendmail[2201]: i86G5rhg002201: from=searcher, size=74, 
class=0, nrcpts=1, msgid=[EMAIL PROTECTED], [EMAIL PROTECTED]
Sep  6 18:05:53 localhost mimedefang[1771]: MIMEDefang-2.44: st_optionneg[1090857776]: 
0x1f does not fulfill action requirements 0x3f
Sep  6 18:05:53 localhost sendmail[2203]: i86G5rI9002203: milter_read(mimedefang): cmd 
read returned 0, expecting 5
Sep  6 18:05:53 localhost sendmail[2203]: i86G5rI9002203: Milter (mimedefang): to 
error state
Sep  6 18:05:53 localhost sendmail[2203]: i86G5rI9002203: Milter (mimedefang): init 
failed to open
Sep  6 18:05:53 localhost sendmail[2203]: i86G5rI9002203: Milter (mimedefang): to 
error state


___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] counting emails flagged as spam

2004-09-06 Thread Mike Campbell
Anyone have a good way to keep a running count of how many email 
messages have been flagged as spam by spamassassin?

Given that the MD filter is just perl I can easily add in a couple of 
lines that just updates a file count but was wondering if someone had a 
more sophisticated working example.

Thanks
--
___
Mike Campbell
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] RETVAL=137 ? anyone know what this means?

2004-09-06 Thread Thomas Barnes
Hello folks
I was able to build mimedefang but can not get it to start.
I am using solaris 9  x86 , installed all of the perl modules and etc. . 
when I try to start the ./examples/init-script  I get Killed

I used sh -x ./init-script start and got the following.  

Is there anyone who knows what tree I should bark in?  RETVAL=137  ?
-thanks
the output is:
bash-2.05# sh -x ./init-script start
RETVAL=0
prog=mimedefang
SPOOLDIR=/var/spool/MIMEDefang
PID=/var/spool/MIMEDefang/mimedefang.pid
MXPID=/var/spool/MIMEDefang/mimedefang-multiplexor.pid
+ [ -x /usr/local/bin/mimedefang ]
PROGDIR=/usr/local/bin
LC_ALL=C
+ export LC_ALL
MX_USER=defang
MX_LOG=yes
MX_SOCKET=/var/spool/MIMEDefang/mimedefang-multiplexor.sock
MX_MINIMUM=2
MX_MAXIMUM=10
MX_BUSY=600
+ [ -f /etc/mail/mimedefang.conf ]
SOCKET=/var/spool/MIMEDefang/mimedefang.sock
MX_SOCKET=/var/spool/MIMEDefang/mimedefang-multiplexor.sock
+ start_it
+ test -r /var/spool/MIMEDefang/mimedefang.pid
+ test -r /var/spool/MIMEDefang/mimedefang-multiplexor.pid
+ printf %-60s Starting mimedefang-multiplexor: 
Starting mimedefang-multiplexor:+ rm -f 
/var/spool/MIMEDefang/mimedefang-multiplexor.sock
+ [  = yes ]
EMBEDFLAG=
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ [ -n 2 ]
+ echo -m 2
+ [ -n 10 ]
+ echo -x 10
+ [ -n  ]
+ [ -n  ]
+ [ -n defang ]
+ echo -U defang
+ [ -n  ]
+ [ -n 600 ]
+ echo -b 600
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ [ yes = yes ]
+ echo -l
+ [  = yes ]
+ [  = yes -a  = yes ]
+ [  = yes ]
+ [ -n  ]
+ [ -n  ]
+ [ -n  ]
+ /usr/local/bin/mimedefang-multiplexor -p 
/var/spool/MIMEDefang/mimedefang-multiplexor.pid -m 2 -x 10 -U defang -b 
600 -l -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
Killed
RETVAL=137
+ [ 137 = 0 ]
+ echo [FAILED]
[FAILED]
+ return 1
+ exit 137
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] RETVAL=137 ? anyone know what this means?

2004-09-06 Thread David F. Skoll
On Fri, 3 Sep 2004, Thomas Barnes wrote:

 + /usr/local/bin/mimedefang-multiplexor -p
 /var/spool/MIMEDefang/mimedefang-multiplexor.pid -m 2 -x 10 -U defang -b
 600 -l -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
 Killed

Type: ldd /usr/local/bin/mimedefang-multiplexor

You may be missing a required shared library.

--
David.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] counting emails flagged as spam

2004-09-06 Thread Kevin A. McGrail
You might want to look into GraphDefang.  There is already a tie-in for it
in MD by using a line such as: md_graphdefang_log('spam', $hits,
$RelayAddr);

I have some reasonably decent instructions about using graphdefang here
http://www.peregrinehw.com/downloads/MIMEDefang/INSTALL-GRAPHDEFANG

You could also just grep /var/log/maillog for the tag and run through wc -l
for a count.

Regards,
KAM
- Original Message - 
From: Mike Campbell [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, September 06, 2004 1:37 PM
Subject: [Mimedefang] counting emails flagged as spam


 Anyone have a good way to keep a running count of how many email
 messages have been flagged as spam by spamassassin?

 Given that the MD filter is just perl I can easily add in a couple of
 lines that just updates a file count but was wondering if someone had a
 more sophisticated working example.

 Thanks
 -- 

 ___
 Mike Campbell


 ___
 Visit http://www.mimedefang.org and http://www.canit.ca
 MIMEDefang mailing list
 [EMAIL PROTECTED]
 http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] I did it!!!

2004-09-06 Thread CONTRERAS, Pablo

Hi, list, thanks for your help, in fact the answer is on the history
mimedefang-list, and I have the last question, 
what can I do, for match a word in the body of mail?
Thanks!!!

Possible answer (modify for me)
It's run ok, but is it correct?
sub filter_end($) {
my($entity) = @_;
my $recip;
if ([EMAIL PROTECTED]/garca/i){
for $recip (@Recipients){
delete_recipient($recip);
}
add_recipient('[EMAIL PROTECTED]');
return('CONTINUE',ok);
}


___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] RETVAL=137 ? anyone know what this means?

2004-09-06 Thread Thomas Barnes
 I think I found the problem.  (though ldd shows me the correct linking 
regardless)
and file shows a 32 bit ELF . stripped. .etc. . .

During make install it seems an incomplete binary for both
mimedefang and mimedefang-multiplexor are placed in /usr/local/bin
I look at the byte size and see about 3000kb and the binary
in the build directory is 886280.
I got past that by manually copying from the build dir
to /usr/local/bin
I ran into a few other problems but I think it is related to
user error and confusion in the docs. .
Mimedefang rocks! Thanks!
-Thomas
David F. Skoll wrote:
On Fri, 3 Sep 2004, Thomas Barnes wrote:

+ /usr/local/bin/mimedefang-multiplexor -p
/var/spool/MIMEDefang/mimedefang-multiplexor.pid -m 2 -x 10 -U defang -b
600 -l -s /var/spool/MIMEDefang/mimedefang-multiplexor.sock
Killed

Type: ldd /usr/local/bin/mimedefang-multiplexor
You may be missing a required shared library.
--
David.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] counting emails flagged as spam

2004-09-06 Thread Kenneth Porter
--On Monday, September 06, 2004 3:33 PM -0400 Kevin A. McGrail 
[EMAIL PROTECTED] wrote:

You might want to look into GraphDefang.  There is already a tie-in for it
in MD by using a line such as: md_graphdefang_log('spam', $hits,
$RelayAddr);
I just set this up on a couple of servers and it's pretty easy. The hardest 
part is locating all the Perl modules to install. Alas, a 3rd server won't 
let me install it because graphdefang needs GD version 2 (the Perl graphics 
module) and I've got version 1 installed for a particular web app. (GIF 
license issues.)

Here's the set of modules I built from CPAN for my Fedora Core 2 system:
perl-File-ReadBackwards-1.02-8.src.rpm
perl-FreezeThaw-0.43-8.src.rpm
perl-GD-2.16-8.src.rpm
perl-GDGraph-1.43-8.src.rpm
perl-GDTextUtil-0.86-8.src.rpm
perl-MLDBM-2.01-8.src.rpm
I installed the web subdirectory into /var/www/html/graphdefang, edited a 
couple variables in index.php, graphdefang.cgi, and graphdefang-config and 
everything is working.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] 0x1f does not fulfill action requirements 0x3f

2004-09-06 Thread Matt Smith
On Mon, 06 Sep 2004 18:53:18 +0200, The Searcher
[EMAIL PROTECTED] wrote:

 Mimedefang starts without any problems, but when a mail arrives in the
queue it's not processed by the milter and the syslog reports folowing:

 MIMEDefang-2.44: st_optionneg[1090857776]:
 0x1f does not fulfill action requirements 0x3f

I've seen these errors before, i'm sure of it!  Look back in the archives to
August, there's a similar issue there as well.
http://www.google.com.au/search?hl=enie=UTF-8q=st_optionneg+site%3Alists.roaringpenguin.commeta=

 I'm running
 Red Hat 9
 Sendmail 8.12.8
 Spamassassin 2.64
 Mcafee Virus Scan for Linux v4.32.0
 Mimedefang 2.44

Hmm, looks almost identical to my one of my setups.
Firstly, check, check, recheck, and then check your permissions again, and
the user that MD and uvscan are running as; this can leave you awake at
night.  Make everything run as the same user for testing purposes (defang by
default).
Secondly, do you have a `sleep 5(or 10,15)' command after you start/stop MD
or before you start/stop Sendmail?  Make sure that in your logs when you
stop MD, you see MI_stop=1 before you try to restart, or you'll have
problems.  Add the sleep into your init.d script and see how that behaves.
Thirdly, for testing purposes, disable uvscan in MD (replace the
$Features{'Virus:NAI'} value with ('/bin/false' ne '/bin/false' ?
'/bin/false' : 0); and to make life easier, just comment out your exisiting
one, and add the new one.  Make sure that `mimedefang.pl -features` reports
that uvscan isn't installed, then run MD and see if you still have your
errors, if so, your problem is with uvscan/permissions etc.

All the best,
Matt

___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] 0x1f does not fulfill action requirements 0x3f

2004-09-06 Thread David F. Skoll
On Tue, 7 Sep 2004, Matt Smith wrote:

 On Mon, 06 Sep 2004 18:53:18 +0200, The Searcher
 [EMAIL PROTECTED] wrote:

  MIMEDefang-2.44: st_optionneg[1090857776]:
  0x1f does not fulfill action requirements 0x3f

You have linked against a newer version of libmilter than the one your
Sendmail binary supports.

Regards,

David.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


Re: [Mimedefang] 0x1f does not fulfill action requirements 0x3f

2004-09-06 Thread Eric Murray
David F. Skoll wrote:
On Tue, 7 Sep 2004, Matt Smith wrote:
 

On Mon, 06 Sep 2004 18:53:18 +0200, The Searcher
[EMAIL PROTECTED] wrote:
   

 

MIMEDefang-2.44: st_optionneg[1090857776]:
0x1f does not fulfill action requirements 0x3f
 

You have linked against a newer version of libmilter than the one your
Sendmail binary supports.
Regards,
David.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
 

I also had the 0x1f error etc in some previous posts that I have done... 
Gave up on it for awhile...

Today I reinstalled everthing exactly the way I did in the past, and it 
told me libmilter.a was missing so I dowloaded the 
sendmail-8.12.10.tar.gz file the same version that I had installed and 
did a make and make install as it suggested and it worked...  I couldn't 
believe it after all the trouble I had with it.

David I would say you hit the nail on the head, {I'm assuming because I 
Believe that is what fixed me up also, wish I come across this about 3 
weeks ago {smile}

Eric
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang