GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
What::MTA(3) User Contributed Perl Documentation What::MTA(3)

What::MTA - Find out about running MTA

  $what = What->new( 
             Host => my.domain.org, 
             Port => 25, 
          );  

  $what->mta;
  $what->mta_version;
  $what->mta_banner;

What::MTA is a part of "What" package. It provides basic information about running MTA: name, version and banner that MTA prints out upon connection to it. It is not meant to be used directly, but via its interface, class "What". MTA's supported are: Exim, Postfix (version only on localhost), Sendmail, Courier (name only), XMail, MaswMail.

The What::MTA class is a subclass of Net::Cmd and IO::Socket::INET.

new ( OPTIONS )
This is the constructor for a new What object.

"OPTIONS" are passed in a hash like fashion, using key and value pairs. Possible options are:

Host - is the name, or address, of the remote host to which a connection to a running service is required to. It may be a single scalar, as defined for the "PeerAddr" option in IO::Socket::INET. "Host" is optional, default value is "localhost".

LocalAddr and LocalPort - These parameters are passed directly to IO::Socket to allow binding the socket to a local port.

Timeout - Maximum time, in seconds, to wait for a response from the server (default: 120)

Port - Port to which to connect to (default: 25)

Debug - Enable debugging information

Example:

    $what = What->new( 
                       Host    => 'my.mail.domain'
                       Timeout => 30,
                       Debug   => 1,
                     );

    $what = What->new(
                       Host => '10.10.10.1',
                       Port => 25,
                     );

mta()
Returns the name of the MTA running.
mta_version()
Returns the version of the MTA running.
mta_banner()
Returns the banner message which the server replied with when the initial connection was made.

Exim
  localhost ESMTP Exim 4.60 Mon, 20 Feb 2006 22:38:53 +0000
    
Postfix
  localhost ESMTP Postfix (Debian/GNU)
    
Sendmail
  galeb.somedomain.org ESMTP Sendmail 8.13.5/8.13.5/Debian-3; Mon, 20
  Feb 2006 22:41:04 GMT; (No UCE/UBE) logging access from:
  localhost(OK)-localhost [127.0.0.1]
    
XMail
  <1140475332.2874633136@mast> [XMail 1.22 ESMTP Server] service ready;
  Mon, 20 Feb 2006 22:42:12 -0000
    
MasqMail
  mast MasqMail 0.2.21 ESMTP
    

Can not connect to the serice host/port specified
  Couldn't create What::MTA object with
  PeerAddr=localhost,
  PeerPort=26,
  Proto=tcp,
  Timeout=120 at lib/What.pm line 68
    

Class::Std depends on the following modules:
  • Net::Cmd
  • IO::Socket::INET
  • Socket

Please report any bugs or feature requests to "bug-what@rt.cpan.org", or through the web interface at <http://rt.cpan.org>.

Lot of code taken from Net::Cmd, without which this class probably wouldn't have been written.

Toni Prug <toni@irational.org>

Copyright (c) 2006. Toni Prug. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

See <http://www.gnu.org/licenses/gpl.html>

2006-02-24 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.