How to check if SMTP is working from commandline (Linux) [closed]

o check if SMTP is working from the command line (Linux), is one critical aspect to be considered while setting up an email server. The most common way of checking SMTP from Command Line is using telnet, openssl or ncat (nc) command. It is also the most prominent way to test SMTP Relay.

How to check if SMTP is working from commandline (Linux) [closed]

Syntax for establishing a raw network connection using telnet is this:

telnet {domain_name} {port_number}

So telnet to your SMTP server like

telnet smtp.mydomain.example 25

And copy and paste the below

helo client.mydomain.example
mail from:<sender@mydomain.example>
rcpt to:<to_email@mydomain.example>
data
From: test@mydomain.example
Subject: test mail from command line

this is test number 1
sent from linux box
.
quit

Note : Do not forgot the "." at the end which represents the end of the message. The "quit" line exits ends the session.


Click Here to Visit

What's Your Reaction?

like
0
dislike
0
love
0
funny
0
angry
0
sad
0
wow
0