How do I send smtp-auth email from the command line ?

The following is an example of an SMTP conversation where the sender is authenticated with SMTP-Auth.  Your mail server may listen on a port other than 25, maybe 465 or 587.

telnet yourmailhost.example.com 25

220 esmtp.example.com ESMTP
ehlo yourhostname.example.com
250-esmtp.example.com
250-PIPELINING
250-8BITMIME
250 AUTH LOGIN PLAIN CRAM-MD5
auth login
334 VXNlcm5hbWU6
bXlhdXRodXNlcm5hbWU
334 UGFzc3dvcmQ6
bXlwYXNz
235 ok, go ahead (#2.0.0)

In the above example several values are base64 encoded. Two of these values are your username and password you are sending to authenticate. You will need to use a base64 converter to determine the string to send in your case.

VXNlcm5hbWU6 = Username:

bXlhdXRodXNlcm5hbWU = myauthusername

UGFzc3dvcmQ6 = Password:

bXlwYXNz = mypass

Here is a handly base64 encoder/decoder: http://www.rbl.jp/base64.php

Commentary

Leave a response »

Leave a comment, a trackback from your own site or subscribe to an RSS feed for this entry. Trackback URL for this entry Comments feed for this entry

Leave a response

Leave a URL

Preview