How to check if smt...
Notifications
Clear all

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

RSS

(@abhijith)
Noble Member
Joined: 2 years ago
帖子:1350
31/03/2021 10:35 am

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?


Quote
(@ganesh)
Noble Member
Joined: 2 years ago
Posts: 1362
31/03/2021 10:36 am

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]>

数据

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


ReplyQuote
Share:
Baidu