Email Quit Working? It's Probably Not your Email Software.


Email Quit Working?  It's Probably Not your Email Software.


Email Quit Working?  It's Probably Not your Email Software.

When it comes to sending email from your IBM i (or AS/400, iSeries, etc...) there are a few different options.  In fact, we pride ourselves on having one of the best email clients for the IBM i out there in the form of our MAILTOOL (and MAILTOOL Plus Addon).  

Our Software allows you to send emails using Cloud Servers such as GMail, Office 365, or any server requiring authentication and/or SSL/TLS and even OAuth 2.0 directly from your machine with no intermediate proxies.

One thing that seems to be a truism when it comes to email on the IBM i is that if it works, that's great.  We don't care how we got email working, we just know it works.  

But, if it doesn't work (or quits working) we are normally left scrambling as to how to figure out what is wrong.  

Normally, because we provide an email client software package, we're the first contact if email goes kaput.  

We're more than happy to help, and thought we would put together this article to help others, even people not using our MAILTOOL software, try and figure out what's going wrong.

If you recently updated your OS version from V5Rx or V6Rx to V7Rx or higher, the Change SMTP Attributes (CHGSMTPA) command contains a new parameter named Forwarding Hub Server (FWDHUBSVR).  If the Mail Router parameter contains your mail router and the Firewall parameter is set to *YES, try adding your the same value in Mail Router to the Forwarding Hub Server parameter and stopping and restarting your SMTP server to see if that solves this.  See this APAR for more information from IBM.

Step 1: Contact Your Email Administrator

The first step, especially in the case of email that worked, and now suddenly stopped working, is to contact the administrator of your email server or the mail router that you're using.  

If you are using the base MAILTOOL product, the Send Distribution (SNDDST) command, the Send SMTP Email (SNDSMTPEMM) command or another 3rd party email client, the email server should be listed in the CHGSMTPA command under the Mail Router Parameter (and, if you're on V6R1 or higher also on the Forwarding Mail Hub Server Parameter).  The Firewall parameter should also be set to *YES.  If this isn't the case, or your Mail Router parameter is *NONE or blank, you're not using a mail router and have bigger issues.  You almost always should be using some sort of mail router or SMTP/outgoing mail server to deliver mail.  Rarely will you be directly sending mail from your IBM i.

If you're using MAILTOOL Plus, the mail router will be listed directly in the command on the Mail Router (MAILRTR) parameter of the MAILTOOL command or in a configuration file. 

Ask the administrator of the email router if anything, no matter how insignificant, has changed.  Things such as:

  • Did the software on the mail server get updated?
  • Does the mail server now require authentication and or SSL/TLS?
  • Did the IP Address of the Mail Server Change?  (and if you haven't read this article and are using an IP address or Host Table Entry please do so now!)
  • Does the server need to be set up to allow relaying from your IBM i IP address and that has changed?

If you can't get an answer, or the answer is no, then it's time to look deeper and take things into your own hands.

Step 2: Get a Trace of the Communications Between You IBM i and the Mail Server

Now, I've seen ways that you can query the IBM SMTP server for trace logs, but they're not for the faint of heart.  Instead, we suggest using our MAILTOOL Plus Software (which you can do for FREE with a temporary key) to get a full trace of the exchange between your IBM i and the Mail Server.

If you already have MAILTOOL and MAILTOOL Plus running, things are simple.  Just specify DEBUG(*YES) on the MAILTOOL command and you'll get a trace file named /tmp/mailtoolsmtp_xxxx.txt (xxxx will be a unique id) in the IFS that you can use.

If you are only using the base MAILTOOL product, then you can simply request a temporary key using the Quick Key feature located on our web page for MAILTOOL Plus (MAILTOOLP).  Apply that key, and then add the following parameters:

  • MAILRTR(xx.xx.xx.xx)

The "xx.xx.xx.xx" value should be replaced with your mail router host name.  It should be the same value in the Change SMTP Attributes (CHGSMTPA) command in the Mail Router parameter.  If this value happens to be an IP address or Local Host Name, take a detour and read this article.

Again, this will create a trace file in the IFS named /tmp/mailtoolsmtp_xxxx.txt.  Review it and you'll probably find the issue.

If you're using a different 3rd party email client, or IBM's Send Distribution (SNDDST) command, then you could download and install MAILTOOL making sure to apply temporary keys for MAILTOOL and MAILTOOLP and following the instructions mentioned previously to run the test.  This won't take long since installation is as easy as restoring a library, and when you're done, you can just delete the library.

Don't think you'll be tied into purchasing our MAILTOOL product either.  We're here first to help, and only second to make a living.  So if we can help you solve an issue for free, we're happy as well.

Once you have the trace, you can present it to the administrator of your Mail Server and the errors in it will probably remind them of something they did change late on Friday night before going home.... (nah.. that never happens does it...)

Free free to contact us at BVSTools for more information or more help with email issues.


Last edited 03/02/2022 at 08:42:18


Copyright 1983-2024 BVSTools
GreenBoard(v3) Powered by the eRPG SDK, MAILTOOL Plus!, GreenTools for Google Apps, jQuery, jQuery UI, BlockUI, CKEditor and running on the IBM i (AKA AS/400, iSeries, System i).