SMTP Debug For MyPBX & Gateways

This guides apply to the models: U-Series, TAv2, TGv2, TE, TB.

This guide introduces how to do SSMTP debug for:

  • Voicemail Setting(MyPBX) / Email Setting(TG VoIP Gateway)
  • SMS Setting(MyPBX&TG VoIP Gateway)

SMTP Debug for Voicemail Setting (MyPBX) / Email Setting (TG VoIP Gateway)

Step1. Login MyPBX/TG Gateway via SSH using Putty.

Step2. Create and edit a configuration file mail.eml by the command
vi etc/ssmtp/mail.eml

 

Figure 1 Create mail.eml Configuration File

Step3. Type the contents as below into the configuration file mail.eml. Then save and quit the configuration file. Replace the email as required.
From: MyPBX < mypbx@sina.com >
To: harry < harry@yeastar.com >
Subject: test
MIME-Version: 1.0

 

Figure 2 Edit mail.eml Configuration File

 

Step4. Execute the commands to send a test mail.
cd /etc/ssmtp
ssmtp -vt < /etc/ssmtp/mail.eml

Figure 3 ssmtp Debug

Step5. If tested successfully, you can see the following logs:
[<-] 220 irja2-171.sinamail.sina.com.cn ESMTP
[->] EHLO mypbx
[<-] 250 AUTH=PLAIN LOGIN
[->] AUTH LOGIN bXlwYnhAc2luYS5jb20=
[<-] 334 UGFzc3dvcmQ6
[->] eWVhc3RhcjEyMzQ1Ng==
[<-] 235 #2.0.0 OK Authenticated
[->] MAIL FROM:<mypbx@sina.com>
[<-] 250 sender <mypbx@sina.com> ok
[->] RCPT TO:<harry@yeastar.com>
[<-] 250 recipient <harry@yeastar.com> ok
[->] DATA
[<-] 354 go ahead
[->] Received: by mypbx (sSMTP sendmail emulation); Thu, 18 Aug 2011 23:03:25 -0800
[->] Date: Thu, 18 Aug 2011 23:03:25 -0800
[->] From: mypbx<mypbx@sina.com>
[->] To: harry<harry@yeastar.com>
[->] Subject:test
[->]
[->] .
[<-] 250 ok: Message 265161993 accepted
[->] QUIT
[<-] 221 irja2-171.sinamail.sina.com.cn

Step6. If it is not tested successfully, you may refer to the error samples from the appendix.


SMTP Debug for SMS Setting (MyPBX&Neogate TG)

Step1. Login MyPBX/TG Gateway via SSH using Putty.

Step2. Create and edit a configuration file mail.eml by the command
vi etc/smscore/mail.eml

Figure 1 Create mail.eml Configuration File

 

Step3. Type the contents as below into the configuration file mail.eml. Then save and quit the configuration file. Replace the email as required.
From: MyPBX < mypbx@sina.com >
To: harry < harry@yeastar.com >
Subject: test
MIME-Version: 1.0


Figure 2 Edit mail.eml Configuration File

Step4. Execute the command to send a test mail.
cd /etc/smscore/
ssmtpsms -vt < /etc/smscore/mail.eml

Figure 3 SSMTPSMS Debug

 

Step5. If tested successfully, you can see the following logs:
[<-] 220 irja2-171.sinamail.sina.com.cn ESMTP
[->] EHLO mypbx
[<-] 250 AUTH=PLAIN LOGIN
[->] AUTH LOGIN bXlwYnhAc2luYS5jb20=
[<-] 334 UGFzc3dvcmQ6
[->] eWVhc3RhcjEyMzQ1Ng==
[<-] 235 #2.0.0 OK Authenticated
[->] MAIL FROM:<mypbx@sina.com>
[<-] 250 sender <mypbx@sina.com> ok
[->] RCPT TO:<harry@yeastar.com>
[<-] 250 recipient <harry@yeastar.com> ok
[->] DATA
[<-] 354 go ahead
[->] Received: by mypbx (sSMTP sendmail emulation); Thu, 18 Aug 2011 23:03:25 -0800
[->] Date: Thu, 18 Aug 2011 23:03:25 -0800
[->] From: mypbx<mypbx@sina.com>
[->] To: harry<harry@yeastar.com>
[->] Subject:test
[->]
[->] .
[<-] 250 ok: Message 265161993 accepted
[->] QUIT
[<-] 221 irja2-171.sinamail.sina.com.cn

Step6. If it is not tested successfully, you may refer to the error samples from the appendix.

 

 Appendix - Error Samples of SSMTP Debug

1) Wrong Port
ssmtp: Cannot open smtp.sina.com:26

2) Wrong Password
[<-] 220 gz-t-smtp2.163.com SMTP Server for Netease [466]
[->] EHLO hshstar1989
[<-] 250 STARTTLS
[->] AUTH LOGIN aHNoc3RhcjE5ODlAMTYzLmNvbQ==
[<-] 334 UGFzc3dvcmQ6
[->] MTM4NTk1Nzcw
[<-] 535 authentication failed
ssmtp: Authorization failed (535 authentication failed )

3) Lack of Password
[<-] 220 smtp.qq.com Esmtp QQ Mail Server
[->] EHLO 2233875595
[<-] 250 8BITMIME
[->] MAIL FROM:<2233875595@qq.com>
[<-] 503 Error: need EHLO and AUTH first !
ssmtp: 503 Error: need EHLO and AUTH first !

4) Sender Mismatch with Login User
[<-] 220 smtp682-31.sinamail.sina.com.cn ESMTP
[->] EHLO mypbx
[<-] 250 8BITMIME
[->] AUTH LOGIN bXlwYnhAc2luYS5jb20=
[<-] 334 UGFzc3dvcmQ6
[->] eWVhc3RhcjEyMzQ1Ng==
[<-] 235 OK Authenticated
[->] MAIL FROM:<2233875595@qq.com>
[<-] 553 Envolope sender mismatch with login user.
ssmtp: 553 Envolope sender mismatch with login user.

5) SMTP Service Is Not Enabled
[<-] 220 smtp.qq.com Esmtp QQ Mail Server
[->] EHLO 2233875595
[<-] 250 8BITMIME
[->] AUTH LOGIN MjIzMzg3NTU5NUBxcS5jb20=
[<-] 334 UGFzc3dvcmQ6
[->] eXMxMjM0NTY=
[<-] 454 Authentication failed, please open smtp flag first!
ssmtp: Authorization failed (454 Authentication failed, please open smtp flag first!)

6) SMTP Frequency Too Much
[<-] 220 smtp682-32.sinamail.sina.com.cn ESMTP
[->] EHLO mypbx
[<-] 250 8BITMIME
[->] AUTH LOGIN bXlwYnhAc2luYS5jb20=
[<-] 334 UGFzc3dvcmQ6
[->] eWVhc3RhcjEyMzQ1Ng==
[<-] 235 OK Authenticated
[->] MAIL FROM:<mypbx@sina.com>
[<-] 250 ok
[->] RCPT TO:<pixy@yeastar.com>
[<-] 250 ok
[->] DATA
[<-] 550 Sender frequency limited
ssmtp: 550 Sender frequency limited

More errors, please refer to the RFC document: Click Here

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.