Koozali.org: home of the SME Server

Perl libraries and DCL

Thomas Svensrud

Perl libraries and DCL
« on: February 19, 2002, 02:15:08 AM »
Hi! I am setting up Double Choco Latte on my e-smith server. Starting with version 20011208, DCL includes an e-mail gateway. The gateway is a PERL script that expects to receive e-mail piped to it from a MTA such as sendmail or postfix.
PERL modules required for this to operate include:
MIME::Base64
MIME::Parser
MIME::QuotedPrint
File::Basename
DBI
DBD driver for your SQL server (DBD::mysql or DBD::Pg)
Net::SMTP

Is some of this included with e-smith, and are we using sendmail or postfix?

Thomas

Charlie Brady

Re: Perl libraries and DCL
« Reply #1 on: February 19, 2002, 02:51:56 AM »
Thomas Svensrud wrote:

> Is some of this included with e-smith,

Some of it is, but most you will need to install via RPMs from RedHat Powertools or from rpmfind.net.

> and are we using sendmail or postfix?

Neither. The MTA is qmail, but it has a /usr/lib/sendmail script which behaves more or less like sendmail.

Charlie

Greg Zartman

Re: Perl libraries and DCL
« Reply #2 on: February 19, 2002, 04:02:32 AM »
Further to Charlies comment about qmail's "look alike" for sendmail, one needs to be aware of a very common perl syntax used with sendmail that does not work with qmail..  This syntax is as follows:

open (MAIL,"|/usr/lib/sendmail -t")

This line of code opens a connection to the sendmail program and uses the To email address, specified in the email header, to implicitly tell sendmail where to send the email.  Qmail's sendmail script does not recognize the -t option.  Instead, you must explicitly tell qmail where to send the email message:

open(MAIL,"|/var/qmail/bin/sendmail $recipient_email_address");

Regards,

Greg J. Zartman

Charlie Brady

Re: Perl libraries and DCL
« Reply #3 on: February 19, 2002, 06:03:03 AM »
Greg Zartman wrote:

> open (MAIL,"|/usr/lib/sendmail -t")
>
> This line of code opens a connection to the sendmail program
> and uses the To email address, specified in the email header,
> to implicitly tell sendmail where to send the email.  Qmail's
> sendmail script does not recognize the -t option.  Instead,
> you must explicitly tell qmail where to send the email message:
>
> open(MAIL,"|/var/qmail/bin/sendmail $recipient_email_address");

Or you can do:

open(MAIL, "|/var/qmail/bin/qmail-inject -A");

Charlie