Complete Contents
About This Guide
Chapter 1 Getting Started with Netscape Messaging Server
Chapter 2 Configuring POP, IMAP, and HTTP Services
Chapter 3 Configuring SMTP Services
Chapter 4 Managing Mail Users and Mailing Lists
Chapter 5 Managing the Message Store
Chapter 6 Security and Access Control
Chapter 7 Working with SMTP Plugins
Chapter 8 Filtering Unsolicited Bulk Email
Chapter 9 Message Routing
Chapter 10 Monitoring and Maintaining Your Server
Chapter 11 Logging and Log Analysis
Chapter 12 Program Delivery
Chapter 13 Messaging Multiplexor
Appendix A Command Line Utilities
Appendix B sendmail Migration and Compatibility
Appendix C SNMP MIB
Glossary
Index
Messaging Server Administrator's Guide: Working with SMTP Plug-Ins
Previous Next Contents Index


Chapter 7 Working with SMTP Plug-Ins

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.

For information on using the SMTP plug-ins that allow you to filter unsolicited bulk email (UBE) and prevent relay of UBE from your server, see Chapter 8, Filtering Unsolicited Bulk Email.

This chapter contains the following sections:


About SMTP Plug-Ins
There are three kinds of SMTP plug-in, each of which act at a different stage in message processing, as shown in Figure 7.1.

Figure 7.1 SMTP Plug-Ins

The SMTP plug-ins that you can use with Netscape Messaging Server might include the following:

As an administrator, you control which plug-ins are installed and active at any given time. Only one plug-in (the UBE plug-in) is installed automatically when you install Messaging Server. Messaging Server includes the following two pre-built plug-ins that are described in Chapter 8, Filtering Unsolicited Bulk Email:

Plug-ins might have very different purposes, but they are all installed, configured, and activated in standard ways:

Netscape Messaging Server provides an application programming interface (API) that allows you or third parties to create server plug-ins that can add site-specific functionality to Messaging Server. (See your Netscape sales or support representative for information about the availability of plug-ins for Netscape Messaging Server.)

Developers can use the Messaging Server Plug-in API to:

Message-processing plug-ins can include character-set converters or content filters that implement site-specific firewall functionality, filtering out suspicious incoming or outgoing attachments. Message-splitting plug-ins can be used to customize the message content for a subset of the original recipients.

For more information about server plug-in APIs, see Messaging Server Plug-In API Guide. For general Netscape developer information, see the Netscape DevEdge site.


Managing SMTP Plug-Ins with Netscape Console
You can install, configure, activate, and delete PostSMTPAccept and PreSMTPDeliver type plug-ins with the Netscape Console as described in this section. (Working with protocol-level type plug-ins is described in Installing and Configuring Protocol-Level Plug-Ins.)

Installing Plug-Ins

Follow these steps to install a PostSMTPAccept or PreSMTPDeliver type plug-in with Netscape Console:

  1. Copy the plug-in library file to a suitable location on your server host machine.
  2. In Netscape Console, open the Messaging Server on that host machine.
  3. Click the Configuration tab and open the Services folder in the left pane.
  4. Open the SMTP icon under the Services folder.
  5. Select Plug-ins under the SMTP icon.
  6. Click Add in the right pane to open the Add Plug-in window.
  7. In the Add Plug-in window, specify the following information for your new plug-in:
  8. Click OK to commit your entries and install the plug-in.
  9. Restart the server.
Note: Your plug-in might have additional installation procedures not described here. See the documentation accompanying the plug-in for more information.

By default, a newly installed plug-in is not active. To activate your new plug-in, see Activating and Deactivating Plug-Ins.

The information you enter in the Add Plug-in window is written to your Messaging Server's plugins.cfg file. For information on installing plug-ins by directly editing plugins.cfg, see Installing and Configuring Plug-Ins.

Deleting (Uninstalling) Plug-Ins

Follow these steps to remove an installed PostSMTPAccept or PreSMTPDeliver type of plug-in from your Messaging Server, using Netscape Console:

  1. Open the SMTP Plug-ins tab, as described in Installing Plug-Ins.
  2. In the Plug-in Configuration table, select the path name of the plug-in you want to delete.
  3. Click Delete.
