1.
General considerations on trouble shooting
As a rule, one should not expect everything running smoothly from the very beginning.
E-mail messages do not reach their destinations, but you do not why.
Unluckily there is no solid problem determination tool, and you must try to figure out by yourself what is going wrong.
IBM iSeries Infocenter page Troubleshooting e-mail provides a simple scheme to address most common cases.
To solve particular e-mail problems, you may use the MMAIL CGI program DSPQZMFDTA to display the current entries of the QZMF journal.
Never despare. Soon or later you will fix the trouble; then try to remember what you did.
2.
The e-mail messages do not arrive to their destinations
All mailing troubles do result into this condition. The problem stays in isolating the error.
A first step in this direction is that of finding whether the mail message was able to leave the system.
You must first understand how things work.
MMAIL builds the MIME message as an IFS stream file /mmail/temp/Qnnn.txt .
Then MMAIL calls API QTMMSENDMAIL that submits the request to MSF.
MSF reads the stream file, deletes it from the IFS, and passes it to SMTP.
SMTP cares for sending the message out from port 25. To where, that depends on SMTP attributes (command CHGSMTPA).
One thing you can tell for sure, is whether SMF has taken the message or not. Just enter command
wrklnk '/mmail/temp/*' and see whether your message is still there. If yes, then you have troubles with MSF,
if not, the message was hopefully passed to SMTP for being kicked off the system (only the QZMF journal can tell if that was successful).
Let us take the case when the e-mail message is still in directory /mmail/temp .
Of course the message may be still there because you forgot to start msf or smtp (you may as well display the joblogs of the
QMSF jobs in sbs QSYSWRK, to see if any nasty message there). Usually however, this is because something is wrong with the e-mail message itself.
First you should look at the joblog of the job sending the message via MMAIL, and check if there is a message telling that the e-mail was submitted to MSF.
Next, you must display the /mmail/temp/Qnnn.txt stream file, check that both the sender's and the receiver's e-mail addresses are there,
and that all the e-mail addresses contain the @ character.
If any error in the e-mail addresses, you may just key in your changes, save the changes and enter command mmail/resend.
It may work (but you have still to fix the problem of bad addressing, see the next FAQ).
If the e-mail message is no longer in directory /mmail/temp/, it means that it was successfully passed to SMTP, but still you do not know
whether SMTP was able to send it out.
Some little help in this case may come by trying to send an e-mail message through command SNDDST. If it goes through and reaches its destination,
at least you know that your SMTP is working all right and that the external path is also working. To be able to use command SNDDST, you must use an user
profile enrolled in the system distribution directory (ADDDIRE, WRKDIRE). We suggest that you enter a command like the following (just change the destination address
to one that comes to you):
SNDDST TYPE(*LMSG)
TOINTNET((Charlie.Brown@gmail.com))
DSTD('Hello via SNDDST')
LONGMSG('Hi Charlie, you are receiving this message thanks to command SNDDST.')
CFMDEL(*YES) USRID(*CURRENT)
SUBJECT('Hello (SNDDST)')
|
If not even the SNDDST has success, the possibles causes could be:
- the SMTP configuration is not correct (see FAQ number 7; if running Domino on the same system as MMAIL, see FAQ number 5)
- if your system is sending the mail messages to a mail server other than your ISP mail server,
maybe that your messages are simply rejected (see FAQ number 5).
- the mailbox you are sending the message is inactive (in this case, you the sender's e-mail is yours, you should receive a non-delivery message)
- your message is detected as a SPAM message at your ISP or at the ISP of the receiver (the receiver may use the webmail provided by his ISP
and check if the message arrived and was routed to a SPAM directory or similar)
- your system has been flagged as delinquent and enrolled in a Public Block List; as a consequence messages out of it are blocked in the network.
To check out this, enter the IP address of your system at page SpamHouse inquiry.
3.
Domain control characters ("@") not recognized as such by MSF
This issue is generally related to system value QCCSID 65535.
Such a value inhibits page code conversion, and a result would transmit to MSF the wrong character istead of @.
The problem is usually solved when one at last decides to replace the system value QCCSID with the appropriate value for
the national language in use.
Check out the following IBM iSeries Infocenter pages:
See also our FAQ number 9.
4.
How should I configure TCP/SMTP/POP to send and to receive mail?
Click here to display a useful IBM document on this subject.
5.
How to have native SMTP working on a system
where Lotus Domino is also running
Lotus Domino uses its own SMTP service on port
25, the same used by native OS/400 SMTP. Port 25 is locked by Domino,
and the native SMTP is therefore inhibited.
To solve this conflict, you should use a function called
"bind to specific IP address".
In the Domino environment, this is achieved using the CHGDOMSVR command to
bind your Domino server to a specific address.
In the native environment, it is achieved through a function that allows
the OS/400 SMTP server and OS/400 SMTP client to bind to a specific TCP/IP
address.
In this way, even if you cannot change the SMTP port number, you can force
the OS/400 SMTP service to use a specific TCP/IP address, different from
the Domino one.
This technique is described in one of the
IBM redbooks:
Lotus Domino for AS/400 Internet Mail and More, SG24-5990,
Chapter 5. One iSeries server and two SMTPs.
In this chapter you can find the
instructions to setup the service up to V4R5. Starting from V5R1, you must
use the Operations Navigator:
Network ---> Servers ---> TCP/IP ---> Select the SMTP service ---> Right
button on it ---> Properties ---> Bindings
6.
How to have outgoing mail from an iSeries
be served by a mail server on another system
Suppose that your iSeries is not connected to Internet,
and that you have another system connected to Internet
and acting as a mail server.
To have the outgoing mail from your iSeries served by this
mail server:
- suppose that the IP address of the mail server is
"m1.m2.m3.m4' and that the IP address of your iSeries is
"i1.i2.i3.i4"
- on your iSeries enter the following command:
chgsmtpa mailrouter('m1.m2.m3.m4') firewall(*yes)
and re-start the SMTP server
- on the other system acting as a mail server,
if a SPAM filter is active for SMTP, you must update the filter
to allow mail requests from IP address "i1.i2.i3.i4".
If the system acting as a mail server is an iSeries,
V5R1 or later, enter the following command
addsmtple type(*accept) intnetadr('i1.i2.i3.i4')
and re-start the SMTP server.
For more information about SPAM filters, see
this page.
7.
How shoud I configure the Simple Mail Transfer Protocol (SMTP)
server?
There are two main cases (V5R1):
- the iSeries is a mail server (is connected to the Internet)
- the iSeries is not a mail server (is not connected to the
Internet), but is connected to another system
acting as mail server (for instance, a mail service provider).
Here are two sample SMTP configurations for the two cases.
1. iSeries mail server
|
Change SMTP Attributes (CHGSMTPA)
Type choices, press Enter.
Autostart server . . . . . . . . *YES *YES, *NO, *SAME
Retries by minute:
Number of retries . . . . . . 3 0-99, *SAME, *DFT
Time interval . . . . . . . . 30 0-99, *SAME, *DFT
Retries by day:
Number of retries . . . . . . 0 0-9, *SAME, *DFT
Time interval . . . . . . . . 0 0-9, *SAME, *DFT
Retries by hour:
Number of retries . . . . . . 0 0-99, *SAME, *DFT
Time interval . . . . . . . . 0 0-99, *SAME, *DFT
Retry remote name server . . . . *NO *YES, *NO, *SAME
Automatic registration . . . . . *NO *NO, *YES, *SAME
User ID prefix . . . . . . . . QSM Name, *SAME, *DFT
Address . . . . . . . . . . . QSMRMTAD Name, *SAME, *DFT
System name . . . . . . . . . TCPIP Character value, *SAME, *DFT
Alias table type . . . . . . . *SYSTEM *SAME, *SYSTEM, *PERSONAL
User ID delimiter . . . . . . . '?' *SAME, *DFT, ?, =, ., &, $...
Mail router . . . . . . . . . . *NONE
Coded character set identifier 00819 1-65533, *SAME, *DFT
Mapping tables:
Outgoing EBCDIC/ASCII table . *CCSID Name, *SAME, *CCSID, *DFT
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Incoming ASCII/EBCDIC table . *CCSID Name, *SAME, *CCSID, *DFT
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Firewall . . . . . . . . . . . . *YES *YES, *NO, *SAME
Journal . . . . . . . . . . . . *NO *YES, *NO, *SAME
Process all mail through MSF . . *NO *YES, *NO, *SAME
Percent routing character . . . *YES *YES, *NO, *SAME
Dial-up scheduler:
Start with SMTP server . . . . *NO *NO, *SAME, *YES
Configuration profile . . . . Name, *SAME
Connection time interval . . . 1-1440 minutes, *SAME, *NONE
Support ETRN for server . . . . *NO *SAME, *NO, *YES
Support ETRN for client:
Enable client ETRN . . . . . . *NO *NO, *SAME, *YES
Incoming mail server address
Mail domain name . . . . . . .
Support 8-bit MIME . . . . . . . *NO *SAME, *NO, *YES
Delivery status notification:
Responsible person . . . . . . *NONE
Subsystem description . . . . . QSYSWRK Name, *SAME, *DFT
Library . . . . . . . . . . . QSYS Name
Realtime Blackhole List . . . . *NONE
Allow relayed mail . . . . . . . *LIST *SAME, *NONE, *ALL, *LIST...
Interface/domain association . . *NONE *SAME, *NONE, *LIST
Filter mail for virus . . . . . *NONE *SAME, *NONE, *KEEP, *DISCARD
Notes.
- "Mail router" in this case must be *NONE
- The "Allow relayed mail" parameter is used to determine
which e-mail messages will be accepted.
In other words, this is a SPAM filter to avoid that other
systems connected in the Internet may use the CPU time of
this system for sending their e-mail messages.
The *LIST parameter tells that a list of authorized IP
addresses has been provided via command ADDSMTPLE.
For more information
see
this page.
|
|
|
2. iSeries NOT mail server
|
| |
Change SMTP Attributes (CHGSMTPA)
Type choices, press Enter.
Autostart server . . . . . . . . *YES *YES, *NO, *SAME
Retries by minute:
Number of retries . . . . . . 3 0-99, *SAME, *DFT
Time interval . . . . . . . . 30 0-99, *SAME, *DFT
Retries by day:
Number of retries . . . . . . 0 0-9, *SAME, *DFT
Time interval . . . . . . . . 0 0-9, *SAME, *DFT
Retries by hour:
Number of retries . . . . . . 0 0-99, *SAME, *DFT
Time interval . . . . . . . . 0 0-99, *SAME, *DFT
Retry remote name server . . . . *NO *YES, *NO, *SAME
Automatic registration . . . . . *NO *NO, *YES, *SAME
User ID prefix . . . . . . . . QSM Name, *SAME, *DFT
Address . . . . . . . . . . . QSMRMTAD Name, *SAME, *DFT
System name . . . . . . . . . TCPIP Character value, *SAME, *DFT
Alias table type . . . . . . . *SYSTEM *SAME, *SYSTEM, *PERSONAL
User ID delimiter . . . . . . . '?' *SAME, *DFT, ?, =, ., &, $...
Mail router . . . . . . . . . . '9.2.176.92'
Coded character set identifier 00819 1-65533, *SAME, *DFT
Mapping tables:
Outgoing EBCDIC/ASCII table . *CCSID Name, *SAME, *CCSID, *DFT
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Incoming ASCII/EBCDIC table . *CCSID Name, *SAME, *CCSID, *DFT
Library . . . . . . . . . . Name, *LIBL, *CURLIB
Firewall . . . . . . . . . . . . *YES *YES, *NO, *SAME
Journal . . . . . . . . . . . . *NO *YES, *NO, *SAME
Process all mail through MSF . . *NO *YES, *NO, *SAME
Percent routing character . . . *YES *YES, *NO, *SAME
Dial-up scheduler:
Start with SMTP server . . . . *NO *NO, *SAME, *YES
Configuration profile . . . . Name, *SAME
Connection time interval . . . 1-1440 minutes, *SAME, *NONE
Support ETRN for server . . . . *NO *SAME, *NO, *YES
Support ETRN for client:
Enable client ETRN . . . . . . *NO *NO, *SAME, *YES
Incoming mail server address
Mail domain name . . . . . . .
Support 8-bit MIME . . . . . . . *NO *SAME, *NO, *YES
Delivery status notification:
Responsible person . . . . . . *NONE
Subsystem description . . . . . QSYSWRK Name, *SAME, *DFT
Library . . . . . . . . . . . QSYS Name
Realtime Blackhole List . . . . *NONE
Allow relayed mail . . . . . . . *ALL *SAME, *NONE, *ALL, *LIST...
Interface/domain association . . *NONE *SAME, *NONE, *LIST
Filter mail for virus . . . . . *NONE *SAME, *NONE, *KEEP, *DISCARD
Notes.
- "Mail router" is the TCP address of the system acting as mail
server
- For "Allow relayed mail" specify:
- *ALL only if your iSeries is NOT connected to the outside network (Internet).
In this way mail requests from any other local system
are accepted. This allows any other internal system to
send mail requests (via mail router address) to this system.
These requests will then be routed to the mail server
specified as mail router address on this system.
- *NONE if your iSeries IS connected to the outside network (Internet).
In this way you will prevent your system to be abused by other hacking systems
in the outside network trying to use the CPU of your system to send their mail.
- One must make sure that the mail server accepts mail requests
submitted from this system.
- A special but common case is that where all computers in your shop can receive/send mail
through the link to a mail service provider. If your iSeries is connect to the outside network
(Internet) and its IP address is in the range of IP addresses served by this provider, then you may
have your iSeries outgoing mail served by this provider too.
Assuming that you have Outlook as mail server on your PC, do the following:
- Click "Tools" and select "Accounts..."
- Display the Properties of your mail service provider account
- Press the "Server" tab
- Take a note of the address specified on line "Outgoing mail"
- Open a DOS prompt and ping that address, so that the corresponding IP address is displayed
- That is the IP address you have to specify in the "Mail router" parameter of SMTP attributes
(see command CHGSMTPA above).
|
|
|
|
8.
How to support spool files with more than 132 characters per line?
The maximum supported number of characters per line
depends on the total record length of file
mmail/spools,
which is delivered as 132.
To increase this limit to (say) 180, operate as follow:
- dltf mmail/spools
- crtpf file(mmail/spools) rcdlen(180) mbr(*none) maxmbrs(*nomax) size(*nomax) aut(*all)
9.
How can I run MMAIL on a system with system value QCCSID= 65535?
Any job started on iSeries inherits its CCSID from system value QCCSID.
CCSID 65535 inhibits code page conversion (see
this Infocenter page). On the other side, the system API used by MMAIL,
QtmmSendMail, requires the sender and the addressee data be in code page 500; moreover,
the MIME file itself need to support code page conversion.
For this to occur, both the job using MMAIL commands or subprocedures, and the QMSF jobs
must run with a CCSID other than 65535.
This can be implemented as follow:
- find out the "nnnn" CCSID appropriate for your national language (see
this Infocenter page)
- if you need to run an MMAIL command from a 5250 session, enter the following commands before
running any MMAIL command:
- chgjob ccsid(nnnn)
- addlible mmail
- mmail/chgjbccsid job(QMSF) ccsid(nnnn)
- if it is a program issuing MMAIL commands or using MMAIL service program subprocedures,
just have the program using
subprocedure SetJobCSID
as soon as it starts.
|