Skip to main content  
  Easy400   |       iSeries home   |   RSS feed
Freeware
 
Introduction
5250 utility
Windows utility
Other utilities
Service program
Sample code
Commands
CGI support
FAQ
WEBMail
Self maintenance
 
Download
 
 

 
Search   
MIME & Mail
Frequently Asked Questions
1. How should I configure TCP/SMTP/POP to send and to receive mail?
2. How to have native SMTP working on a system where Lotus Domino is also running
3. How to have outgoing mail from an iSeries be served by a mail server on another system
4. How shoud I configure the Simple Mail Transfer Protocol (SMTP) server?
5. How to support spool files with more than 132 characters per line?
6. How can I run MMAIL on a system with system value QCCSID= 65535?



1. How should I configure TCP/SMTP/POP to send and to receive mail?

Click here to display a useful IBM document on this subject.


2. 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


3. 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:

  1. 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"
  2. on your iSeries enter the following command:
        chgsmtpa mailrouter('m1.m2.m3.m4') firewall(*yes)
    and re-start the SMTP server
  3. 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.



4. How shoud I configure the Simple Mail Transfer Protocol (SMTP) server?

There are two main cases (V5R1):

  1. the iSeries is a mail server (is connected to the Internet)
  2. 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.
  1. "Mail router" in this case must be *NONE
  2. 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.
  1. "Mail router" is the TCP address of the system acting as mail server
  2. 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.
  3. One must make sure that the mail server accepts mail requests submitted from this system.
  4. 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:
    1. Click "Tools" and select "Accounts..."
    2. Display the Properties of your mail service provider account
    3. Press the "Server" tab
    4. Take a note of the address specified on line "Outgoing mail"
    5. Open a DOS prompt and ping that address, so that the corresponding IP address is displayed
    6. That is the IP address you have to specify in the "Mail router" parameter of SMTP attributes (see command CHGSMTPA above).



5. 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:

  1. dltf mmail/spools
  2. crtpf file(mmail/spools) rcdlen(180) mbr(*none) maxmbrs(*nomax) size(*nomax) aut(*all)



6. 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:

  1. find out the "nnnn" CCSID appropriate for your national language (see this Infocenter page)
  2. 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)
  3. 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.




    Contact