Home > AS/400 Tips > iSeries security tips > Block unauthorized access to SMTP server on your iSeries
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ISERIES SECURITY TIPS

Block unauthorized access to SMTP server on your iSeries


Rich Loeber
09.20.2005
Rating: -4.44- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Many OS/400 shops keep the SMTP server active on their system to support host-based applications that format and send e-mail messages directly from their iSeries-AS/400 system. The problem is, with the SMTP server active, you could leave your system open to spammers who could take over the SMTP server to relay their spam messages. There are steps you can take, however, to control SMTP relay on your system.

First, check to see if SMTP is active on your system by running the following command:

WRKACTJOB SBS(QSYSWRK)

Page up through the list of tasks displayed and look for a series for four or five jobs that start with the name QTSMTPxxxx. If these tasks are there, then the SMTP server is active on your system.

Controlling SMTP mail relay involves two processes. First, you have to set the ALWRLY parameter in the SMTP Attributes on your SMTP server. This is updated using the CHGSMTPA (Change SMTP Attributes) command.

More Information

If you just want to deny all mail relays, set this value to *NONE and you're all set -- you can stop reading now and move on with your life. However, if you are sending mail from your iSeries using the SNDDST or other program-controlled methods, you cannot leave this setting at *NONE because it will block mail being sent from your system. Simply changing this setting to *ALL is not a good idea either, as it will allow anyone to relay mail through your system. The best choices are one of the following:

  • *LIST -- Only IP addresses that match an *ACCEPT SMTP list entry will be allowed or denied
  • *NEAR -- Only IP addresses that match a *NEAR SMTP list entry will be allowed
  • *BOTH -- The system will look at both the *LIST and *NEAR entries

Once you have this part configured and have specified one of the three recommended settings, you then have to update the SMTP list to indicate who can relay mail. You use the ADDMSTPLE (Add SMTP List Entry) command to do that. There are a lot of options for this, but as a simple example let's set up an entry that will permit mail to be relayed from your iSeries. If your system has an IP address of 10.100.2.1, then you would add a relay accept transaction that looks like the following:

ADDSMTPLE TYPE(*ACCEPT) INTNETADR('10.100.1.2')
SUBNETMASK('255.255.255.255')

This entry will accept all SMTP mail that is sent from the specific IP address indicated in the INTNETADR parameter. The subnet mask used here is coded so that only the specific IP address will be processed. You can also use this command to post a *REJECT or *NEAR entry to the SMTP list to indicate specific IP addresses to be rejected or to define a system to be considered as a *NEAR system. Varying the subnet mask can let you define ranges of IP addresses. (If you need help on how to code these entries, feel free to contact me.)

Once entries have been added to the SMTP list, you can delete them using the RMVSMTPLE (Remove SMTP List Entry) command. It would be nice if IBM provided a WRKSMTPLE command, too, but the test system I work on has no sign of this feature.

If you have been using SMTP list entries for a while, you may need to know what entries are already established on your system. OS/400 provides no support for a review function, but you can review what is already set up by examining the various members in the file anmed QATMADRLST in library QUSRSYS. Each member, which you will find appropriately named, contains the list entries for that type. A simple query report can list the entries, and you can remove unwanted entries as needed.

If you have any specific questions about this topic, you can reach me at rich@kisco.com, I'll try to answer your questions. All e-mail messages will be answered.

---------------------------
About the author: Rich Loeber is president of Kisco Information Systems Inc. in Saranac Lake, N.Y. The company is a provider of various security products for the iSeries market.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
iSeries security tips
A guide to System i security, Part 3: Digging in to the System i security environment
Is your AS/400 secure?: How a hacker could get valuable information from your system
System i security report round-up
A guide to System i security, part 2: Landing and establishing access
Creating a System i database security policy: Implementation
A guide to System i security: Descending into the heart of darkness of IT security
Creating a System i database security policy: First steps
Enhancements in the intrusion detection system for i5/OS V6R1
Six common System i security lapses
Working with exit programs in i5/OS V6

iSeries system and application security
A guide to System i security, Part 3: Digging in to the System i security environment
Primary group authority: How it works
Blocking access to SQL line commands
Moving files to new libraries allows access to only groups or users that are authorized
Changing telnet ports: A security solution?
Moving to security level 30
Menu security's relationship to object authority
Encrypting files or fields on the iSeries
Changing the QSECOFR password
Ensuring security on i runbook

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
midrange  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 1999 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts