Using the SMTP Command Exit
The SMTP server can be configured to call an exit routine whenever
certain SMTP commands are received, through use of the SMTP command
exit. This exit can be defined such that is invoked for any or all
the commands that follow:
- HELO
- The SMTP 'HELO' command.
- EHLO
- The SMTP 'EHLO' command.
- The SMTP 'MAIL FROM:' command.
- RCPT
- The SMTP 'RCPT TO:' command.
- DATA
- The SMTP 'DATA' command.
- EOD
- The
end of data
condition. This occurs when a period (.) is received by the server, usually after all data has been transmitted. - VRFY
- The SMTP 'VRFY' command.
- EXPN
- The SMTP 'EXPN' command.
- RSET
- The SMTP 'RSET' command.
- PUNCH
- The point in time when the server is about to deliver mail to a local destination on the same node or RSCS network; this command is unique to the VM TCP/IP SMTP server.
Note:
The SMTP command exit could be used for a wide variety
of purposes; several possible uses are included here: - The person responsible for creating or maintaining programs that exploit this capability should be knowledgeable of the protocol(s) related to the SMTP commands that are processed using this exit.
- Only one SMTP command exit can be active at a time.
- Reject particular SMTP commands. For example, you may not want your server to support the VRFY
and EXPN commands.Note: The SMTP server answers to the EXPN and/or VRFY commands. The EXPN command can be used to find the delivery address of mail aliases, or even the full name of the recipients, and the VRFY command may be used to check the validity of an account. Your mailer should not allow remote users to use any of these commands, because it gives them to much information.
- Handle the delivery of local mail in a specific manner.
- Screen and reject mail that contains offensive language, or fails to meet other criteria defined by your installation.
Note: Scanning the content of a message will severely degrade server
performance.