You have just setup an SMTP server and want to test it (or you want to test an existing server). Then we have a little guide for you:
The full post can be found
here.
1 Requirements
Installation of Telnet on Windows 7
Press the following keys at the same time: Windows + R
and fill in the following, followed by :
Code:
pkgmgr /iu:"TelnetClient"
Installation of Perl
Go to
http://strawberryperl.com/ and install the appriopriate version.
2. Connecting with the outgoing mailserver
Opening the connection
Press the following keys at the same time: Windows + R
and fill in the following, followed by: cmd
In the opened black screen enter: telnet hostname 25
(alternatively this can be 587 if configured and your ISP does block port 25)
After a succesful connection you receive:
Listing the functionality
Enter:
The out should be like:
Name of the server
Multiple commands can be entered at the same time
The maximum message size is 10,000KB
It is possible to verify existance of mailaddresses
Allowed to queue mail
TLS encryption is supported
Code:
250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5
All of the authentication methods
Code:
250-ENHANCEDSTATUSCODES
Just as the label reads
8 bit data transmission
Delivery Status Notification
Crafting the authenticationstring
Press the following keys at the same time: Windows + R
and fill in the following, followed by : cmd
Navigate to the folder where you installed Strawberry Perl.
eg. cd C:\strawberry
In the following command replace john with your mailname (eg. info), example.com with your domainname (eg yourdomain.com) and changeme by your password.
Code:
perl -MMIME::Base64 -e "print encode_base64 (\"\000john\@example.com\000changeme\")"
Special charachters in mailname, domainname or password, are to be preceded by a \
eg ch@ng3m3 has to be noted as ch\@ng3m3
more info on the escape charachter can be found on
http://en.wikipedia.org/wiki/Escape_character
The output will be something like:
Code:
AGpvaG5AZXhhbXBsZS5jb20AY2hhbmdlbWU=
Authenticating to the outgoing mailserver
Enter AUTH PLAIN followed by the code we received earlier:
Code:
AUTH PLAIN AGpvaG5AZXhhbXBsZS5jb20AY2hhbmdlbWU=
The expected response is:
Providing the sender and recipient references
Sender:
Recipient:
Providing the data
Enter following commands:
Code:
DATA
From: John
To: Nobody
Subject: test
test
.
Note: test is followed by a dot, this is important
After this dot, you need to press <enter> twice.
You will now receive a reply that the mail has been queued correctly, and you will receive the queue ID.
Code:
250 ok 1331314839 qp 30242
Sources:
http://qmail.jms1.net/test-auth.shtml
http://www.fehcom.de/qmail/smtpauth.html
http://www.webdigi.co.uk/blog/2009/h...ding-an-email/
http://cr.yp.to/smtp/ehlo.html
http://www.yuki-onna.co.uk/email/smtp.html