Archive for October, 2010

quickly check your mail server using telnet, mail or mutt

There are of course various ways to check whether your mail server is now configured ok or not but what I found is that checking through telnet is quick and easy.

let’s check our mail server now, it may be mail.youdomain.com or localhost depending on what you are using right now, here’s the full process:

# telnet localhost smtp
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.example.com ESMTP Postfix
mail from: me@example.com
250 2.1.0 Ok
rcpt to: other@example.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Just a test. 
This is test mail using telnet.  
.
250 2.0.0 Ok: queued as 6846838401D6
quit
221 2.0.0 Bye
Connection closed by foreign host.
#_

here,

# telnet localhost smtp

We are trying connecting localhost on port 25 (smtp). It should get connected and ready to accept your next command

mail from: me@example.com

here you are specifying the sender mail id, it should be a valid mail account otherwise mail server can reject the sender address.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes