----- Original Message -----
>From: "Ken Jones" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Wednesday, August 15, 2001 10:41 PM
>Subject: What have you done for me lately?


Well, i have an idea that could (finally) open more doors for vpopmail -
this means in the postfix world (and there are alot of these boxes).
Today someone has approached me about an email I have send a couple of month
ago, about putting postfix and vpopmail together. Even then, when I have
checked out the postfix integration page at vpopmail site, I saw that in the
way it's configured there, you don't get any advantage from postfix, since
you still go through qmail. Well, after a couple of hours of work, I am
ready to present the (new) integration guide that will hopefully replace or
at least complement the one currently at
http://inter7.com/vpopmail/postfix.html :

step 1 : configure postfix to recieve mail for all the virtual domains as
local domains
step 2 : add the following to mail.cf

home_mailbox = Maildir/
mailbox_transport = vdelivermail

step 3 : add the following to master.cf

vdelivermail unix - n n - - pipe
    user=vpopmail argv=/home/vpopmail/bin/vdelivermailwrap.pl $recipient
$sender

step 4 : create the wrapper for vdelivermail in
/home/vpopmail/bin/vdelivermailwrap.pl with the following (I am not a perl
guru, corrections and optimisations are welcome - I am still having trouble
with bounces, the output I am getting from postfix looks really weird, the
following is the bounce example :

Aug 16 01:34:58 alex2 postfix/pipe[8036]: 1B4DC5FA67:
to=<[EMAIL PROTECTED]>, relay=vdelivermail, delay=0, status=bounced (Command
died with status 32: "/home/vpopmail/bin/vdelivermailwrap.pl". Command
output: Sorry, no mailbox here by that name. vpopmail (#5.1.1) Died at
/home/vpopmail/bin/vdelivermailwrap.pl line 23, <STDIN> line 8. )

) :

#!/usr/bin/perl

($recipient, $sender)=@ARGV;

if (not ($recipient=~/@/)) {
  die "bad recipient";
}

$local=$recipient;
$domain=$recipient;
$local=~s/@.*//;
$domain=~s/.*@//;

#Secure our enviropment variables
$ENV{'EXT'} = "$local";
$ENV{'DOMAIN'}= "$domain";
$ENV{'RPLINE'}= "Return-Path: <$sender>\n";
delete @ENV{qw(PATH IFS CDPATH ENV BASH_ENV)};
open(QMQ,"|/home/vpopmail/bin/vdelivermail '' bounce-no-mailbox")||die("");
while (<STDIN>) {
  print QMQ;
}
close(QMQ)||die("");


step 5 : sit back and enjoy your virtual-only postfix server crunching these
emails.

this way you do not even need qmail installed, and you can finally use
vpopmail as a standalone package.

Alex.




Reply via email to