Note: This uninstallation removes the plug-in library file and makes corresponding modifications to the configuration file plugins.cfg. If your plug-in includes other files, you might have additional uninstallation steps to follow. See the documentation accompanying your plug-in for more information.

You can also remove a plug-in by editing and deleting files manually. For instructions, see Installing and Configuring Plug-Ins.

Activating and Deactivating Plug-Ins

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:

  1. Open the SMTP Plug-ins tab, as described in Installing Plug-Ins.
  2. In the Plug-in Configuration table, locate the path name of the plug-in you want to activate or deactivate.
  3. 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.
  4. Click OK.
Note: If the plug-in you want to activate or deactivate does not appear in the table, it might not be installed or it might have been installed improperly. If it was installed improperly, remove it by following the instructions in Deleting Plug-Ins, and then try again.

The active or inactive status of a plug-in is stored in the plugins.cfg file. For information on activating and deactivating plug-ins by directly editing plugins.cfg, see Installing and Configuring Plug-Ins.

Configuring Plug-Ins

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

Follow these steps to reconfigure an installed plug-in:

  1. Open the SMTP Plug-ins tab, as described in Installing Plug-Ins.
  2. In the Plug-in Configuration table, select the path name of the plug-in you want to reconfigure.
  3. Click Edit. The Edit Plug-in window opens.
  4. In the Edit Plug-in window, modify any of the following information as needed:
  5. Click OK to commit your reconfiguration of the plug-in.
The information you enter in the Edit Plug-in window is written to your Messaging Server plugins.cfg file. For information on reconfiguring plug-ins by directly editing plugins.cfg, see Installing and Configuring Plug-Ins.

Note: Your plug-in might have additional configuration files and procedures not described here. See the documentation accompanying the plug-in for more information.


Managing SMTP Plug-Ins Manually
You are not required to use Netscape Console to manage your PostSMTPAccept and PreSMTPDeliver type SMTP plug-ins. This section describes how to manage them by editing the plug-in configuration file. (See Installing and Configuring Protocol-Level Plug-Ins for information on working with PreSMTPAccept plug-ins.)

Installing and Configuring Plug-Ins

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.

The plugins.cfg file holds basic configuration information for all installed PostSMTPAccept and PreSMTPDeliver type plug-ins. In the configuration file, plug-ins are listed in the order in which you installed them in Messaging Server. When they run, the plug-ins for a given entry point are also executed in that order. If order of execution is important, either make sure you install plug-ins in the order you want, or edit plugins.cfg to achieve that order.

Each plug-in's configuration is a line with these elements:

entry pluginPath funcs=functionList init=initfunction [optionList]

where the elements have the following meanings:

entry
The entry point (PostSmtpAccept or PreSmtpDeliver) at which this plug-in operates.
pluginPath
The path name to the plug-in library's binary (executable) file.
functionList
A comma-separated list of the functions supported by this plug-in. Messaging Server calls these functions, in the order in which they appear in this list, to execute the plug-in.
initfunction
A function called at MTA startup (smtpd startup) which allows the plug-in to initialize any global or static data before mail reception or delivery begins. For example, this can be used to perform preprocessing tasks such as reading config files.
optionList
An optional set of space-separated name=value pairs that the plug-in can use for any purpose. Messaging Server passes this information to the plug-in when it executes the plug-in.

Here is an example for a Unix server with the UBE filter plug-in:

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

These command lines tell the server to:

The command includes two options, named config and option that specify path names to configuration files:

Here is a similar example for a Windows NT server with the UBE filter plug-in (all of which would be on a single command line):

PostSmtpAccept
i:\Netscape\Server4\msg-Airius1\smtp-bin\libUBEfilter.dll
funcs=filter_msg_plugin
init=filter_msg_init
config=i:\Netscape\Server4\msg-Airius1\smtp-bin\plugins\UBEfilter.cfg
option=i:\Netscape\Server4\msg-Airius1\smtp-bin\plugins\UBEfilter.opt

This plug-in also acts at PostSmtpAccept, its library name is libUBEFilter.dll, it has a single function (filter_msg_plugin), and it uses two options (named config and option) that specify path names to configuration files.

You can modify the information in any of these lines to change the configuration of the plug-in. For example, if you change the location of the plug-in library file, you can enter the new path here instead of using the Netscape Console interface. (This would be equivalent to reinstalling the plug-in, and would require a server restart.)

