Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
I have an SMTP-server, for this question let's call it: smtp.mydomain.com.

How do I check if the SMTP-server is working? Can I send emails manually from the Linux command line?

1 Answer

0 votes
by (36.8k points)
edited by

The 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.com 25

And copy and paste the below

helo client.mydomain.com

mail from:<[email protected]>

rcpt to:<[email protected]>

data

From: [email protected]

Subject: test mail from the command line

this is test number 1

sent from the linux box

.

quit

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

To know about Linux join the Linux training

Do check out the video below

Related questions

0 votes
1 answer
asked Nov 20, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
0 votes
1 answer
asked Dec 12, 2020 in Linux by blackindya (18.4k points)
0 votes
1 answer
0 votes
1 answer
asked Nov 26, 2020 in Linux by blackindya (18.4k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...