Yes it supports vpopmail's .qmail files.  But...

I forgot something.  There's a program that came with check_delivery called
dot-qmail-exists.pl.   If it sees your vpopmail .qmail-default file, it assumes
the mailbox exists, no matter what's in the .qmail-default.

I had to patch that too to look for "delete" or "bounce-no-mailbox" in the
vpopmail .qmail-default files.  There's no point in deliverying something
that's going to be bounced or dropped anyway.  

...Although, in some cases you may want to allow delivery if it's going to be
deleted anyway. I don't because someone decided that bbsc.net is a good domain
to pelt with a bunch of email for invalid boxes.  I'd rather not busy up
qmail-local with that junk mail so I reject 'delete'd domains instead of
allowing it.

Here's the tidbit to add towards the end of dot-qmail-exists.pl:

# --- Start just before 'print "Exists.\n";'


# check to see if it says 'bounce-no-mailbox' or 'delete'

if ($filename eq ".qmail-default") {
    open(QMAIL,"<$dirname/$filename");
    my $counter;
    foreach my $line (<QMAIL>) {
        $counter++;
        if (($line =~ /bounce-no-mailbox/ or $line =~ /delete/) and $counter ==
1) {
            print "Not found. (bounce/delete)\n";
            exit 1;
        }
    }
    close(QMAIL);
}

print "Exists.\n";
exit 0;

# --- End

-- Bryan




Quoting "James H. Thompson" <[EMAIL PROTECTED]>:

> Does this patch support vpopmail domains that have a 'catch-all' address, and
> conversely ones that
> do not?
> 
> Jim
> 
> James H. Thompson
> [EMAIL PROTECTED]
> 
> ----- Original Message ----- 
> From: "Bryan Scott" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, November 26, 2003 5:55 AM
> Subject: Re: Valid account checks for vpopmail users
> 
> 
> >
> > Forgot to include the list on this one...
> >
> > I've added the following code to the check_delivery plugin to check
> vpopmail
> > using 'vuserinfo'.  It then proceeds to check for .qmail files and
> everything
> > else as normal.
> >
> > My apologies for not having it "patch" ready, but it should be a simple
> copy and
> > paste solution.
> >
> > -- Bryan
> >
> > CertaintyTech wrote:
> >
> > > I see on the qpsmtpd home page that it states "Can be configured to know
> > > about local addresses and bounce invalid addresses at the smtp level.".
> > > Has any one created a plugin for vpopmail?
> > >
> > > Also, is there someone to search the archives?  Appears that the archive
> > > site is not searchable.
> > >
> > > Thanks for any tips,
> > > ---
> > > Ed
> >
> > # --- Start after this line:
> >
> >    return (DECLINED) unless $local;
> >
> > # --- my modification includes defining $count sooner...
> >
> >    my $count;
> >
> > # --- Then call vuserinfo -- could probably be done cleaner; IWFM :)
> >
> >    # first check vpopmail
> >    if (-f "/home/vpopmail/bin/vuserinfo") {
> >        my $result = `/home/vpopmail/bin/vuserinfo -n $delivery`;
> >        chomp($result);
> >        # logging only needed for debugging
> >        $self->log(0,"Checked vpopmail: name = $result");
> >        $count = 1 if ($result eq lc($user)); # continue on
> >    }
> >
> >    # expand the address
> >    my @deliverylist = $self->expand_address($delivery);
> >
> >    # allow other plugins to hook into the results of this one
> >    $self->qp->run_hooks("user_delivery", $delivery, @deliverylist);
> >
> > # --- then add the vpopmail count to whatever expand_address was able to
> find
> >
> >    $count .= $#deliverylist + 1;
> >    my $msg;
> >
> > # ----  back to existing code
> >
> >
> >
> >
> >
> >
> >
> 
> 




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Reply via email to