Click here to get back home

RFC: new module Net::SMTP::PostfixExt

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
RFC: new module Net::SMTP::PostfixExt Christian Winter 02-20-2008
Posted by Christian Winter on February 20, 2008, 3:49 pm
Please log in for more thread options
Hi,

I'm working on a module that adds support for some Postfix
mailserver specific extensions to the smtp protocol and would
like to hear any suggestions about the namespace.


NAME
Net::SMTP::PostfixExt - XFORWARD and XCLIENT support for Net::SMTP

SYNOPSIS
use Net::SMTP::PostfixExt;

my $smtpx = Net::SMTP::PostfixExt->new(
                'XFORWARD', 'upstream.smtp.host'
);

die "Server does not support XFORWARD!"
                unless( $smtpx->XFORWARD_ok());

$smtpx->XFORWARD(
NAME => "other.client.host",
HELO => "helo.from.client",
SOURCE => "local"
);

my $smtpx2 = Net::SMTP::PostfixExt->new(
                'XCLIENT', 'other.upstream.host'
);

die "Server does not support XCLIENT!"
                unless( $smtpx->XFORWARD_ok() );

$smtpx2->XCLIENT( HELO => "i.am.another.client" );

DESCRIPTION
The XCLIENT and XFORWARD protocols are extensions to the
standard SMTP verbs to allow filtering proxies or mail-
retrieval clients (fetchmail-style) to pass on original
client information to an upstream MTA. This is done by
using the XCLIENT or XFORWARD verb together with a number
of paramters:

NAME [CF] Overrides the client name from name resolution
ADDR [CF] Overrides the client IP address from the connection info
PROTO [CF] Set SMTP/ESMTP protocol independent of prior HELO/EHLO
HELO [CF] Set the value for the HELO/EHLO verb
SOURCE [F] Whether the message was submitted locally or via the net

C Verb supported by the XCLIENT extension

F Verb supported by the XFORWARD extension

USAGE
Constructor
new ( $XPROTO, $smtphost[, param => value[, ...]])
The first argument to the constructor is the Postfix extension to
be used, either 'XCLIENT' or 'XFORWARD'.

All other arguments are simply passed through to the Net::SMTP
class. It takes the SMTP host to connect to as a first paramter.
Subsequent paramters are key => value pares. See the documentation
for Net::SMTP for details.
...

Similar ThreadsPosted
"Host =>" in the Net::SMTP module August 15, 2007, 8:37 am
SMTP::new() October 11, 2005, 2:36 am
Net::SMTP July 25, 2006, 8:44 am
net smtp help October 24, 2006, 4:02 pm
Net::Telnet and SMTP June 13, 2005, 11:01 am
Question on NET::SMTP new() October 11, 2005, 2:32 am
SMTP: "to" or/and "recipient" question. November 11, 2005, 8:52 am
Net::SMTP Can't get AUTH working... November 2, 2006, 5:39 pm
Installing Net::SMTP as non-root March 19, 2007, 4:03 pm
Net::SMTP - Unknown callback May 15, 2008, 6:45 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap