RFC: new module Net::SMTP::PostfixExt

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


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.

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

       use Net::SMTP::PostfixExt;

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

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

         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" );

     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

     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.

Site Timeline