z/OS Communications Server: IP User's Guide and Commands
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SMTP exit for unwanted mail

z/OS Communications Server: IP User's Guide and Commands
SC27-3662-00

You can use an SMTP exit to inspect and filter unwanted mail (spam) sent through SMTPPROC.

The SMTP component contains the SMTPPROC application which is the mail to mail interface used on the Internet. This component is responsible for routing mail between the sender and receiver. A user exit can be used to reject mail (spam) based on criteria determined by the user. This exit examines the data sent by the remote SMTP client application and determines what action to take based on the contents of that mail item or mail command.

This exit can be replaced dynamically without stopping the SMTPPROC program. The procedure for doing this follows:

  1. Issue a "SMSG smtpprocname STOPEXIT" TSO command. The TSO userid must be in the authorized list for SMTPPROC to issue this command. This will cause SMTP to issue the termination call to the exit and then set a flag so that the exit will not be called anymore. Processing of mail will continue as if there is no exit.
  2. Remove the old exit using the SETPROG EXIT operator command or by updating SYS1.PARMLIB(PROGxx) and issuing the refresh console command. An example of updating SYS1.PARMLIB follows:
    1. In SYS1.PARMLIB(PROGxx) have this line:
      EXIT DELETE EXITNAME(EZBTCPIPSMTPEXIT) MODNAME(OLDEXIT) FORCE(YES)
    2. At the MVS™ console issue SET PROG=xx.
  3. Add the new exit using the SETPROG EXIT operator command or by updating SYS1.PARMLIB(PROGxx). An example of updating SYS1.PARMLIB follows:
    1. In SYS1.PARMLIB(PROGxx) have this line:
      EXIT ADD EXITNAME(EZBTCPIPSMTPEXIT) MODNAME(NEWEXIT)
    2. At the MVS console issue SET PROG=xx.
  4. Issue a "SMSG smtpprocname STARTEXIT" TSO command. This will cause SMTP to issue the initialization call to the exit. A flag is then set so the exit will be called from then on for new mail connections. Processing of new mail will continue with the exit being called. The first smtp command to be seen by a reinstated exit will be HELO. The exit will not be called in the middle of a currently processing exchange.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2013
This information center is Built on Eclipse™ ( www.eclipse.org ).