Re: [vchkpw] Removng Duplicate Email

2006-12-04 Thread Dave Cook

Hi Remo:

Yes, I use maildrop and the standard Spamassassin filters in 
/usr/share/spamassassin.  My local.cf file in /etc/mail/spamassassin is:


# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)
# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

ok_locales all
skip_rbl_checks 1

required_hits 5.0

rewrite_header Subject ***SPAM***

report_safe 0

use_pyzor 1

use_razor2 1

use_dcc 1

use_auto_whitelist 1

use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1
bayes_file_mode 0666

add_header all Status _YESNO_ Autolearn=_AUTOLEARN_ score=_SCORE_ 
required=_REQD_ tests=_TESTS_ bayes=_BAYES_ Checker-Version SpamAssassin 
_VERSION_ (_SUBVERSION_) on _HOSTNAME_


add_header all Level _STARS(*)_

add_header spam Flag _YESNOCAPS_


I also run DCC, Pyzor and Razor2 (as you can see).  The dups are 
intermittent and happen when the server is under heavy load.  I read an 
article here:
http://www.cyber-sentry.com/index.php?id=108 as to why this can happen.  The 
filtering software appears to be working fine.  My qmail install is a 
standard toaster install from here: 
http://wiki.qmailtoaster.com/index.php/CentOS_4.3_QmailToaster_Install. All 
I really need to do is implement this eliminate-dups script if it's 
required.  Maybe play with the timeouts of Pyzor, Razor2 etc?


Cheers,
Dave


- Original Message - 
From: Remo Mattei [EMAIL PROTECTED]

To: vchkpw@inter7.com
Sent: Monday, December 04, 2006 12:36 AM
Subject: Re: [vchkpw] Removng Duplicate Email



so u get dub when mail comes in? do u use maildrop? if you also use
other filter that may cause the problem.

Remo

Dave Cook wrote:

Hi Remo:
That was just a left-over from testing.  I removed the user-default and
I still get dups.  That's where I started this morning when the dup
thing started.
Getting back to the eliminate-dups script.

1) I have the following in .qmail-delivery:  (in
/home/vpopmail/domains/mydomain.com/)

   | /usr/local/sbin/eliminate-dups mydomain.com duphash
  [EMAIL PROTECTED]

2) I have the following in .qmail-default:  (in
/home/vpopmail/domains/mydomain.com/)

   | /home/vpopmail/bin/vdelivermail '' bounce-no-mailbox

3) The eliminate-dups script is here:

#! /usr/bin/perl
#--
# Copyright 2006 Russell Nelson [EMAIL PROTECTED]
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
#--
#
#
# Modified for use with vpopmail
# by Chris Hardie [EMAIL PROTECTED]
# originally by Russell Nelson, http://www.qmail.org/eliminate-dups
#
#
# Now, if delivery to the mbox is deferred, eliminate-dups will NOT be
# run a second time for the same message.
#
# Set up ~vpopmail/domains/domain.com/.qmail-default as follows:
#
#  | /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED]
#
# Then create a ~vpopmail/domains/domain.com/.qmail-delivery file as
follows:
#
#  |bin/eliminate-dups domain.com duphash
#  [EMAIL PROTECTED]
#
# Now, if delivery to the mbox is deferred, eliminate-dups will NOT be
# run a second time for the same message.

my $basedir = /home/vpopmail/domains;

my $domainname = shift;
my $hname = shift;
my $hashname = $basedir/$domainname/$hname;

use Digest::MD5;
$md5 = new Digest::MD5;

$loose = 1; # loose matching if set.

while() {
   last if /^$/;
   next if $ignore_continue  /^\s/;
   $ignore_continue = 0;
   if (/^received:/i) {
   $ignore_continue = 1;
   next;
   }
   if (!$loose) {
   $headers .= $_;
   next;
   }
   if ($keep_continue  /^\s/) {
   $headers .= $_;
   next;
   }
   $keep_continue = 0;
   if (m/^(from|message-id|date):/i) {
   $headers .= $_;
   $keep_continue = 1;
   next;
   }
   next;
}

$md5-add($headers);
$md5-addfile(STDIN);
$hash = $md5-hexdigest;
print $headers Our hash:$hash\n;

if (open(HASH, $hashname.newer)) {
   flock(HASH, 2);
   while(HASH) { chomp; exit 99 if $_ eq $hash; }
}
open(HASH, $hashname.older) || die $0: Cannot open $hashname.older;
while(HASH) { chomp; exit 99 if $_ eq $hash; }

# roll the files once a week.
if (-M $hashname.older  7) {
   rename($hashname.newer, $hashname.older) || die $0: Unable
to move newer to older;
}

# add the hash to the received messages list.
open(HASH, $hashname.newer) || die $0: Cannot append to
$hashname.newer;
print HASH $hash\n;
close(HASH);

