Contents ® CHAPTER 1. KASPERSKY MAIL GATEWAY 5.5............7 1.1. What’s new in Kaspersky Mail Gateway 5.5 ............8 1.2. Licensing policy ..................... 9 1.3. Hardware and software requirements ..............9 1.4. Distribution kit ...................... 10 1.5. Help desk for registered users ................11 1.6.
Page 4
® Kaspersky Mail Gateway 5.5 5.1. Updating the anti-virus and content filtration databases ........40 5.1.1. Automatic updating of the anti-virus and content filtration databases ..42 5.1.2. Manual updating of the anti-virus and content filtration databases..... 43 5.1.3. Creating a shared directory for storing and sharing database updates..44 5.2.
Page 5
Contents 6.7. Management of application working queue............73 6.8. Managing the application ..................75 6.9. Control of application activity................77 6.10. Customizing date and time formats ..............77 6.11. Reporting options ....................78 6.12. Additional informational header fields in messages......... 80 CHAPTER 7.
Page 6
® Kaspersky Mail Gateway 5.5 APPENDIX B. KASPERSKY LAB................140 B.1. Other Kaspersky Lab Products ................ 141 B.2. Contact Us......................148 APPENDIX C. LICENSE AGREEMENT ..............150...
CHAPTER 1. KASPERSKY MAIL ® GATEWAY 5.5 ® Kaspersky Mail Gateway 5.5 is designed to filter SMTP mail traffic protecting mail system users from viruses and unwanted messages (spam). The application is a full-featured mail relay (compliant with IETF RFC internet standards) that runs under Linux and FreeBSD operating systems.
® Kaspersky Mail Gateway 5.5 The application detects and cures infected objects using the anti-virus database. During scans, the contents of each file are compared to the sample code of known viruses contained in the database. Please keep in mind that new viruses appear every day and therefore we recommend maintaining the anti-virus databases in an up-to-date state.
• Storage of messages identified as spam or probable spam in the quarantine directory. • Blocking of delivery to recipients for messages identified as spam or probable spam. 1.2. Licensing policy The licensing policy for Kaspersky Mail Gateway includes a system of product use limitations based on the following criteria: Number of users protected by the application •...
® Kaspersky Mail Gateway 5.5 security policy requires the use of the above features, additional disk space will be needed. • at least 500 MB of available space in the /tmp file system. • One of the following operating systems: •...
The License Agreement constitutes a legal agreement between you and Kaspersky Lab containing the terms and conditions under which you may use the purchased software. Please review the License Agreement carefully! If you do not agree to the terms of the License Agreement, you may return the box containing Kaspersky Mail Gateway to your dealer where you have purchased it for a full refund provided that the envelope with the installation CD has not been unsealed.
Page 12
® Kaspersky Mail Gateway 5.5 Table 1. Conventions Style Meaning Bold type Menu titles, menu items, window titles, parts of dialog boxes, etc. Additional information, notes. Note. Information requiring special attention. Attention! Procedure description for user's steps In order to perform the and possible actions.
CHAPTER 2. APPLICATION STRUCTURE AND TYPICAL DEPLOYMENT SCENARIOS Correct application setup and its efficient operation require knowledge of its structure and internal algorithms. It is also important for application deployment within an existing corporate email system. This chapter contains a detailed discussion of the application’s structure, architecture and operating principles as well as typical scenarios of its deployment.
Page 14
® Kaspersky Mail Gateway 5.5 documents mentioned above available http://www.ietf.org. The application includes the following components: smtpgw – the main component – a full-featured mail relay with built-in • anti-virus protection and spam filtering. licensemanager – component for managing license keys (installation, •...
Application structure and typical deployment scenarios 2.2. The algorithm of application functioning The application works as follows (see Fig. 2): The mail agent receives email messages via the SMTP protocol and passes them to the Receiver module. Figure 2. Working queue of Kaspersky Mail Gateway The Receiver module performs preliminary email processing using the following criteria: •...
Page 16
® Kaspersky Mail Gateway 5.5 specific status and returns the message to the scanning module, which then breaks it into individual components and passes them to the AV module for analysis. If you have only purchased a license for anti-virus scanning of email traffic, spam filtering will not be performed.
Application structure and typical deployment scenarios Figure 3. Saving messages to the archives of received / sent messages 2.3. Typical deployment scenarios Depending upon the network architecture, the following options for installation of Kaspersky Mail Gateway are possible: • install the application along corporate network perimeter in the demilitarized zone (DMZ) acting as a buffer between internal corporate LAN and external network);...
Page 18
® Kaspersky Mail Gateway 5.5 In this case the existing corporate mail server has no connection to the Internet; that means additional protection of your data. Moreover, demilitarized zones (DMZ) may be set up. To install the application and the mail system on the same server, the following algorithm is provided to ensure their joint operation: Configure all interfaces of Kaspersky Mail Gateway to listen on port 25 for incoming email traffic from all IP addresses matching the...
Application structure and typical deployment scenarios Specify the list of all corporate local domains as a value for the • ProtectedDomains option in the [smtpgw.forward] section of the application configuration file ("*" and "?" wildcards can be used). Mail messages for the specified domains will be scanned. Application configuration for this deployment scenario will be implemented by default during the installation process.
Page 20
® Kaspersky Mail Gateway 5.5 configuration. Besides, if the application is installed inside the mail system on a dedicated server, this provides for the possibility to distribute the load among several servers performing anti-virus scanning. The following algorithm is provided for joint operation of the application and the mail system installed on the same server: Duplicate your mail system and configure one of the copies to listen on port 25 and receive email messages via all available interfaces.
CHAPTER 3. INSTALLING THE APPLICATION Before installing Kaspersky Mail Gateway, it is necessary to: Make sure that your system meets the hardware and software • requirements (see section 1.3 on p. 9). Configure your Internet connection. The application distribution package •...
® Kaspersky Mail Gateway 5.5 You can also use a universal distribution file for all Linux OS. Use this distribution file if your Linux version does not support the rpm or deb formats or if your administrator does not wish to use (or cannot use) a built-in package manager. The universal Kaspersky Mail Gateway distribution file is supplied as an archive (tar.gz).
Installing the application After you enter the command, the application will be installed automatically. In order to function correctly in FreeBSD 5.x and 6.x distributions, the Spamtest filter needs the following line in the configuration file of the working kernel: options COMPAT_FREEBSD4 3.3.
® Kaspersky Mail Gateway 5.5 license key yet), you can activate the application after installation before its first use. For details see section 5.6 on p. 60. Please note that if the license key is not installed, the anti-virus and content filtration databases cannot be updated and the smtpgw component cannot be started during the installation process.
Page 25
Installing the application If you are using the rpm installation package, enter the following command to start configuration after the files are copied to your server: # /opt/kav/5.5/scm-smtpgw/setup/postinstall.pl The configuration procedure includes the following tasks: Setting up (by the administrator) of the server name that will be used to •...
® Kaspersky Mail Gateway 5.5 • Specifying proxy server name ([updater.options] section, ProxyAddress parameter). This option is necessary for computers connected to the Internet via a proxy server. Modifying the application configuration file to fine-tune the operation of the • AV module and the Spamtest filter (optional).
Page 27
Installing the application In order to install the Webmin module to control Kaspersky Mail Gateway: Use your web browser to access Webmin with the privileges of its administrator. Select the Webmin Configuration tab in the program menu, and then proceed to the Webmin Modules section. Select the From Local File option in the Install Module section and click (see Figure 4).
Page 28
® Kaspersky Mail Gateway 5.5 Figure 5. The icon of Kaspersky Mail Gateway in the Others tab...
CHAPTER 4. THE PRINCIPLES OF PROGRAM OPERATION This chapter contains information necessary for better understanding of the algorithm of application functioning and interaction between its components as well as information required for correct software setup. 4.1. Creating groups of recipients/senders Recipients/Senders group is defined as pairs of recipient/sender email addresses.
Page 30
® Kaspersky Mail Gateway 5.5 All parameters in [smtpgw.group:group_name] sections are optional. If a parameter value in such section is not specified, it will be taken from an identical option in the [smtpgw.policy] section. If the configuration file included into the application installation package is used, then the mail messages will be processed according to the following rules (defined by the policy group): Check all mail messages for presence of spam signs.
Page 31
Anti-virus protection and spam filtration Recipients=*@management.local Recipients=help@helpdesk.local "*" and "?" wildcards may be used for definition of masks. If a group description contains no Recipients or Senders parameter, then the application will use instead the default value: " " At least one of the Senders or Recipients parameters must be specified.
® Kaspersky Mail Gateway 5.5 Figure 6. Message processing 4.2. General message processing algorithm In this section, we shall examine how the application processes email messages. When the server receives an email message, the scanning module: 1. Determines the group of recipients this message belongs to.
Page 33
Anti-virus protection and spam filtration 2. If the message has multiple recipients belonging to different groups, before its further processing with a Spamtest filter and anti-virus scanning, the application creates several virtual copies of this message to match the number of groups and applies respective group rules to each of such copies.
Page 34
® Kaspersky Mail Gateway 5.5 value), then anti-virus message scanning will be skipped. Further actions of the application are described in Step 8. 4. Using a built-in MIME format identifier (MIME, RFC2822, UUE), the application divides the message into its components, such as message body, attachments, etc.
Anti-virus protection and spam filtration • subject – addition to the Subject header of a label corresponding to the assigned status and content category. • keywords – addition to the Keywords header of a label corresponding to the assigned status and content category. •...
® Kaspersky Mail Gateway 5.5 During all those stages, the message analysis is performed according to the degree of filtering intensity defined in the application configuration file (SpamDetection option in the [smtpgw.antispam] section). The following filtering intensity degrees are available: •...
Anti-virus protection and spam filtration The purpose of spam filtering is to decrease the volume of unwanted messages in the mailboxes of your users. It is impossible to guarantee detection of all spam messages because too strict criteria would inevitably cause filtering of some normal messages as well. The application uses two main methods to detect messages with suspicious content: •...
® Kaspersky Mail Gateway 5.5 • Messages with the Probable Spam status will be marked with the [?? Probable Spam] label added to the Subject header (the label may vary depending upon the identified content category, e.g., if the message has been identified as one belonging to the Invitations to workshops, conferences, exhibitions category, it will be replaced with the [?? Seminars etc.] label).
Page 39
Anti-virus protection and spam filtration assigned the Disinfected status. Please see section 4.2 on p. 32 for details regarding other statuses that the AV module can assign to objects. The actions performed by the AV module with an object, which has passed scanning, are determined by the respective options in the configuration file (ActionInfected, ActionSuspicious, etc.).
CHAPTER 5. ANTI-VIRUS PROTECTION AND SPAM FILTRATION Using Kaspersky Mail Gateway, you can arrange anti-virus protection and spam filtering for email traffic transferred through the mail server of your organization. The anti-virus protection and spam filtering system is based on the performance of tasks that represent major functionality of the application.
Page 41
Anti-virus protection and spam filtration The content filtration database is employed for spam filtering (analysis of message content and attached files used to identify unsolicited mail). The anti-virus databases are employed during scanning and disinfection of infected objects; they contain descriptions of all currently known viruses and the methods of disinfection for objects affected by those viruses.
® Kaspersky Mail Gateway 5.5 for the content filtration databases. To do so, assign the av value to the UpdateBases parameter in the [updater.options] section: [updater.options] UpdateBases=av If your network has a complicated structure, we recommend that you download updates from Kaspersky Lab’s update servers every twenty minutes and place them in a network directory.
Anti-virus protection and spam filtration In Linux: */20 * * * * /opt/kav/5.5/scm- smtpgw/bin/keepup2date In FreeBSD: */20 * * * * /usr/local/share/kav/5.5/scm- smtpgw/bin/keepup2date 5.1.2. Manual updating of the anti-virus and content filtration databases You can start updating your anti-virus and content filtration databases from the command line at any time.
® Kaspersky Mail Gateway 5.5 UseUpdateServerUrlOnly=false Enter the following in the command line: # keepup2date –l /tmp/updatesreport.log You can accomplish these or similar tasks remotely using the Webmin remote administration module. 5.1.3. Creating a shared directory for storing and sharing database updates To update the anti-virus and content filtration databases correctly on local computers from the shared directory, you need to reproduce in that directory a...
Anti-virus protection and spam filtration Users may set up their mail clients to transfer the labeled messages to corresponding directories. • blocking of delivery for messages identified as spam or probable spam • saving of messages identified as spam or probable spam in the quarantine directory.
® Kaspersky Mail Gateway 5.5 5.2.2. Blocking delivery of spam messages Task: • Filter spam; specify the standard degree of filtering intensity. • Block the delivery of messages identified as spam or probable spam for users in the managers group. •...
Anti-virus protection and spam filtration case, the messages will be delivered to end users and their copies will be preserved in quarantine. Task: • Filter spam; specify the standard degree of filtering intensity. • Copy all messages identified as spam or probable spam to the quarantine directory.
® Kaspersky Mail Gateway 5.5 5.3.1. Delivery of messages with clean or disinfected objects only Task: • Scan for viruses all incoming and outgoing mail traffic on the server. • Cure infected objects. • Remove from mail messages all infected objects, which could not be cured.
Anti-virus protection and spam filtration 5.3.2. Replacement of infected objects with standard notifications Task: Scan for viruses all mail traffic on the server and cure infected • objects in email messages. Objects, which cannot be cured, must be deleted and replaced •...
® Kaspersky Mail Gateway 5.5 objects in email messages; • Block the delivery of messages containing objects, which cannot be cured, as well as suspicious, damaged or password- protected objects. While implementing the task, please keep in mind that if a message contains several objects and one of them cannot be disinfected or it is suspicious or password-protected, then the delivery of the whole message will be blocked.
Anti-virus protection and spam filtration disinfected objects only. Objects, which cannot be cured, must be deleted as well as • suspicious, damaged or password-protected objects. Notify the senders, recipients and the administrator about cured, • incurable, deleted, suspicious and damaged objects in email messages.
® Kaspersky Mail Gateway 5.5 Filtering of objects is performed using name masks (IncludeByName, ExcludeByName parameters) MIME types (IncludeByMime, ExcludeByMime parameters). Task: • Delete .exe and .reg attachments from mail of users included in the managers group. • For users included in the accounts group, delete all attached objects except for files with .doc extension.
Page 53
Anti-virus protection and spam filtration This feature may be used, for example, if an infected attachment that contains important data was detected during anti-virus scanning. A disinfection attempt may corrupt a part of the data. The message can also be isolated in a separate directory and then sent to Kaspersky Lab for analysis.
® Kaspersky Mail Gateway 5.5 5.4. Combining spam filtration and anti-virus protection The choice of application mode, level of anti-virus scanning and spam filtering intensity depend on the volume of mail traffic processed by the application and the corporate security policy. Three modes demonstrated in this section provide insight into the opportunities for combining spam filtration with anti-virus protection of email traffic.
Anti-virus protection and spam filtration ScanArchives=false ScanMailBases=false UseIChecker=true Create List1 file containing the list of the most frequent dangerous objects from the viewpoint of anti-virus protection. E.g.: *.exe *.bat *.com *.bin Specify the following parameter values in the [smtpgw.policy] section of the configuration file: CheckAV=true CheckSpam=true IncludeByName=file:<path_to_file>/List1...
® Kaspersky Mail Gateway 5.5 • replaces suspicious objects and infected objects, which cannot be cured, with a standard notification • blocks delivery for messages containing password-protected attachments and objects that cause errors while scanning adding them to the quarantine directory •...
Page 57
Anti-virus protection and spam filtration • filters mail traffic looking for spam; the degree of filtering intensity is hard • blocks delivery for messages identified as spam or probable spam adding them to the quarantine directory • performs anti-virus scanning and disinfection of mail attachments •...
® Kaspersky Mail Gateway 5.5 error 5.5. Additional features of Kaspersky Mail Gateway In addition to its main functions, i.e. spam filtering and anti-virus protection of mail traffic, the application can perform the following tasks: • logging of received and sent email •...
Anti-virus protection and spam filtration 5.5.2. Protection from hacker attacks and spam To provide the highest level of security for your mail system, we recommend that you modify the Kaspersky Mail Gateway configuration file to extend the anti-virus functionality of the application. To protect your server from hacker attacks or, for example, to prevent spam being relayed through your server, configure the following options: ConnectRule in the [smtpgw.access] section.
® Kaspersky Mail Gateway 5.5 5.6. Managing license keys The right to use Kaspersky Mail Gateway is determined by the license key. The key is included in the product’s distribution kit and entitles you to use the application from the day you have purchased it and installed the key. Kaspersky Mail Gateway WILL NOT work without a license key! After the license expires, the functionality of the application will still be preserved except for the possibility to update the anti-virus and content filtration databases.
Page 61
Anti-virus protection and spam filtration All information about keys may be viewed either on the server’s console, or remotely from any networked computer that has access to the Webmin module. To view information about all installed license keys, enter the following in the command line: # licensemanager –s In the server console, you will see information similar to the following:...
® Kaspersky Mail Gateway 5.5 5.6.2. Renewing your license Renewal of the license to use Kaspersky Mail Gateway will give you the right to re-enable full product functionality. Besides, additional services listed in section 5.6 on p. 60 will be resumed. The license term depends on the product you bought and the type of the license you purchased.
Anti-virus protection and spam filtration 5.6.3. Removing a license key To remove the current license key and the backup key (if it is installed), enter the following in the command line: # licensemanager –da If the component removes the license key successfully, the following (or similar) information will be displayed on the server console: Kaspersky license manager.
CHAPTER 6. ADVANCED APPLICATION SETTINGS This chapter discusses in detail the advanced settings of Kaspersky Mail Gateway. In contrast to main settings that provide the application functionality, advanced settings can be configured optionally at the administrator’s discretion. Restart the application to apply its modified settings. 6.1.
Advanced application settings To have the application use the iChecker™ technology, set the UseIChecker parameter [smtpgw.ave] section of the configuration file to true. 6.1.2. Setting up application timeouts All timeout settings are located in the [smtpgw.timeouts] section of the application configuration file. By setting up various timeouts, the administrator can: Limit the maximum period after which the application will attempt to •...
® Kaspersky Mail Gateway 5.5 • Timeout for waiting for the response from the remote server to the MAIL FROM command (SendingMailTimeout option). • Timeout for defining the recipient (RCPT TO command) (SendingRcptTimeout option). • Timeout initiating data transfer (DATA command) (SendingDataInitiationTimeout option).
Advanced application settings Limit the maximum size for messages received by the server (Maximal- • IncomingMessageSize option) and the total number of messages received during one mail session (MaximalIncomingMessagesPer- Session option). Limit the number of recipients of a single message (MaximalIncoming- •...
® Kaspersky Mail Gateway 5.5 If a particular interface is to be used rather than all available interfaces or if it is necessary to use a port other than 25, additional settings configuration must be performed. To make the application wait for connection on port 1025 of interface 192.168.0.1: assign the following value to the ListenOn parameter in the [smtpgw.network] section:...
Advanced application settings If several routing rules must be specified, create several copies of the ForwardRoute parameter in the configuration file. For example, record created in section [smtpgw.forward]: ForwardRoute=*@domain1.com [localhost:1025] ForwardRoute=*@domain2.com [somehost.somedomain.com] ForwardRoute=*@domain3.com otherdomain.com will mean the following processing rules forward all email messages for domain domain1.com to port 1025 of the •...
® Kaspersky Mail Gateway 5.5 6.5. Syntax check in notification templates The application allows syntax checks of notification templates accomplished using the kltlv utility installed by default in the /opt/kav/5.5/scm-smtpgw/bin directory (in Linux distributions) or in /usr/local/share/kav/5.5/scm-smtpgw/bin (for FreeBSD distributions)). The kltlv utility can be started by a privileged user (root) only.
Page 71
Advanced application settings >./klmaila --show-all --archive- path=/var/db/kav/5.5/scm-smtpgw/arch_in Kaspersky Mail Archives Manager for Linux GLIBC 2.2 version 5.5.53/RELEASE, Copyright (C) Kaspersky Lab, 1997-2006 --QueueID--Status-Size-------ArrivalTime------- --------Sender.../Recipient... iCMnF8AX05033 RCV 6375 Tue, 28 Dec 2004 12:22:49 +0000 172.16.10.16 <test2@smtpgw.avp.ru> -> <test1@smtpgw.avp.ru> iCMmF84m00443 RCV 5050 Tue, 28 Dec 2004 12:22:48 +0000 172.16.10.16 <test2@smtpgw.avp.ru>...
Page 72
® Kaspersky Mail Gateway 5.5 av/error – message with the Error status assigned by the AV module. av/filtered – message with the Filtered status assigned by the AV module. SIZE – message size (may be specified in bytes, kilobytes, and megabytes as determined by the respective prefixes) DATE –...
Advanced application settings described in section A.17 on p. 134. 6.7. Management of application working queue While the application is running, it creates a working queue of messages for processing by the Spamtest filter and the AV module. The klmailq utility (installed by default in the /opt/kav/5.5/scm-smtpgw/bin directory (in Linux distributions) or in /usr/local/share/kav/5.5/scm-smtpgw/bin (for FreeBSD distributions)) allows management of messages in working queue.
Page 74
® Kaspersky Mail Gateway 5.5 <test2@scmsmtpgw1.test.ru> -> <test1@scmsmtpgw1.test.ru> Total: 3 queued messages, 3515 bytes. The application outputs information about messages in working queue in the following format: ID STATUS SIZE DATE IP <SENDER> -> <RECIPIENT> where: ID – identification number of a queued message STATUS –...
Advanced application settings Total: 12 queued messages have been removed. A message can be removed from queue if it has WFC, WFS or QUE status only. Send all or selected messages ahead of the general queue, e.g.: • > ./klmailq --send-id=jHrWPC7s86253 Kaspersky Mail Queue Manager for Linux GLIBC 2.2 version 5.1.53/RELEASE, Copyright (C) Kaspersky Lab, 1997-2006...
Page 76
® Kaspersky Mail Gateway 5.5 If you use FreeBSD distribution package, to run the management script, enter the following: # /usr/local/etc/rc.d/scm-smtpgw.sh <action> The /etc/init.d/scm-smtpgw link will not be created if you install the application from a tar.gz package. You will have to create manually the link pointing to the /opt/kav/5.5/scm-smtpgw/init.d/smtpgw management script.
Advanced application settings After the Receiver module is suspended, mail servers will be unable to establish connection with Kaspersky Mail Gateway to transfer messages to recipients within your mail system. Messages added to the work queue will be scanned for the presence of malicious objects and spam signs, processed in accordance with the existing rules and forwarded to the recipients (unless the rules block their delivery).
® Kaspersky Mail Gateway 5.5 The administrator can customize how the time and date are displayed in the [locale] section of the application configuration file. You can specify one of the following formats: %I:%M:%S %P – display time in 12-hour format (TimeFormat parameter). %y/%m/%d or %m/%d/%y –...
Page 79
Advanced application settings Letter symbol Level Level Meaning description component is running or inactive, the path to the configuration file, latest changes in scan area, database updates, license keys, statistics summary. Activity Messages on scanning of files according to the report detail level. Debug All debug messages.
® Kaspersky Mail Gateway 5.5 6.12. Additional informational header fields in messages Application allows addition of some supplementary information to mail messages. Let us examine closer two methods of adding new informational header fields to a message: Add extension header field to mail message. •...
CHAPTER 7. TESTING APPLICATION OPERABILITY After you install and configure Kaspersky Mail Gateway, it is recommended that you test its settings and operability by using the following three methods: Telnet program • Mail messages containing test phrases in the Subject header •...
Page 82
® Kaspersky Mail Gateway 5.5 250-smtpgw.company.com hello user [127.0.0.1] 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 10485760 250 DSN where: smtpgw.company.com is the name of the server being tested user is the client host name [127.0.0.1] is the client IP address. Enter in the command line: MAIL FROM: <sender_address>...
Testing application operability application statistics. One message will be added to the totals of scanned and sent messages. 7.2. Testing the Spamtest filter In order to test the Spamtest filter functionality, you have to create email messages containing specific phrases in the Subject header. Table 4 below contains a summary of test phrases and Spamtest responses thereto.
® Kaspersky Mail Gateway 5.5 7.3. Testing the application using EICAR This test "virus" has been developed by (The European Institute for Computer Anti-Virus Research) specifically for the purpose of verification of the anti-virus software operation. It IS NOT A VIRUS and contains no code that may harm your computer. However, most products of anti-virus vendors identify it as a virus (The European Institute for Computer Antivirus Research).
Page 85
Testing application operability Prefix Object type Suspicious (modified code of a known virus). WARN– Causes a scanning error identical to the detection of a ERRO– corrupted object. Infected. The object will be disinfected and the text in the CURE– infected file will be changed to CURE. Infected.
CHAPTER 8. UNINSTALLING THE APPLICATION To uninstall Kaspersky Mail Gateway from server, you must be a privileged (root) user. If you are currently logged under a user account with lesser privileges, log on as root. The uninstallation process will automatically stop the application! When you are uninstalling the product, the application will be stopped, and all files and directories created during installation will be deleted.
Page 87
Testing application operability If you installed the application from the pkg package, type the following in the command line to uninstall Kaspersky Mail Gateway: # pkg_delete <package_name> After the application has been successfully removed from your server, you will see a corresponding message on your screen.
CHAPTER 9. FREQUENTLY ASKED QUESTIONS This chapter contains a discussion of questions most frequently asked by our users regarding the installation, configuration and operation of the application. Question: Is it possible to use Kaspersky Mail Gateway with anti-virus products of other vendors? No.
Page 89
Frequently asked questions For maximum user protection, Kaspersky Mail Gateway recognizes more than 700 formats of archived and compressed files. This is essential for anti-virus security, because harmful executable code may be hidden inside files of any recognized format. However, despite the daily growth in the number of viruses detected by Kaspersky Mail Gateway (approximately 30 new viruses appear daily) as well as the ever increasing number of recognized file formats, each subsequent...
Page 90
® Kaspersky Mail Gateway 5.5 In the message header, specify your operating system, the name of Kaspersky Lab product you are experiencing problems with, and briefly describe problem. example: FreeBSD 5.3, Kaspersky Mail Gateway 5.5, updating of the anti-virus databases does not function. Compose your messages in plain text format.
Page 91
Frequently asked questions Spam is a serious problem for all network users being a direct and obvious threat to businesses. According to the latest data, the volume of spam in the Internet is about 75-80 percents of the total mail volume and new types of spam appear constantly.
Page 92
® Kaspersky Mail Gateway 5.5 unites computers protected by Kaspersky Lab products. Any computer on the LAN can be turned into an updates’ server that retrieves updates from the Internet and shares them with the other networked computers. Question: Can an intruder deliberately replace the anti-virus or content filtration databases? Every anti-virus and content filtration database has a unique signature verified by Kaspersky products while accessing the database.
Page 93
Frequently asked questions Question: What should I do to make man pages of the application available by the command man <name>? To make application man pages available for the man <name> command, do the following: • For Debian and SuSE Linux distributions, the following line should be added to the /etc/manpath.config file: MANDATORY_MANPATH /opt/kav/5.5/scm-smtpgw/man •...
Page 94
® Kaspersky Mail Gateway 5.5 Question: What should I do if the application does not start and the "Unable connect unix: /var/db/kav/5.5/scm-smtpgw/spamtest/control/spamtest.socket, sts_init() failed(err=Cannot connect to specified address)" error occurs? Such errors are caused by very strict limitations of default privileges for newly created files (the umask system parameter is assigned the 0222 value).
APPENDIX A. SUPPLEMENTARY INFORMATION ABOUT THE PRODUCT This annex describes the distribution of the application files after installation including a detailed description of the configuration file, command line keys for every component and their return codes, and generation of operational statistics. A.1.
Page 96
® Kaspersky Mail Gateway 5.5 /setup/ – directory containing scripts and executable files used during the installation, post-install setup and removal of the application. /init.d/ – directory containing scripts used to control the application. Link to controlling script is also added to the /etc/init.d/ directory. /man/ –...
Page 97
Appendix A disclaimer.tmpl – template used for generation of the disclaimer text appended to mail messages. /ichecker/ – directory for storing the working files of the iChecker database. /spamtest/ – directory containing the files required for operation of the Spamtest filter. /var/spool/kav/5.5/scm-smtpgw/ –...
Page 98
® Kaspersky Mail Gateway 5.5 /bases/ – directory containing the anti-virus databases and the updcfg.xml configuration file of the keepup2date component. /bases.backup/ – directory where the keepup2date component saves backup copies of the anti-virus and content filtration databases. /licenses/ – directory where the license key files are installed. /patches/ –...
Appendix A A.2. Kaspersky Mail Gateway configuration file The default installation package of Kaspersky Mail Gateway includes the smtpgw.conf file containing the application settings. This configuration file is divided into sections that describe parameters of all individual groups of application features. Each section is described in the following way: first line –...
Page 100
® Kaspersky Mail Gateway 5.5 ConnectRule – defines application behaviour during establishment of an SMTP session. Syntax: ConnectRule=allow|deny from in_dnsbl|out_dnsbl to <rcpt>|<rcpt_mask> ConnectRule=allow|deny from has_name|no_name to <rcpt>|<rcpt_mask> ConnectRule=allow|deny from any to <rcpt>|<rcpt_mask> where has_name|no_name corresponds to a situation, when the program can/cannot obtain host name at the specified address, in_dnsbl|out_dnsbl corresponds to the situation, when host address is included/not included into the black lists of DNS BL services specified...
Page 101
Appendix A If a rule has been applied, the establishment/termination of an email session will be determined by the specified allow|deny value. MailfromRule defines application behaviour at an attempt to send a message from a source (MAIL FROM) with a domain name, which does not match the actual IP address of the originating domain or MX host corresponding to that domain.
Page 102
® Kaspersky Mail Gateway 5.5 RelayRule=allow from 192.168.0.0/16 to * RelayRule=allow from any to *@mydomain.com RelayRule=allow from any to *@myotherdomain.com RelayRule=deny from any to * – the rule allows sending of messages for clients from network 192.168.х.х to any recipient addresses; it allows sending of messages from clients recipients...
Page 103
Appendix A The [smtpgw.antispam] section contains the settings of the Spamtest filter: ConnectTo – path to the socket used for Spamtest filter connection. The default value unix:/var/db/kav/5.5/scm- smtpgw/spamtest/control/spamtest.socket ConnectTimeout=60…3600 – timeout (seconds) for a connection to the Spamtest filter. The default value is: 0 (unlimited time). RWTimeout=60…3600 –...
Page 104
® Kaspersky Mail Gateway 5.5 MaximalIncomingRcptsPerMessage=1…1024 – maximum number of recipients of a single message. The default value is: 100. MaximalIncomingSessionSize=64…2048000 – maximum size (KB) of incoming messages transferred within a single mail session. The default value is: 102400. MaximalIncomingSessionsPerIP=1…1024 – maximum number of open connections for mail receipt from a single IP address.
Page 105
Appendix A StatFilename – full name (including the path) of the file that stores the application performance statistics. default value /var/db/kav/5.5/scm-smtpgw/smtpgw.stat. ICheckerDBFilename – full name (including the path) of the database file that stores the information about the messages scanned using the iChecker™...
Page 106
® Kaspersky Mail Gateway 5.5 ControlPath – path to the application control files. Required parameter. The [smtpgw.timeouts] section contains application timeout options: MaximalBackoffTime=60…64800 – maximum period of time (seconds) that must elapse before the application will try to send an undelivered message next time.
Page 107
Appendix A SendingRcptTimeout=1…1200 – timeout (seconds) for waiting for the response from a remote server to the RCPT TO command of the SMTP protocol. The default value is: 300. SendingDataInitiationTimeout=1…2400 – timeout (seconds) for waiting for the response from a remote server to the DATA command of the SMTP protocol.
Page 108
® Kaspersky Mail Gateway 5.5 value <"*"> that stands for any name. If several masks have to be specified for filtering, each record must have the following format: IncludeByName=*exe IncludeByName=*.bat values ExcludeByName, IncludeByMime ExcludeByMime options are specified in the same manner. ExcludeByName –...
Page 109
Appendix A ActionSuspicious=pass|remove|placeholder – action to be applied to objects that are suspected of being infected with an unknown virus. Required parameter. ActionProtected=pass|remove|placeholder – action to be applied to objects that the application has failed to scan because they are password-protected.
Page 110
® Kaspersky Mail Gateway 5.5 NotifyAdmin=disinfected|av/disinfected,infected|av/infected, suspicious|av/suspicious,protected|av/protected,error|av/error, filtered|av/filtered,av/all|all|none – list of statuses assigned to objects based on the anti-virus scan results. When these statuses are assigned, the application sends notifications to the administrator. Required parameter. NotifyRecipient=disinfected|av/disinfected,infected|av/infected, suspicious|av/suspicious,protected|av/protected,error|av/error, filtered|av/filtered,av/all|all|none – list of statuses assigned to objects based on the anti-virus scan results.
Page 111
Appendix A At least one of the Senders or Recipients parameters has to be specified. AdminNotifyAddress – email address to which the application will send notifications to the administrator regarding the scan results for messages included into this group. If this option is not defined, the value of a similar parameter from the [smtpgw.policy] section will be used.
Page 112
® Kaspersky Mail Gateway 5.5 ExcludeByMime – defines masks to exclude from filtering by MIME type. The application will filter the objects with MIME type not matching these masks and matching the masks used to define inclusions into scanning. NotifyAdminTemplate – path to the template file used to generate notifications sent to the administrator.
Page 113
Appendix A ActionError=pass|remove|placeholder – action to be applied to objects the application failed to scan because of a scan error. If this option is not defined, the value of a similar parameter from the [smtpgw.policy] section will be used. ActionFiltered=pass|remove|placeholder – action to be applied to objects filtered by name or MIME type.
Page 114
® Kaspersky Mail Gateway 5.5 value of a similar parameter from the [smtpgw.policy] section will be used. AddXHeader=true|false – an option to include an informational header to messages processed by the application. AddDisclaimer=true|false – an option to add disclaimer text generated according to the template specified by the administrator in the DisclaimerTemplate option.
Page 115
Appendix A UseUpdateServerUrlOnly=true|false – an option making the application use only the URL specified by UpdateServerUrl to update the database. If this option is set to false, then whenever updating from the UpdateServerUrl address fails, the application will use a different address from the list of update servers.
® Kaspersky Mail Gateway 5.5 ReportLevel=0|1|2|3|4|9 – the level of details in component performance report (0 – Fatal, 1 – Error, 2 – Warning, 3 – Info, 4 – Activity, 9 - Debug). The default value is: 4. Append=true|false – append a new component performance report to the end of the existing report file.
Appendix A Task: enable the use of parameters specified in an external file for client access control. Solution: in order to perform the task, you should do the following: Create my-recipients.list text file with the a list of addresses for users, who should receive the mail using the following format: localpart1@my.domain localpart2@my.domain...
® Kaspersky Mail Gateway 5.5 TERM Stop the application. QUIT Restarts the application and reloads the configuration file, allowing new settings to take effect. A.5. Control files In Linux/Unix you can manage an application by creating special control files. .c_stats Display application status statistics.
Page 119
Appendix A Parameter name Parameter value time_initialized Time of the server initialization. time_processing Server operation time (seconds). mta_received_messages Number of incoming messages successfully received by the server since its initialization. mta_received_bytes Number of bytes successfully received by the server since its initialization. mta_received_recipients Number of recipients of incoming messages successfully received by the server since its initialization.
Page 120
® Kaspersky Mail Gateway 5.5 Parameter name Parameter value mta_incoming_connection_errors Number of incoming connection errors since the server initialization. mta_incoming_connections_refused_total Total number of rejected incoming connections to the server since its initialization. mta_incoming_connections_refused_for_relaying Total number of incoming connections rejected by the server since the server initialization based on the relaying rules.
Page 121
Appendix A Parameter name Parameter value mta_receivings_refused_total Total number of incoming connections rejected by the server since its initialization. mta_receivings_refused_for_message_size_limit Total number of incoming connections rejected by the server because of the message size since server startup. mta_receivings_refused_for_session_size_limit Number of incoming messages rejected by the server since its initialization because of the session size limit.
Page 122
® Kaspersky Mail Gateway 5.5 Parameter name Parameter value antispam_checked_messages_spam Total number of messages identified as spam since the server initialization. antispam_checked_messages_probable_spam Total number of messages identified as probable spam since the server initialization. antispam_checked_messages_blocked Total number of messages blocked as a result of spam filtration since the server initialization.
Page 123
Appendix A Parameter name Parameter value antiviral_checked_objects_filtered Number of filtered objects since the server initialization. antiviral_checked_objects_error Number of object scanning errors that occurred since the server initialization. antiviral_checked_messages_total Total number of email messages checked for virus presence since the server initialization.
® Kaspersky Mail Gateway 5.5 A.7. Command line options for the smtpgw component The configuration file parameters can be redefined using command line options, when you are launching the application from the command line. Let us examine them closely. Help options Display on the console reference information about the command line options supported by the component and or --help...
Appendix A --no-watchdog -i <time> Timeout for the watchdog process to wait for successful application launch (seconds). --wd-init-timeout=<time> -b <time> Timeout for the watchdog process to wait for a signal about successful operation of application components (seconds). --wd–headrtbeat- timeout=<time> -y <time> Frequency of application messages sent to the watchdog process to inform about successful operation of application components (seconds).
® Kaspersky Mail Gateway 5.5 Error while initializing the anti-virus kernel. Error initializing the debug information display (trace) module. Error loading the anti-virus databases. The anti-virus database date stamp is not within the license key validity period. Error matching the network name with the socket (bind). License data is missing or no license key was found using the path specified in the configuration file.
Appendix A Licensemanager A.10. return codes The licensemanager component may return any of the following codes while running: The component has successfully completed its operation. Critical system error. Licensing error. Error reading the configuration file. Error in command line options. The component executable file is corrupted.
® Kaspersky Mail Gateway 5.5 Keepup2date A.11. command line options Help options Display on the console reference information about the command line options supported by the component and exit. Display the application version on the console and exit. Display a list of update servers with information about their respective regions.
Appendix A updates. Report generation options -l <path_to_file> Log work results in file <path_to_file>. Disable output of runtime messages produced by the utility. Display critical error messages only. Keepup2date A.12. return codes The keepup2date component may return any of the following codes while running: The anti-virus and content filtration databases do not need an update.
Page 130
® Kaspersky Mail Gateway 5.5 Cannot open file "filename" File filename cannot be opened. An error occurred while An unknown error occurred while parsing a template parsing template. Unexpected escape-char in The parser found an unsupported masked the declaration, line LN character in LN line during template examination.
Appendix A Iterator name too long, line During template examination parser determined in LN line that iterator name exceeds 64 characters. Iterator value too long, line During template examination parser determined in LN line that the iterator value exceeds 4096 characters. Variable name too long, line During template...
® Kaspersky Mail Gateway 5.5 A.15. Command line options of the klmailq utility Help options Output to console help information about the utility and exit. --help Output to console utility version and exit. --version Output to console information about all messages in the application working queue.
Appendix A A.16. Command line options for the klmaila utility Help options Output to console help information about the utility and exit. --help Output to console utility version and exit. --version Output to console information about all messages in storage. --show-all -i QueueID Output to console information about message with number...
® Kaspersky Mail Gateway 5.5 --send-id-without- Send QueueID message from storage to its original check=QueueID recipients without any anti-virus scanning or spam filtering operations with it. klmaila A.17. Return codes for the klmailq utilities The klmaila and klmailq utilities may return the following codes while running: The utility has finished its operation.
Page 135
Appendix A • Headers: <…> (e.g., Headers: Suspicious To) – message headers contain signs of spam; portion after the colon indicates the exact suspicious header (in this case, the To header). The following variants are possible, e.g.: Suspicious From – suspicious From header. Suspicious Reply-To –...
® Kaspersky Mail Gateway 5.5 A.19. Format of messages about anti-virus scanning and spam filtration The application provides for a possibility to view separately statistical data of the anti-virus component and the Spamtest filter. In order to create a file that will contain the statistical data of the AV module and the Spamtest filter, specify the value for option MessageStatistics=file name in the [smtpgw.options] section of the configuration file.
Appendix A IP-address of the host from which the message was received. Message-id Message identification number. GroupName Name group associated with the rules used process message. QueueID Identification number of a message in queue. All information in the statistics file is logged after the anti-virus scan and spam filtering of email message is performed.
Page 138
® Kaspersky Mail Gateway 5.5 • E – used ESMTP • D – client requested DSN-confirmations. As soon as message anti-virus processing completes, the following line is added to the log file: envelope-id: AV-SCANNED, group=<...>, nrcpt=..., srcid=..., status="...", names="..." where: envelope-id –...
Page 139
Appendix A notify – account where the notification will be delivered (possible values are admin, recipient, sender) nrcpt – the number of recipients of the email message size – message size srcid – original message ID. When a copy of an email message is created (for the delivery of that message to different groups of recipients) the following line will be added to the log file: envelope-id: SPLITTED, domain=<...>, nrcpt=..., srcid=...
APPENDIX B. KASPERSKY LAB Founded in 1997, Kaspersky Lab has become a recognized leader in information security technologies. It produces a wide range of data security software and delivers high-performance, comprehensive solutions to protect computers and networks against all types of malicious programs, unsolicited and unwanted e- mail messages, and hacker attacks.
Appendix B B.1. Other Kaspersky Lab Products ® Kaspersky Anti-Virus Personal ® Kaspersky Anti-Virus Personal has been designed to provide anti-virus protection to personal computers running Microsoft Windows 98/ME or Microsoft Windows 2000/NT/XP against all known viruses, including potentially dangerous software.
Page 142
® Kaspersky Mail Gateway 5.5 unique second-generation heuristic analyzer efficiently detects unknown viruses. A simple and convenient interface allows users to configure the program quickly making work with it easier than ever. ® Kaspersky Anti-Virus Personal Pro has the following features: •...
Page 143
Appendix B penetrating through any possible data sources and protects you from unauthorized attempts to access your computer’s data, as well as blocking spam. Kaspersky Personal Security Suite has the following features: • anti-virus protection of data saved on your computer •...
Page 144
® Kaspersky Mail Gateway 5.5 ® Kaspersky OnLine Scanner Pro The program is a subscription service offered to the visitors of Kaspersky Lab's corporate website. The service allows an efficient online anti-virus scan of your computer and disinfection of dangerous files. Kaspersky OnLine Scanner Pro ®...
Page 145
Appendix B ® Kaspersky Internet Security 6.0 ® Kaspersky Internet Security 6.0 is an integrated solution for protection of personal computers against the main information-related threats, i.e. viruses, hackers, spam and spyware. A common user interface allows configuration and management of all solution components. The anti-virus protection feature includes: •...
Page 146
® Kaspersky Mail Gateway 5.5 • Analysis of message text using a self-learning algorithm. • Recognition of spam sent in image files. ® Kaspersky Security for PDA ® Kaspersky Security for PDA provides reliable anti-virus protection for data saved on various types of hand-held computers and smartphones. The program includes an optimal set of anti-virus defense tools: •...
Page 147
Appendix B ® Kaspersky Corporate Suite This package provides corporate networks of any size and complexity with comprehensive, scalable anti-virus protection. The package components have been developed to protect every tier of a corporate network, even in mixed ® computer environments. Kaspersky Corporate Suite supports the majority of operating systems and applications installed across an enterprise.
® Kaspersky Mail Gateway 5.5 ® Kaspersky Anti-Spam’s high performance is ensured by daily updates to the content filtration database adding samples provided by the Company’s linguistic laboratory specialists. Databases are updated every 20 minutes. ® Kaspersky Security for Microsoft Exchange 2003 Kaspersky Security for Microsoft Exchange performs anti-virus processing of incoming and outgoing mail messages as well as messages stored at the server, including letters in public folders and filters out unsolicited correspondence using...
Page 149
APPENDIX C. LICENSE AGREEMENT End User License Agreement NOTICE TO ALL USERS: CAREFULLY READ THE FOLLOWING LEGAL AGREEMENT ("AGREEMENT") FOR THE LICENSE OF SPECIFIED SOFTWARE ("SOFTWARE") PRODUCED BY KASPERSKY LAB ("KASPERSKY LAB"). IF YOU HAVE PURCHASED THIS SOFTWARE VIA THE INTERNET BY CLICKING THE ACCEPT BUTTON, YOU (EITHER AN INDIVIDUAL OR A SINGLE LEGAL ENTITY) CONSENT TO BE BOUND BY AND BECOME PARTY TO THIS AGREEMENT.
® Kaspersky Mail Gateway 5.5 THE RIGHT TO RETURN AND REFUND EXTENDS ONLY TO THE ORIGINAL PURCHASER. All references to "Software" herein shall be deemed to include the software activation key ("Key Identification File") with which you will be provided by Kaspersky Lab as part of the Software.
Page 151
Appendix C 1.1.4 You shall not make error corrections to, or otherwise modify, adapt, or translate the Software, nor create derivative works of the Software, nor permit any third party to copy the Software (other than as expressly permitted herein). 1.1.5 You shall not rent, lease or lend the Software to any other person, nor transfer or sub-license your license rights to any other person.
Page 152
® Kaspersky Mail Gateway 5.5 may terminate this Agreement at any point by destroying all copies of the Software and the Documentation. 3. Support. (i) Kaspersky Lab will provide you with the support services ("Support Services") as defined below for a period of one year following: (a) Payment of its then current support charge, and: (b) Successful completion of the Support Services Subscription Form as provided to you with this Agreement or as available on the Kaspersky Lab...
Page 153
Appendix C 6. Limited Warranty. (i) Kaspersky Lab warrants that for six (6) months from first download or installation the Software purchased on a physical medium will perform substantially in accordance with the functionality described in the Documentation when operated properly and in the manner specified in the Documentation. (ii) You accept all responsibility for the selection of this Software to meet your requirements.
Page 154
® Kaspersky Mail Gateway 5.5 (d) Loss of anticipated savings; (e) Loss of business; (f) Loss of opportunity; (g) Loss of goodwill; (h) Loss of reputation; (i) Loss of, damage to or corruption of data, or: (j) Any indirect or consequential loss or damage howsoever caused (including, for the avoidance of doubt, where such loss or damage is of the type specified in paragraphs (ii), (a) to (ii), (i).
Need help?
Do you have a question about the MAIL GATEWAY 5.5 and is the answer not in the manual?
Questions and answers