For this article, I use example.com as the domain name for mail servers and email addresses. In addition, I use the standard ports of 25 for SMTP and 110 for POP3.
The first thing you’ll need to do is install Telnet if it is not already present. (Telnet is not automatically installed on all systems in favor of the more secure SSH protocol.) To install Telnet on a Red Hat Enterprise Linux-based system, type:
$ yum install telnet
Testing an SMTP mail server
Now that you have Telnet installed, you’re ready to start. Let’s first verify that your SMTP server is available by connecting to it via Telnet with the following command:
$ telnet mail.example.com 25
Once connected, you will receive a response similar to the following:
Initiate the connection with the SMTP service by using the following command:
ehlo smtp.example.com
The response looks like this:
You are now ready to send an email. Start by telling the system what email address the mail is coming from:
mail from: admin@example.com
The system will then acknowledge that the information is in the correct syntax, in the same format used in the previous image.
Next, tell the system the recipients’ email address or addresses with the following command:
rcpt to: user1@example.com
The system acknowledges that the information is in the correct syntax, as follows:
Tell the system that you are beginning the body of your email by typing data as follows:
data
The system will respond with a single dot (.) on its own line, which ends the email headers:
Now, set the subject and write the email’s content. Then, tell the system to send the email by using the dot (.) as follows:
subject: test
Test that your email addresses are working properly.
Thanks,
SysAdmin
.
The system then reports that the email was accepted for delivery:
Exit the session by typing quit, which disconnects us as shown here:
Testing a POP mail server
Now, check the configuration of your POP3 service, which is provided by Dovecot. The first step is to connect to the server over POP3, which is served on port 110:
$ telnet mail.example.com 110
Once connected, you will receive a response similar to the following:
Next, provide the information for the user account you’re accessing. In this case, verify that user1 received the email you just sent them:
user user1
You see that the username is correct with:
Next, use the following command to authenticate using the user’s password:
pass xxxxxxxx
If the user and password are correct, the authentication is confirmed as follows:
To check and see what mail is available, use the list command:
list
This command returns a list of all email for that user, and the size of that email, as shown below (it does not return any other information).
To read an email, we need to use the retr command, which is short for retrieve:
retr 1
In this case, you asked to retrieve email number one, which as you can see is the email you sent directly via SMTP through Telnet:
As this was a test email, delete it from the system using the dele command, as follows:
dele 1
Here you can see that the system responds that the mail is marked as deleted:
Run the list command again. You can see that there is no longer any email:
As with the SMTP services, we can type quit to exit:
Wrapping up
You can tell a lot by using Telnet to perform basic email server testing. Whether you’re using POP or SMTP, experiment with this process when things are going well so you can see when things go wrong.
저자 소개
Amy Marrich is a Principal Technical Marketing Manager at Red Hat. She previously worked at a small open source e-assessment company in Luxembourg, where she was the Open Source Community and Global Training Manager. Previously, she was the OpenStack Instructor at Linux Academy and a Linux System Engineer on the Platform Engineering Cloud Operations team at Rackspace. She currently serves on the OpenStack Board, is an active member of the Openstack Ansible project, and was previously the chair of the OpenStack User Committee. Amy spends her free time competing in performance events (agility, FASt Cat, and dock diving) with her Dalmatians and competing in dressage with her Connemara pony.
유사한 검색 결과
Behind the scenes of RHEL 10, part 3
Alliander modernises its electricity grid with Red Hat for long-term reliability in balance with rapid innovation
The Overlooked Operating System | Compiler: Stack/Unstuck
Linux, Shadowman, And Open Source Spirit | Compiler
채널별 검색
오토메이션
기술, 팀, 인프라를 위한 IT 자동화 최신 동향
인공지능
고객이 어디서나 AI 워크로드를 실행할 수 있도록 지원하는 플랫폼 업데이트
오픈 하이브리드 클라우드
하이브리드 클라우드로 더욱 유연한 미래를 구축하는 방법을 알아보세요
보안
환경과 기술 전반에 걸쳐 리스크를 감소하는 방법에 대한 최신 정보
엣지 컴퓨팅
엣지에서의 운영을 단순화하는 플랫폼 업데이트
인프라
세계적으로 인정받은 기업용 Linux 플랫폼에 대한 최신 정보
애플리케이션
복잡한 애플리케이션에 대한 솔루션 더 보기
가상화
온프레미스와 클라우드 환경에서 워크로드를 유연하게 운영하기 위한 엔터프라이즈 가상화의 미래