print Original message;
exit 0;

   a) Putting  | /home/vpopmail/bin/vdelivermail '' [EMAIL PROTECTED] in
the .qmail-default file stops email delivery and doesn't work.
   b) This file is owned by vpopmail.vchkpw and is executable and is in
my /usr/local/sbin directory.

Question: Does vpopmail read .qmail files in the user's Maildirs?  (i.e.

Re: [vchkpw] Removng Duplicate Email

2006-12-04 Thread Dave Cook

Dang, I was going to use that one.  Maybe I'll switch.
Cheers,
Dave
- Original Message - 
From: Remo Mattei [EMAIL PROTECTED]

To: vchkpw@inter7.com
Sent: Monday, December 04, 2006 11:35 AM
Subject: Re: [vchkpw] Removng Duplicate Email



I would use bill shupp toasterI just build a centos 4.4 with that
it's the best online...

Just my 2 cents
Remo

Dave Cook wrote:

Hi Remo:

Yes, I use maildrop and the standard Spamassassin filters in
/usr/share/spamassassin.  My local.cf file in /etc/mail/spamassassin is:

# These values can be overridden by editing ~/.spamassassin/user_prefs.cf
# (see spamassassin(1) for details)
# These should be safe assumptions and allow for simple visual sifting
# without risking lost emails.

ok_locales all
skip_rbl_checks 1

required_hits 5.0

rewrite_header Subject ***SPAM***

report_safe 0

use_pyzor 1

use_razor2 1

use_dcc 1

use_auto_whitelist 1

use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1
bayes_file_mode 0666

add_header all Status _YESNO_ Autolearn=_AUTOLEARN_ score=_SCORE_
required=_REQD_ tests=_TESTS_ bayes=_BAYES_ Checker-Version SpamAssassin
_VERSION_ (_SUBVERSION_) on _HOSTNAME_

add_header all Level _STARS(*)_

add_header spam Flag _YESNOCAPS_


I also run DCC, Pyzor and Razor2 (as you can see).  The dups are
intermittent and happen when the server is under heavy load.  I read an
article here:
http://www.cyber-sentry.com/index.php?id=108 as to why this can happen.
The filtering software appears to be working fine.  My qmail install is
a standard toaster install from here:
http://wiki.qmailtoaster.com/index.php/CentOS_4.3_QmailToaster_Install.
All I really need to do is implement this eliminate-dups script if it's
required.  Maybe play with the timeouts of Pyzor, Razor2 etc?

Cheers,
Dave


- Original Message - From: Remo Mattei [EMAIL PROTECTED]
To: vchkpw@inter7.com
Sent: Monday, December 04, 2006 12:36 AM
Subject: Re: [vchkpw] Removng Duplicate Email




!DSPAM:45744843321701987214747!




--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.6/567 - Release Date: 12/4/2006






[vchkpw] a patch for vpopmail's LDAP auth backend

2006-12-04 Thread Vitali Malicky

hello, gentlemen!

since vpopmail wouldn't build with --enable-auth-module=ldap and when did
build it wouldn't work correctly, I've written here a little patch for
vpopmail ldap auth backend if you please.


--
WBR, Vitali Malicky
Making it complicated is easy, making it SIMPLE is an art


vpoppatch.tar.gz
Description: Binary data


[vchkpw] root owned maildirsize revisited

2006-12-04 Thread Charles Sprickman

Hi all,

I really don't know where to file this problem...  In short I've got 
something leaving my maildirsize files with root ownership.


vdelivermail, maildrop, qmail-local - none are setuid root.  I see this on 
users that have pop/imap access closed off.  So I think that means we're 
talking about something doing the delivery is doing this.


I'd like to point you to this thread over at the qmail list:

http://thread.gmane.org/gmane.mail.qmail.general/50850/focus=50850

So what I'm catching (qmail-local running as root) is impossible.  Yet it 
seems to be happening.  Hrmph.


You'll note I made a wrapper for qmail-local as suggested that should 
catch if qmail-lspawn is starting qmail-local as root.  It's not finding 
that, yet the problem persists, and a while loop watching for root running 
qmail-local is finding them.


I am totally stumped.  I've burned many hours over the years chasing this 
down.


My one point of interest in running this by this list is that it looks 
like the people that have this problem all tend to be overquota.  That's 
one part that's a little unclear - if vdelivermail tries to deliver to an 
overquota user, or if it hands it to maildrop, I suppose it fails with a 
specific exitcode that means temp failure to qmail-local.  Not sure what 
qmail-local does there or how failed messages work their way back into the 
queue...


Just looking for more eyes.  Anyone care to take a stab at this?  I'm 
going to futz around for the next week or so and then I might try 
outsourcing this troubleshooting.  Any takers here?


Thanks,

Charles