Darren:
Anyone up on qmail/perl? I need to migrate a system from
sendmail to qmail
but could do with some help
What exactly is the perl for? If it's to change the mbox files into maildir ones, then there are already scripts to do that. I think the qmail web site has some. (Do you really want a non-free mailserver?)
Sorry for the delay in getting back. This is a bit of a long one sorry
We currently have sendmail configured to parse local mail through a perl script. This takes 3 arguments From, User, Host
user being the alias, host being the domain.
It then checks a couple of files for the domain, and works out what local user should have the mail.
If then goes to that users home directory and looks for a file called .redirect
This either redirects it to another local user or to a program for processing or another email address
It accepts multiple lines for multiple aliass
This works great with sendmail. But..... I want to migrate over to qmail
I have a vanilla install of qmail without any problems and use it on our backup MX servers.
The perl script delivers mail using a program called spooler this takes the arguments spooler [-o owner] -u user
and the perl script delivers it using the following perl
open(MAIL, "$local -o $destiny -u $destiny"); } $header_done = "NO"; foreach $line (@msg) { if ( (uc($line) =~ /^DATE: /) && ($header_done eq "NO") ) { $header_done = "YES"; print MAIL $line; print MAIL "X-Mailer-Version: $version\n"; print MAIL "X-From: $from\n"; print MAIL "X-Recipient: $user@$host\n"; } elsif (uc($line) =~ /^X-FROM: /) { # suppress duplicate line } elsif (uc($line) =~ /^X-RECIPIENT: /) { # suppress duplicate line } elsif (uc($line) =~ /^X-MAILER-VERSION: /) { # suppress duplicate line } else { print MAIL $line; } } close(MAIL); } &log;
--
The mail should also be delivered to /var/spool/mail, some users don't own their own home dir.
The perl script works like a dream with sendmail but I really would like to drop sendmail for qmail is possible.
Any help from anyone would be much appreciated
Thanks
Darren