If a plug-in is installed but has been deactivated through Netscape Console, its line in the plugins.cfg file is commented out; that is, it starts with a number sign (#) character. You also can manually deactivate a plug-in by commenting out its lines in the file.

Note: If your plug-in uses other files besides its library file and plugins.cfg, configuring the plug-in might mean editing those files as well. For details, see the documentation that accompanies your plug-in.

Deleting Plug-Ins

To manually delete, or uninstall, a PostSMTPAccept, or PreSMTPDeliver type plug-in, follow these steps:

  1. Deactivate the plug-in if it is active.
  2. Delete the plug-in's lines from plugins.cfg
  3. Remove the plug-in library file from your server host machine.
  4. Remove any other plug-in-specific configuration files, as noted in the documentation that accompanies the plug-in.

Installing and Configuring Protocol-Level Plug-Ins
Protocol level (PreSMTPAccept) plug-ins are installed using the configutil utility as described below.

There is no standard method of configuring a protocol-level plug-in. Configuration methods and options for protocol-level plug-ins are specified in the plug-in design. Consult the documentation that accompanies the plug-in for configuration information.

To install and activate a protocol-level plug-in:

  1. 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.)
  2. Set your shared library path variable to the directory containing your platform's shared libraries.
  3. For example, in a typical Unix environment you set the LD_LIBRARY_PATH variable to server-root/bin/msg/lib.

  4. Use configutil to specify that SMTP is to load the plug-in when it starts up.
  5. 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:

    configutil -l -o service.smtp.protplugmodules -v \
    '/usr/netscape/suitespot4/plugins/antirelay.so'

  6. Configure the anti-relay plug-in as described in the plug-in's documentation.

Interface Reference: SMTP Plug-Ins
This section describes the Netscape Console interface elements that allow you to install and configure SMTP plug-ins. See Managing Servers With Netscape Console for information on using Netscape Console to manage Messaging Server and other servers.


SMTP Plug-ins Tab
The Plug-ins tab allows you to install and remove SMTP plug-ins. For more information, see also:

The Plug-ins tab has the following elements:

Plug-in Configuration. This table displays the status and location of each installed plug-in. Use the Path entry to select a plug-in; then use the Add, Edit, and Delete buttons to add it, delete it, or change its configuration.

Status. Check this box to make an installed plug-in active; uncheck the box to make an installed plug-in inactive.

Path. This entry within the Plug-in Configuration table displays the path to (location of) each installed plug-in. To edit this entry, select it and click Edit.

Add. Click this button to open the Plug-in Entry window (see Plug-in Entry Window), which allows you to install a new SMTP plug-in.

Edit. After selecting a plug-in in the Plug-in Configuration table, click this button to open the Plug-in Entry window (see Plug-in Entry Window), which allows you to edit the configuration of the selected plug-in.

Delete. After selecting a plug-in in the Plug-in Configuration table, click this button to remove the selected plug-in.

Standard Buttons

Save. Click this button to commit any settings you have made in the SMTP Plug-ins tab.

Reset. Click this button to reset the tab to the previously-saved settings.


Plug-in Entry Window
The Plug-in Entry window allows you to install a new SMTP plug-in or edit the characteristics of a currently installed plug-in. For more information, see also:

The Plug-in Entry window has the following elements:

Entry. From the drop-down list, select the entry point (PostSmtpAccept or PreSmtpDeliver) for this plug-in.

Path. (required) In this field, enter the location of (path to) the plug-in library itself. You must have already placed your plug-in library in its location before entering this information.

Functions. (required) In this field, enter the list of functions that this plug-in implements. The list is a comma-separated sequence of function names. The documentation accompanying the plug-in you are installing or reconfiguring should provide this information.

Init. (required) In this field, 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).

Options. (optional) In this field, enter additional information (in the form of space-separated name=value pairs) that is to be passed to the plug-in when it is executed. The documentation accompanying the plug-in you are installing or reconfiguring should provide this information.

Standard Buttons

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.

Cancel. Click this button to close the Edit Plug-in window without making any additions or changes to the current set of plug-ins.

 

© Copyright 1999 Netscape Communications Corp., a subsidiary of America Online, Inc. All rights reserved.