PowerWire.eu

Independent IBM i, AIX and Linux news and tech tips for Europe and beyond

  • Home
  • News
  • Technical Articles
    • IBM i
    • AIX
    • Linux
    • VIOS
  • Subscribe
  • About Us
  • Contact Us
  • Advertise with PowerWire.eu

What happened to my emails?

May 5, 2020 by Steve Bradshaw Leave a Comment

One of the questions I get asked often is “How can you track emails sent from IBM i?” Until 7.2 this was a near impossible task.  But since 7.2 WRKSMTPEMM was added to the operating system and I love it!

What does it look like?

If we start with a WRKSMTPEMM LISTBY(*RCP) QUEUE(*ALL) we get a list of all emails sorted by recipient email address.

Press F11 will give you a selection of different views, one of the more useful being the subject field:

But how do I know if the email was sent?

This is where option 8 to view the log comes in handy, the example below shows you the exact time and date it was handed on to the relaying server. Armed with this information you know that your email was sent and that any problem with it’s delivery was not one caused by your IBM i.

Can I view the contents of an email?

Yes, using Option 9 but you really are looking at the raw email so there are a lot of headers in the file and if the email has an attachment then you will see the base encoding of it (a lot of junk characters). Below is an example of option 9 Display Mime.

ProTip: If you want to read the email properly, take the .eml file shown at the top the Display MIME screen and open it with a standard email tool like Outlook.

Where are the email stored?

They are kept in a series of directories all starting /QTCPTMM/DATA, as emails below:

The .eml files are the emails themselves and the .env files the delivery logs.

What is the catch?

Well, IBM does not turn this logging on by default, you have to enable it with the CHGSMTPA command. I think they were worried that a busy system with a lot of email might fill the disk up a little too quickly.  So, I suggest that if you do enable this, keep an eye on disk ulilisation. Personally, I’ve not had a problem on any of the systems I look after.

Below is the command you would use to keep the maximum amount of email history, a rolling 1240000 seconds, roughly two weeks.  CHGSMTPA KEEPUNTIL(1240000)

Please note that even after you issue the CHGSMTPA, this does not take effect until you stop and restart the SMTP service.

Filed Under: IBM i, Technical Articles

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Free monthly newsletter signup

News

A screen a story – Not our problem anymore

Last week I ran into an issue, which did teach me something new about the command WRKPRB. After checking a … [Read More...]

Raspberry Pi and Machine Learning

In my last article, I demonstrated how I used Machine Learning on the Raspberry Pi to determine if a … [Read More...]

Shield Advanced Solutions – new Messaging and Monitoring solutions

September 2022 – Toronto As Shield Advanced Solutions celebrates the significant milestone, 25 years of … [Read More...]

More articles from this section

Quick Links

  • Advertise
  • Subscribe

Follow Us…

  • Email
  • LinkedIn
  • Twitter

Search This Website

Copyright © 2023 · Cue Communications · All Rights Reserved

Log in