Wednesday, September 3, 2008

Telnet mail server send email

Below is some instruction on how to testing your mail server using the telnet command. I found this is useful while you do some debugging on the mail server to send out email to others.

  1. Open a Command Prompt window
  2. Telnet to your mail server. Normally the port will be 110(Pop3) and 2
    telnet [yourmailserver] [port]

  3. Following is the example to connect SMTP server & try to send out email. Once successful telnet into your mail server, execute it (Red will be the command & the green is the reply). For the auth login command c2S2AxFuZHk= is user name (base 64 encoded) and the b2Y8IOdhdGE= is password (base 64 encoded) . You can encode your user name & password here.

    auth login
    334 VXNlcm5hbWU6
    c2S2AxFuZHk=
    334 UGFzc3dvcmQ6
    b2Y8IOdhdGE=
    235 2.7.0 Authentication successful.
    mail from: [SENDER EMAIL ADDRESS]
    250 2.1.0 [SENDER EMAIL ADDRESS]....Sender OK
    rcpt to: [RECEIPIENT EMAIL ADDRESS]
    250 2.1.5  [RECEIPIENT EMAIL ADDRESS]
    data
    354 Start mail input; end with .
    subject:testing
    testing email from XXXXXX
    .250 2.6.0 Queued mail for delivery

    quit