Simultaneous Use of Several Receiver/Sender Components |
You can connect several Receiver and/or Sender components to drweb-maild simultaneously. This feature can be used for the following purposes: •to enable concurrent interaction with several MTAs or SMTP/LMTP proxy; •to enable differentiation of settings for each Receiver/Sender pair (which allows using different settings for monitored interfaces); •to enable redirection of messages from one MTA to another (i.e. for routing).
To enable simultaneous usage of several components: 1.Assign a unique identifier to each Sender and Receiver component (each element within the Sender or Receiver group must have a unique identifier, but ID of a Receiver must match an ID of a Sender). 2.Define the configuration source for each component. 3.Assign the ID of the Receiver that got the message as a tag. 4.After a message is processed, drweb-maild searches for an available Sender with the same ID as the Receiver's. If not found, the message is dispatched to the default Sender (the only Sender with no unique ID specified) which must be always available. 5.The list of available Sender components is generated on the startup and is refreshed upon receipt of SIGHUP signal. 6.Routing of messages generated by drweb-notifier is managed by the MsgIdMap parameter from the [Notifier] section of Dr.Web MailD configuration file. This parameter allows defining to which Sender reports are to be sent in response to messages from certain Receivers. Unique identifier for Receiver/Sender is set via --unique-id command line parameter. When components are started with this parameter, they create in %var_dir/msgs/{in|out} directory a number of subdirectories for their message queues, and in %var_dir/ipc/ directory a special UNIX socket is created for Sender. When the second copy of the component (for example, drweb-receiver) is started, an additional adjustment is required: that is, to specify the way this second copy receives configuration. A component can receive configuration in the following ways: •create a new copy of the *.conf file; •modify the existing copy of the *.conf file (it is easier, but less flexible). To modify an existing *.conf file: •create a new *.amc file for Dr.Web Agent and add information on a new copy of the component. The file name is arbitrary.
In the example, drweb-receiver* and drweb-sender* are the new names of the components used for interaction with Dr.Web Agent; Receiver* and Sender* are the new names of the corresponding section in the configuration file. Other parameters must be copied from the section with the original component settings. Detailed description of *.amc files syntax can be found in Dr.Web Agent description. •copy the main section with component settings to the *.conf file, rename this section (specify the name that was set on the previous step) and adjust all other settings in the new section for the second component; •start or restart Dr.Web Agent to enable it to read the new configuration; •start the new component with the following command line parameters: --unique-id, --component, --section.
drweb-receiver --unique-id id2 --component drweb-receiver2 --section Receiver2 To create a new copy of *.conf file (requires more effort but allows adjustment of different section settings): •create a copy of original *.conf file and adjust parameters (it is not required to rename the sections!); •create a new *.amc file that contains only information on the new component. You must also specify the path to the new *.conf configuration file created on a previous step; •start or restart Dr.Web Agent to enable it to read the new configuration; •start the new component with the following command line parameters: --unique-id, --component. Example: drweb-receiver --unique-id id2 --component drweb-receiver2 Dr.Web Monitor can be configured to use new components for both ways of initialization. To do that, add the corresponding lines (about new components startup) to the *.mmc file of Dr.Web MailD. Detailed description of *.mmc file syntax is provided above, in the Dr.Web Monitor description. |