|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Christian Winter (thepoet
a-za-z0-9.de)
Date: Sun Sep 09 2007 - 02:08:04 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Wietse Venema wrote:
> Thus, stress-dependent server behavior can be implemented with
> minor Postfix modifications, but it has a few obvious limitations.
>
> - Testing is possible only by connecting to the test port and using
> the XCLIENT protocol. Not a big deal, because stress-dependent
> behavior is for advanced system administrators. Hopefully some
> day someone will finally implement a utility that uses the XCLIENT
> protocol to automate Postfix tests.
>
What would be expected from that utility? The reason I'm asking is that I've
plugged together a view lines of perl to perform checks on our company
mail filters with XCLIENT extensions (a class deriving from Net::SMTP
and a command line perl script) and already thought about bundling it
together and putting it at CPAN. Any suggestions are welcome.
That's what the script does so far:
-----------------------------------------------------------------------------
NAME
xclienttest.pl - Command line tool to test XCLIENT SMTP
DESCRIPTION
xclienttest.pl -f FROM -r RECIPIENT [-a] [-s SERVER] [-p PORT] [-c
CREDENTIALS] [-N XCLIENT_NAME] [-A XCLIENT_ADDRESS] [-P
XCLIENT_PROTOCOL] [-H XCLIENT_HELO] [-F CFGFILE] [-d] [-h]
Command line tool for testing of SMTP servers that support the XCLIENT
protocol. All neccessary paramters can be set via the command line, the
mail headers and body can either be supplied via STDIN (sendmail style)
or a standard test message can be generated via the *-a* switch.
COMMAND LINE ARGUMENTS
-h Show this help screen.
-a Create a test mail with standard contents, don't listen on *STDIN*
for a user-supplied message.
-f FROM
Set the sender of the mail. Must be a syntactically valid SMTP
address.
-r RECIPIENT
Recipient of the mail. Must be a syntactically valid SMTP address.
-s SERVER
SMTP server to connect to, defaults to 127.0.0.1.
-p PORT
Listen port of the SMTP server to connect to, defaults to 25.
-c CREDENTIALS
If the server requires a login, the credentials can be passed as a
string in the form "USERNAME:PASSWORD".
-N XCLIENT_NAME
The alternative client name that is to be supplied via the XCLIENT
command.
-A XCLIENT_ADDRESS
The IPV4 or IPV6 client address that is to be supplied via the
XCLIENT command.
-P XCLIENT_PROTOCOL
The SMTP client protocol (SMTP or ESMTP) to be supplied via the
XCLIENT command, this can differ from the result of a previous
HELO/EHLO command.
-H XCLIENT_HELO
The alternativ HELO/EHLO string to be passed to the server via the
XCLIENT command.
-F CFGFILE
Instead of passing the XCLIENT values via the command line, you can
also give a config file that contains some or all of them. Note that
command line options override config file options.
The contents of the config file are the XCLIENT verbs followed by an
equal sign followed by the plain values. Spaces are allowed before
and after the equal sign.
Example:
ADDR = 172.30.0.2
NAME = bad_client.from.local
PROTO = ESMTP
HELO = bad_client
-d Show debug output on STDOUT.
---------------------------------------------------------------------------------
-Chris
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]