This chapter describes how to install and configure SMTP plug-ins, dynamic libraries that extend the capabilities of Netscape Messaging Server. For instructions on how to develop SMTP plug-ins, and for a detailed description of the plug-in programming interface, see Messaging Server Plug-In API Guide.
About SMTP Plug-Ins Managing SMTP Plug-Ins with Netscape Console Managing SMTP Plug-Ins Manually Installing and Configuring Protocol-Level Plug-Ins Interface Reference: SMTP Plug-Ins
PreSMTPAccept (protocol-level) plug-ins act before SMTP has accepted the incoming message and written it to disk.
PostSMTPAccept plug-ins act immediately after the message is received.
PreSMTPDeliver plug-ins act just before the message is handed off to another host.
Figure 7.1 SMTP Plug-Ins
The UBE and anti-relay plug-ins supplied by NetscapePlug-ins that your enterprise has developed internallyCommercially developed plug-ins that you have purchased
The UBE PostSMTPAccept plug-in provides a flexible, customizable filtering capability for removing or redirecting unwanted messages. This plug-in is automatically installed when you install Messaging Server.
The protocol-level (PreSMTPAccept) anti-relay plug-in is used to prevent others from disguising the UBE that they send out to appear as if it is coming from your site.
The PostSMTPAccept and PreSMTPDeliver type of plug-ins can be installed through the Netscape Console as described in Managing SMTP Plug-Ins with Netscape Console, or by manually editing the plug-in configuration file as described in Managing SMTP Plug-Ins Manually.
Protocol-level (PreSMTPAccept) type plug-ins are installed and configured manually as described in Installing and Configuring Protocol-Level Plug-Ins.
Process the message header and body at specific times, before the message undergoes further processing by Messaging Server
Split the message among envelope recipients and change the envelope sender
Follow these steps to install a PostSMTPAccept or PreSMTPDeliver type plug-in with Netscape Console:
Copy the plug-in library file to a suitable location on your server host machine.
In Netscape Console, open the Messaging Server on that host machine.
Click the Configuration tab and open the Services folder in the left pane.
Open the SMTP icon under the Services folder.
Select Plug-ins under the SMTP icon.
Click Add in the right pane to open the Add Plug-in window.
In the Add Plug-in window, specify the following information for your new plug-in:
In the Entry field, use the drop-down list to select the entry point in SMTP processing at which your plug-in operates (PostSmtpAccept or PreSmtpDeliver).
In the Path field (required), enter the path name to the plug-in library file.
In the Functions field (required), enter a comma-separated list of the names of the functions that this plug-in provides. Your plug-in documentation should state exactly what to enter in this field.
In the Init field (required), enter the name of the initialization function that allows the plug-in to initialize any global or static data before mail reception or delivery begins. This function is called at MTA startup (smtpd startup).
In the Options field (optional), enter any other required information (in the form of space-separated name=value pairs) as specified in the documentation accompanying the plug-in.
Click OK to commit your entries and install the plug-in.
Restart the server.
Follow these steps to remove an installed PostSMTPAccept or PreSMTPDeliver type of plug-in from your Messaging Server, using Netscape Console:
Open the SMTP Plug-ins tab, as described in Installing Plug-Ins.
In the Plug-in Configuration table, select the path name of the plug-in you want to delete.
Click Delete.
All installed PostSMTPAccept and PreSMTPDeliver type plug-ins appear in the Messaging Server SMTP Plug-ins form in Netscape Console. Follow these steps to activate or deactivate one of these plug-ins:
In the Plug-in Configuration table, locate the path name of the plug-in you want to activate or deactivate.
Check the Status box to the left of the plug-in's path name to activate the plug-in; uncheck the Status box to deactivate the plug-in.
Click OK.
You initially configure a PostSMTPaccept or PreSMTPdeliver type plug-in when you first install it (see Installing Plug-Ins). You can also use Netscape Console to change the configuration of these kinds of plug-in. (Protocol level plug-ins cannot be configured from Netscape Console.)
In the Plug-in Configuration table, select the path name of the plug-in you want to reconfigure.
Click Edit. The Edit Plug-in window opens.
In the Edit Plug-in window, modify any of the following information as needed:
In the Entry field, change the entry point in SMTP processing at which this plug-in operates (PostSmtpAccept or PreSmtpDeliver).
In the Path field, edit the path name to the plug-in library.
In the Functions field, edit the comma-separated list of the functions that this plug-in provides.
In the Options field, edit any other required information, as specified in the documentation accompanying the plug-in.
Click OK to commit your reconfiguration of the plug-in.
You can install and configure PostSMTPAccept and PreSMTPDeliver plug-ins by directly editing your Messaging Server plugins.cfg file. That file is located at instanceDirectory/smtp-bin/plugins/, where instanceDirectory is the directory containing the files of the specific instance of the Messaging Server that uses the plug-in.
entry pluginPath funcs=functionList init=initfunction [optionList]
PostSmtpAccept \/export2/server4/msg-Airius1/smtp-bin/plugins/libUBEfilter.so \funcs=filter_msg_plugin \init=filter_msg_init \config=/export2/server4/msg-Airius1/smtp-bin/plugins/UBEfilter.cfg \option=/export2/server4/msg-Airius1/smtp-bin/plugins/UBEfilter.opt
Use the file libUBEfilter.so (the library that contains the UBE plug-in)Call the function filter_msg_plugin to start filter processingCall the initialization function filter_msg_init at server startup
Use the filter configuration file named UBEfilter.cfgUse the filter options file named UBEfilter.opt
PostSmtpAccepti:\Netscape\Server4\msg-Airius1\smtp-bin\libUBEfilter.dllfuncs=filter_msg_plugininit=filter_msg_initconfig=i:\Netscape\Server4\msg-Airius1\smtp-bin\plugins\UBEfilter.cfgoption=i:\Netscape\Server4\msg-Airius1\smtp-bin\plugins\UBEfilter.opt
To manually delete, or uninstall, a PostSMTPAccept, or PreSMTPDeliver type plug-in, follow these steps:
Deactivate the plug-in if it is active.
Delete the plug-in's lines from plugins.cfg
Remove the plug-in library file from your server host machine.
Remove any other plug-in-specific configuration files, as noted in the documentation that accompanies the plug-in.
In Unix environments, make sure that your configuration environment is correctly set to the server instance's configuration directory. Typically this is server-root/config/smtp. (This step is not necessary in NT environments.)
Set your shared library path variable to the directory containing your platform's shared libraries.
For example, in a typical Unix environment you set the LD_LIBRARY_PATH variable to server-root/bin/msg/lib.
Use configutil to specify that SMTP is to load the plug-in when it starts up.
A full path to the plug-in must be specified.
If the plug-in must be run locally, use the configutil -l option.
For example, to load a plug-in named antirelay.so stored in the plugins subdirectory in a Unix environment, you enter:
Configure the anti-relay plug-in as described in the plug-in's documentation.
Installing Plug-InsDeleting (Uninstalling) Plug-InsActivating and Deactivating Plug-InsConfiguring Plug-Ins
Note: If you have installed a plug-in but it does not appear in this field, it might not have been installed properly. In that case, remove it by following the instructions in Deleting Plug-Ins, and then try again.
Save. Click this button to commit any settings you have made in the SMTP Plug-ins tab.
Installing Plug-InsConfiguring Plug-InsMessaging Server Plug-In API Guide (for information on plug-in structure)
OK. Click this button to commit the information you have entered, installing the new plug-in or imposing the changes you have made to the existing one.