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. /home/vpopmail/domains/mydomain.com/dcook)

I need some direction on where these files should reside, if it actually works and how I can test it. Any help greatly appreciated.

Cheers,
Dave

----- Original Message ----- From: "Remo Mattei" <[EMAIL PROTECTED]>
To: <vchkpw@inter7.com>
Sent: Sunday, December 03, 2006 11:21 PM
Subject: Re: [vchkpw] Removng Duplicate Email


why do u have a user and a default with the same info? try to remove the
user's one and see if u get mail and if it gets dubs..
Just a suggestion..
My 2 cents

Dave Cook wrote:
Hi Remo:
It's the user default file in /home/vpopmail/domains/mydomain.com/ I
also have a .qmail-default file in that same directory with the same
contents.
Cheers,
Dave
----- Original Message ----- From: "Remo Mattei" <[EMAIL PROTECTED]>
To: <vchkpw@inter7.com>
Sent: Sunday, December 03, 2006 8:51 PM
Subject: Re: [vchkpw] Removng Duplicate Email




!DSPAM:45739d0b199767320219403!



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



Reply via email to