134
FREE ANTISPAM FOR MAIL SERVERS Administrator's Guide

BitDefender para Administradores

  • Upload
    ejcore

  • View
    32

  • Download
    12

Embed Size (px)

DESCRIPTION

Guia practiva de bitdefender para administradores

Citation preview

  • FREE ANTISPAM FOR MAILSERVERS

    Administrator's Guide

  • BitDefender Free Antispam for Mail ServersAdministrator's Guide

    Publication date 2014.06.11

    Copyright 2014 BitDefender

    BitDefender Free Antispam for Mail Servers

  • She came to me one morning, one lonely Sunday morningHer long hair flowing in the mid-winter windI know not how she found me, for in darkness I was walkingAnd destruction lay around me, from a fight I could not win

    BitDefender Free Antispam for Mail Servers

  • Table of ContentsPreface ..................................................................... viii

    1. Conventions used in this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii1.1. Typographical conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii1.2. Admonitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

    2. Book structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x3. Request for Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi

    Description ....................................................... 11. Features and Benefits ................................................ 2

    1.1. Key Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2. Key Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2. BitDefender architecture ............................................. 42.1. The core modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.2. The integration agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.2.1. Sendmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2.2. qmail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2.3. Courier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2.4. CommuniGate Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.5. SMTP Proxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.2.6. Postfix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    Installation ...................................................... 103. Prerequisites ......................................................... 11

    3.1. System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.1. Hardware system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.2. Software system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113.1.3. Internet Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.1.4. Mail servers minimum required versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    3.2. Package naming convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123.2.1. Linux convention . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    4. Package installation ................................................ 144.1. Getting BitDefender Free Antispam for Mail Servers . . . . . . . . . . . . . . . . . . . . . . . . 144.2. Install the package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    4.2.1. Install the Linux packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.3. The installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    5. Uninstall .............................................................. 195.1. Uninstall the rpm package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.2. Uninstall the deb package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    iv

    BitDefender Free Antispam for Mail Servers

  • 5.3. Uninstall the ipk package . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.4. Manual uninstallation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

    Getting Started ................................................. 216. Start-up and Shut-down ............................................ 22

    6.1. Start-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.2. Shut-down . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236.3. Restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

    7. BitDefender Status Output ......................................... 257.1. Process Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257.2. Basic Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257.3. Statistical Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    8. MTA Integration ...................................................... 278.1. CommuniGate Pro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

    9. Basic Configuration ................................................. 299.1. View Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299.2. Edit Settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

    10. Product Registration .............................................. 36

    Advanced Usage ............................................... 3711. Configuration ....................................................... 38

    11.1. Antivirus settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3811.2. Antispam settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    11.2.1. X-Junk-Score Header for CommuniGate Pro Integration . . . . . . . . . . . . . . . 4411.3. Content Filtering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

    11.3.1. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4611.4. The BitDefender Logger Daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    11.4.1. The Logger Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5011.5. Quarantine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    12. Testing BitDefender ................................................ 57

    13. Updates ............................................................. 5813.1. Automatic Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

    13.1.1. Time Interval Modification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5813.1.2. BitDefender Live! Update Proxy Configuration . . . . . . . . . . . . . . . . . . . . . . . 59

    13.2. PushUpdate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6013.3. Patches and New Product Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

    Remote Management ......................................... 62

    v

    BitDefender Free Antispam for Mail Servers

  • 14. BitDefender Remote Admin ....................................... 6314.1. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6414.2. Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

    14.2.1. Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6514.2.2. License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6514.2.3. About . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67

    14.3. Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6814.3.1. Configuring Group Policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

    14.4. Quarantine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7414.4.1. Malware Quarantine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7414.4.2. Spam Quarantine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7614.4.3. Deferred Quarantine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    14.5. Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7914.5.1. Antispam . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8014.5.2. Spam Submissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8014.5.3. SMTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

    14.6. Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8214.6.1. BitDefender Live! Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8214.6.2. Patches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8314.6.3. Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8414.6.4. Global Proxy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

    14.7. Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8614.7.1. Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8614.7.2. Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

    14.8. Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8714.8.1. File Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8814.8.2. Mail Alerts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

    15. SNMP ................................................................ 9015.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9015.2. The SNMP Daemon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9015.3. The BitDefender Logger Plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

    15.3.1. Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9115.3.2. Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9215.3.3. Usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    15.4. Troubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95

    Getting Help .................................................... 9616. Support .............................................................. 97

    17. Contact Information ............................................... 9817.1. Web Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9817.2. Local Distributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9817.3. BitDefender Offices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

    vi

    BitDefender Free Antispam for Mail Servers

  • Appendices ................................................... 101A. Supported antivirus archives and packs ....................... 102

    B. Alert templates .................................................... 104B.1. Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104B.2. Sample results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    B.2.1. MailServer Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106B.2.2. Sender Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108B.2.3. Receiver Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110B.2.4. KeyWillExpire Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112B.2.5. KeyHasExpired Alert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

    C. Footer templates .................................................. 114C.1. Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114C.2. Sample results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115

    C.2.1. Clean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116C.2.2. Ignored . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116C.2.3. Disinfected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

    Glossary .................................................................. 118

    vii

    BitDefender Free Antispam for Mail Servers

  • PrefaceThis Administrator's Guide is intended for all System Administrators who have chosenBitDefender Free Antispam for Mail Servers as security solution for their Email Servers.The information presented in this book is suitable not only for computer literates, it isaccessible to everyone who is able to do administrative tasks on a Linux or UNIX box.

    This book will describe for you BitDefender Free Antispam for Mail Servers, theCompany and the team who built it, it will guide you through the installation process,teach you how to configure it to the very detail. You will find out how to use BitDefenderFree Antispam for Mail Servers, how to update, interrogate, test and customize it. Youwill learn how to integrate it with various software and how to get the best fromBitDefender.

    We wish you a pleasant and useful reading.

    1. Conventions used in this book1.1. Typographical conventions

    Several text styles are used in the book for an improved readability. Their aspect andmeaning are presented in the table below.

    DescriptionAppearanceVariables and some numerical data are printedwith monospaced characters.

    variable

    The URL links point to some external location,on http or ftp servers.

    http://www.bitdefender.com

    Emails are inserted in the text for contactinformation.

    [email protected]

    This is an internal link, towards some locationinside the document.

    Chapter 4 Package installation (p.14)

    File and directories are printed usingmonospaced font.

    filename

    Environment variables are MONOSPACEDCAPITALS.

    ENV_VAR

    Preface viii

    BitDefender Free Antispam for Mail Servers

  • DescriptionAppearanceEmphasized text specially marked to call yourattention.

    emphasized

    Provided as reference.quoted text

    Inline commands are printed using strongcharacters.

    command

    Command examples are printed in strongmonospaced characters in a specially marked# command -parameter

    environment. The prompt can be one of thefollowing.

    #The root prompt. You should be root in orderto run this command.

    $The normal user prompt. You do not needspecial privileges to run the command.

    Screen output and code listings are printed inmonospaced characters in a specially markedenvironment.

    screen output

    It refers to a man page.bdlogd(8)

    1.2. AdmonitionsAdmonitions are in-text notes, graphically marked, offering additional informationrelated to the current paragraph.

    NoteThe note is just a short observation. Although you can omit them, notes can providevaluable information, such as a specific feature or a link to some related topic.

    ImportantThis requires your attention and it is not recommended to skip it. Usually, it providesnon-critical but significant information.

    Preface ix

    BitDefender Free Antispam for Mail Servers

  • WarningThis is critical information you should treat with increased caution. Nothing bad willhappen if you follow the indications. You should read and understand it, because itdescribes something extremely risky.

    2. Book structureThe book consists of four parts, containing the following major topics: Description andfeatures, Installation, Usage and Getting help. Moreover, a glossary and UNIX manualpages are provided to clarify different aspects of BitDefender, which could causetechnical problems.

    Description. A short introduction to BitDefender. It explains who is BitDefender, andthe Data Security Division. You are presented BitDefender Free Antispam for MailServers, its features, the product components and the basics of the integration andthe scanning mechanism.

    Installation. Step by step instructions for installing BitDefender on a system. Startingwith the prerequisites for a successful installation, you are guided through the wholeinstallation process. Finally, the uninstall procedure is described in case you need touninstall BitDefender.

    Getting Started. Description of basic administration and maintenance of BitDefender.

    Advanced Usage. You are presented the BitDefender configuration tools, how toget run-time information, how to test antivirus efficiency, how to perform updates andhow to register the product.

    Remote Management. You will learn how to make the best of BitDefender remotely,by using several remote administration tools.

    Getting Help. Where to look and where to ask for help if something goes wrong. Youare presented the Knowledge Base and offered the BitDefender and BitDefenderpartners contact information to call, if needed.

    Appendices. The Appendices present exhaustive information about configuration,email templates and in-depth discussions over tricky parts.

    Glossary. The Glossary tries to explain some technical and uncommon terms youwill find in the pages of this book.

    Preface x

    BitDefender Free Antispam for Mail Servers

  • 3. Request for CommentsWe invite you to help us improve the book. We have tested and verified all of theinformation to the best of our ability, but you may find that features have changed (oreven that we have made mistakes). Please write to tell us about any flaws you find inthis book or how you think it could be improved, to help us provide you the bestdocumentation possible.

    Let us know by sending an email to [email protected].

    Preface xi

    BitDefender Free Antispam for Mail Servers

  • Description

    1

    BitDefender Free Antispam for Mail Servers

  • 1. Features and BenefitsFree antispam protection for UNIX-basedMail Servers. Designed for UNIX-basedmail servers, BitDefender Free Antispam for Mail Servers brings together proactiveantispam, antiphishing and content filtering technologies to secure the mail traffic ofcompanies and Service Providers.

    1.1. Key Features Fast and easy deployment Easy integration with your current mail services Compatible with most major email platforms Multiple layers of antispam filtering Content and attachment filtering Intuitive program interface Available in both 32-bit and 64-bit versions

    1.2. Key Benefits Compatibility Includes dedicated agents for automatic integration with several of the mostpopular mail transfer agents such as Sendmail (milter), Postfix, Courier, qmailand CommuniGate Pro.

    Fully complies with FHS (Filesystem Hierarchy Standard), operating in acompletely non-intrusive manner.

    Ensures compatibility with all major Unix-based platforms due to its rpm, deb andgeneric .ipk.run packages.

    Increased Business Productivity Reduces mail traffic and saves network resources due to its extensive antispamprotection capabilities.

    Improves the IT manager's productivity and prevents the loss of confidentialinformation by filtering all mail passing through the mail server based on: Content (subject line, body, sender, recipient) and attachment

    Provides a highly efficient multi-layered antispam protection system which: Reduces mail traffic by accurately classifying messages as spam, phishing orlegitimate.

    Blocks unsolicited mail based on several filters, among which:

    Features and Benefits 2

    BitDefender Free Antispam for Mail Servers

  • The Bayesian Filter, which you can train to learn the specifics of spam emailreceived by your server.

    The Real-time Blackhole List (RBL) filter, which identifies spam based onmail servers' reputation as spam senders.

    Allows configuring antispam filter sensitivity by setting very demanding orrelaxed thresholds.

    Offers anti-phishing protection by detecting forged messages intended to tricktheir recipient into disclosing confidential data.

    Provides WBL (White List/ Blacklist) support, allowing you to set a list of trustedand untrusted addresses based on which to respectively "always accept" or"always reject" mail.

    Increased Usability Generates detailed statistics and reports related to the solution's activity. Sends customizable email notifications about its activity. Allows you to remotely configure mail protection through its management tools. A dedicated command line interface allows performing post-install configurationand administration tasks.

    Can isolate dangerous or restricted mail in a quarantine zone to be dealt withlater.

    The quarantine area is searchable based upon regular expressions, sender,recipient, date and cause.

    Allows performingmanagement actions via SNMP bymeans of its SNMPDaemonPlugin.

    Can send administration alerts to three different hosts, through the SNMP Loggerplugin.

    Can send detection and other product messages to the system logger, throughthe SYSLOG logger plugin.

    Features and Benefits 3

    BitDefender Free Antispam for Mail Servers

  • 2. BitDefender architectureBitDefender is a highly complex modular structure. It is made up of several centralcomponents and additional modules, each of them having assigned a specific task.The modules are loaded during BitDefender startup and enabled or not, according tothe user's preferences. On a UNIX-like system, these components run as daemons,on one or multiple threads, and communicate with the others.

    2.1. The core modulesListed by their file names, the core modules are represented in the following table.

    DescriptionModuleThe BitDefender Core Monitor is the supervisor of several BitDefendermodules. When one of them crashes, the Core Monitor isolates the object

    bdmond

    causing the crash in a special quarantine directory, notifies theadministrator and restarts the involved module. Thus, even if one processdies, the whole filtering activity is not disturbed, ensuring continuous serverprotection.

    This is the BitDefender Scan Daemon. Its purpose is to integrate thescanning engines, receive scanning requests from several daemons, such

    bdscand

    as the mail daemon or the file daemon. It scans the objects, takes thenecessary actions and sends back the object and the scanning results.

    The BitDefender Mail Daemon has the role of receiving scanning requestsfrom the MTA integration agents. It calls the Scan Daemon to perform the

    bdmaild

    scan, expecting the scanning results from it. Then it applies its actionsand sends back the results to the MTA integration agent.

    The BitDefender Registry is made up of the bdregd program and a set ofXML files, where it stores the BitDefender configuration. The daemon

    bdregd

    receives requests to read from and to write to the settings file, requestsinitiated by the other processes.

    Manually editing the RegistryEven if the XML files are human-readable (and writable, too), you shouldnever try to edit them manually. Due to their high complexity, the XML filesshould only be modified by means of the provided configuration tools, suchas the bdsafe command or the Remote Administration Console.

    BitDefender architecture 4

    BitDefender Free Antispam for Mail Servers

  • DescriptionModuleThe BitDefender Logger is a complex component, handling all logging andnotification actions of BitDefender. There are several types of logging, allof them realized by plugins.

    bdlogd

    file logging: the data is sent to a normal log file, respecting a typicalformat.

    mail notification: alerts are sent by email to the server administrator orto the sender and the recipients of an email, on special events (such asinfected email found).

    SNMP: notifications can be sent through the SNMP protocol todesignated hosts.

    SYSLOG: sends product messages to the system logger.

    The BitDefender BitDefender Live! Update is the module responsible withupdating the scanning engines and some other BitDefender components.

    bdlived

    The module runs continuously and periodically checks the update server.It can also be triggered manually or by the Update Pushing mechanism.

    More about BitDefender Live! UpdateBitDefender BitDefender Live! Update and the update process aredescribed in Chapter 13 Updates (p. 58).

    bdsnmpd accepts SNMPGET and SETmessages related to BitDefenderregistry keys. Thus, an authorized user is able to read and modify someof the BitDefender configuration settings remotely.

    bdsnmpd

    2.2. The integration agentsBitDefender Free Antispam for Mail Servers includes dedicated agents for automaticintegration with several of the most popular mail transfer agents, such as Sendmail(milter), Postfix (generic or milter), Courier, qmail and CommuniGate Pro. Additionally,a generic SMTP Proxy agent is available for integration with virtually any mail transferagent.

    BitDefender architecture 5

    BitDefender Free Antispam for Mail Servers

  • 2.2.1. Sendmail

    Sendmail integration

    The Sendmail agent is the filtering solution for theSendmail MTA using the Milter interface. Milter allowsthird-party programs to access email messages throughseveral call-backs.

    The incoming email usually arrives to Sendmail from alocal or remote server. The agent calls the BitDefendercore to scan the email. After scanning, the results arepassed through the same Milter interface back toSendmail, which will deliver the message as usual, ifthere is something to deliver.

    2.2.2. qmailInside the qmail MTA, qmail-queue is the central component. All the emails comingfrom local or remote senders pass through this component. Therefore email trafficcan be captured by capturing the traffic of qmail-queue.

    qmail integration

    Remote or local incoming emails arefirst passed to the BitDefender qmailintegration agent. This will sendthem to the BitDefender core forscanning and then to the originalqmail-queue, which will deliver themas usual. From the qmailpoint-of-view, the filtering process istransparent.

    2.2.3. CourierThe central module of the Courier system is submit, an uniform mechanism whichadds messages to the mail queue. Capturing its traffic is capturing the server's traffic.

    BitDefender architecture 6

    BitDefender Free Antispam for Mail Servers

  • Courier integration

    Remote or local incoming emails arefirst passed to the BitDefenderCourier integration agent, namedbdcourier. This will pass them on tothe BitDefender core for scanningand then to the original submit,which will enqueue them as usual.From the Courier point-of-view, thefiltering process is transparent.

    2.2.4. CommuniGate ProThe BitDefender integration agent should be incorporated by the CommuniGate Pro,using its own filtering mechanism, in order to receive the email traffic.

    CommuniGate Pro integration

    Remote or local incoming emails are passed to theBitDefender CommuniGate Pro agent, registered asintrinsic filter. This will call the BitDefender core toscan the emails and then pass them back to the MTA,which will process them as usual.

    2.2.5. SMTP ProxyThe SMTP integration varies with each other MTA.Since we can not cover all possible variants, we canoffer a short description of the integration and let you figure out how to apply it to yourSMTP server.

    SMTP Proxy integration

    The incoming email will arrive on port25 of the server. On this port it is notthe original Mail Transport Agent thatis listening, but a special BitDefendercomponent, the SMTP Proxy module.On receiving the message, theBitDefender Agent will pass it to theBitDefender core for scanning. The coredoes the usual scanning and passesthe results back to the agent. If found clean or if there is something to pass to theMTA, BitDefender SMTP Proxy agent contacts the MTA on the new port this isconfigured to listen on, by default 10025, and sends the email, as if coming from theoriginal source. The whole filtering process is transparent to the Mail Transport Agent.

    BitDefender architecture 7

    BitDefender Free Antispam for Mail Servers

  • BitDefender and MTA on different serversBitDefender SMTP Proxy can be installed on one server passing the scanned emailsto the MTA, running on another server. In this case, the MTA can listen on the defaultSMTP port, 25, as usual.

    2.2.6. PostfixFor Postfix, two integration options are available: the generic SMTP proxy or the milteragent.

    The generic SMTP proxy integrationThe SMTP proxy integration uses external, medium-weight, real-time ContentInspection method, as described in the original Postfix documentation.

    Postfix-SMTP Proxy integration

    There are two Postfixprocesses running.The first one, listeningon the standard SMTPport, receives all theincoming traffic anddoes the usual emailfiltering. The secondone, listening on ahigher port, by default 10026, receives the email from the filter and sends it to thestandard processing. In themiddle, there is the BitDefender SMTP proxy agent listeningon another higher port, 10025 by default. It receives all the traffic passed from thefirst process, passes it to the BitDefender core for scanning and finally sends the trafficto the second Postfix process.

    The milter agent integration

    Postfix-milter integration

    The Milter agent can also be used as a filtering solutionfor the Postfix MTA using the interface with the samename. Milter allows third-party programs to access emailmessages through several call-backs.

    The incoming email usually arrives to Postfix from alocal or remote server. The agent calls the core to scanthe email. After scanning, the results are passed through

    BitDefender architecture 8

    BitDefender Free Antispam for Mail Servers

  • the same Milter interface back to Postfix, which will deliver the message as usual, ifthere is something to deliver.

    NoteFor the Milter integration, Postfix 2.4.5 or later is required.

    BitDefender architecture 9

    BitDefender Free Antispam for Mail Servers

  • Installation

    10

    BitDefender Free Antispam for Mail Servers

  • 3. PrerequisitesBitDefender Free Antispam for Mail Servers can be installed on various package-basedLinux distributions (rpm or deb). Other Linux distributions are supported by using theipkg package system, with the same functionality. The packages include all thenecessary pre-install, post-install, pre-remove and post-remove scripts. The adequatepackage type should be installed according to the target operating system.

    3.1. System RequirementsBefore installing BitDefender Free Antispam for Mail Servers, you must verify thatyour system meets the following system requirements:

    3.1.1. Hardware system requirementsProcessor type

    x86 compatible, minimum 800MHz, but do not expect great performance in thiscase. An i686 generation processor, running at 1.4Ghz, would make a betterchoice. AMD64 compatible processors are also supported.

    MemoryThe minimum accepted value is 512MB (recommended is at least 1GB, for abetter performance).

    Free disk spaceThe minimum free disk space to install and run BitDefender Free Antispam forMail Servers is 500MB. But the log and the quarantine directories will requiremore space - 1GB of free space would be welcomed.

    3.1.2. Software system requirementsLinux requirements

    The Linux kernel should be at least 2.6.18.

    BitDefender requires glibc version 2.3.1, or newer.

    The supported Linux distributions are the following: RedHat enterprise Linux 3 or newer SuSE Linux Enterprise Server 9 or newer Suse Linux 8.2 or newer

    Prerequisites 11

    BitDefender Free Antispam for Mail Servers

  • RedHat Linux 9 Fedora Core 1 or newer Debian GNU/Linux 3.1 or newer Slackware 9.x or newer Mandrake/Mandriva 9.1 or newer Gentoo 1.4 or newer

    3.1.3. Internet ConnectionBitDefender Free Antispam for Mail Servers requires Internet access, either directlyor through an HTTP proxy.

    3.1.4. Mail servers minimum required versionsSendmail

    version 8.12.1, with Milter interface

    Postfixany 2.x version

    NoteFor the Milter integration, Postfix 2.4.5 or later is required.

    qmail1.03 version at least

    Courier0.42.x versions at least

    CommuniGate Pro4.1.1 version at least

    SMTPany SMTP server able to listen on another port than 25

    3.2. Package naming conventionThe BitDefender Free Antispam for Mail Servers package is named considering thefollowing scheme:

    Prerequisites 12

    BitDefender Free Antispam for Mail Servers

  • 3.2.1. Linux conventionThe Linux installation kit is named according to the following rule:

    BitDefender-Antispam-Mail-{os}-{arch}.{pkg}.run

    DescriptionVariableThe operating system is Linux.{os}

    The architecture contains the processor class. i586 and amd64 are currentlysupported.

    {arch}

    This stands for the package management tool name. Therefore, it is rpmfor Red Hat Manager, deb for Debian and ipk for IPKG.

    {pkg}

    Prerequisites 13

    BitDefender Free Antispam for Mail Servers

  • 4. Package installationThis chapter explains how to install BitDefender Free Antispam for Mail Servers onyour system. This is pretty straightforward: get the desired package, test it for integrity,then install it.

    4.1. Getting BitDefender Free Antispam for MailServers

    The package can be downloaded from the BitDefender servers or it can be found ondifferent distributionmedia, such as CD-ROM.When downloading from the BitDefenderservers, you will be asked to fill in a form and you will receive an email on the addressyou have provided in this form. The email contains the download location.

    The Linux packages come in three flavours:

    rpm for distributions using the RedHat Linux package management deb for distributions using Debian Linux packaging system ipk for any other distribution using IPKG, the Itsy Package Management System

    4.2. Install the packageThere is a common installation method for rpm, deb and ipk.

    4.2.1. Install the Linux packagesThe packages should be installed using the following command:

    # sh BitDefender-Antispam-Mail-{os}-{arch}.{pkg}.run

    This will unpack the BitDefender packages, according to the package type, and installthem using the packagemanager. The packages contain the BitDefender files (engines,core, etc.), the install and uninstall scripts.

    Let's take some examples.

    To install BitDefender Free Antispam for Mail Servers on a RedHat based distributionyou have to run the following command:

    Package installation 14

    BitDefender Free Antispam for Mail Servers

  • # sh BitDefender-Antispam-Mail-{os}-{arch}.rpm.run

    To install BitDefender Free Antispam for Mail Servers on a Debian based distributionyou have to run the following command:

    # sh BitDefender-Antispam-Mail-{os}-{arch}.deb.run

    The ipk version of the archive will install the ipkg tools on the system and will usethem to install the .ipk packages.

    To install BitDefender Free Antispam for Mail Servers on any Linux distribution, usingipkg, you have to run the following command:

    # sh BitDefender-Antispam-Mail-{os}-{arch}.ipk.run

    Additional parametersFor the not-so-impatient user, the self-extractable archive provides some commandline parameters, described in the following table:

    DescriptionParameterPrints the short help messages.--help

    This will print the archive information, such as the title, the defaulttarget directory, the embedded script to be run after unpacking, the

    --info

    compression method used, the uncompressed size, the packagingdate.

    This option will print the content of the embedded archive. The listedfiles are the engines, the program binaries, the embedded

    --list

    documentation, the install and uninstall script along with their sizeand permissions.

    This is one of the most useful options, because it enables the userto verify package integrity, as stated above. The integrity is checked

    --check

    comparing the embedded md5 checksum (generated duringpackaging) with the one computed at the time of the check. If theymatch, the output will be the following:

    Package installation 15

    BitDefender Free Antispam for Mail Servers

  • DescriptionParameter

    MD5 checksums are OK. All good.

    If not, an error message will be shown, displaying the non-matchingstored and computed checksums, as follows:

    Error in MD5 checksums: X is different from Y

    The user will be asked to confirm every step of the install process.--confirm

    By default, the archive content is extracted to a temporary directory,which will be removed after the embedded installer exits. Addingthis parameter to the script will not remove the directory.

    --keep

    You can specify another directory to extract the archive to, if youdon't want to use the default name. Note that this target directorywill not be removed.

    --target

    directory

    Run the embedded uninstaller script instead of the normal installer.--uninstall

    4.3. The installerAfter unpacking the archive, the installer is launched. This is a text based installer,created to run on very different configurations.

    Follow the installer prompts to complete installation and initial setup. To accept thedefault configuration the installer offers (which is recommended), just press the ENTERkey when prompted.

    1. License Agreement

    The License Agreement is displayed. You are invited to read the full content bypressing the SPACE bar to go to the next page or ENTER for one line a time. In orderto continue the installation process, you must read and agree to this LicenseAgreement, by literally typing the word accept when prompted. Note that typinganything else or nothing at all means you do not agree to the License Agreementand the installation process will stop.

    2. Configuring Update Notifications

    Package installation 16

    BitDefender Free Antispam for Mail Servers

  • You can set Bitdefender Security for Mail Servers to inform you about updates andpatches. To enable this feature, type y, then provide the address and port of yourSMTP server and the email address to send notifications to.

    3. Integrating BitDefender with the Mail Transfer Agents (MTAs)

    Select the appropriate integration option.

    1. CommuniGate Pro2. Courier3. Postfix-SMTP Proxy4. Postfix-milter5. qmail6. Sendmail-milter7. SMTP Proxy - works with any Mail Transfer Agent

    For example, to install the integration agent for Sendmail enter 6.

    NotePostfix-milter works only with Postfix mail server version 2.4.5 or newer. For olderversions of Postfix, select Postfix-SMTP Proxy.

    4. Configuring RBL Servers

    You can specify a number of RBL servers in order to filter spam based on mailserver's reputation as spam sender.

    5. Entering Your Registration Key

    Enter a registration key or press ENTER to continue with a 30 days trial.

    6. Configuring Remote Administration

    The remote administration is performed through a web based console. To installthe console you need to provide the local IP address of the machine whereBitDefender Free Antispam for Mail Servers is installed, using the syntax IP:port(the default setting is 127.0.0.1:8139). Use the generated SSL certificate tosecure browser connection when accessing the console. You also need to specifythe password for console authentication.

    At this point, the installer has acquired all the necessary information and it will beginthe install process. Basically, it will install the engines, the binaries and thedocumentation and it will make the post-install configuration. This is a short list of itsactions on your system:

    Package installation 17

    BitDefender Free Antispam for Mail Servers

  • Creates the bitdefender user and group and assigns the installation directory toit.

    Installs the manpages. Appends to the dynamic library loader configuration file the path to the BitDefenderlibraries.

    Creates a symbolic link to the configuration directory in /etc. Integrates BitDefender in the system init scripts. Finally, BitDefender Free Antispam for Mail Servers is started-up.

    Package installation 18

    BitDefender Free Antispam for Mail Servers

  • 5. UninstallIf you ever need to remove BitDefender Free Antispam for Mail Servers, there areseveral methods to do it, depending on the package type.

    NoteThe uninstaller keeps the /opt/BitDefender/ folder with product configurationfor reinstallation purpose.When reinstalling , it is recommended to use the same packageas before and then perform an upgrade, otherwise you receive a warning. Nevertheless,the product's functionality is not affected.For a complete uninstallation of BitDefender Free Antispam for Mail Servers, you needto manually delete the /opt/BitDefender/ folder.

    5.1. Uninstall the rpm packageTo uninstall BitDefender Free Antispam for Mail Servers on an rpm package managerbased distribution, you have to run the following commands:

    # rpm -e BitDefender-radmin# rpm -e BitDefender-antispam# rpm -e BitDefender-mail# rpm -e BitDefender-common

    5.2. Uninstall the deb packageTo uninstall BitDefender Free Antispam for Mail Servers using dpkg, on a deb packagemanager based distribution, you have to run the following commands:

    # dpkg -r BitDefender-radmin# dpkg -r BitDefender-antispam# dpkg -r BitDefender-mail# dpkg -r BitDefender-common

    5.3. Uninstall the ipk packageTo uninstall BitDefender Free Antispam for Mail Servers using ipkg, you have to runthe following commands:

    Uninstall 19

    BitDefender Free Antispam for Mail Servers

  • # ipkg-cl remove BitDefender-radmin# ipkg-cl remove BitDefender-antispam# ipkg-cl remove BitDefender-mail# ipkg-cl remove BitDefender-common

    NoteThe ipkg command must be run from the following location: /opt/ipkg/bin/

    5.4. Manual uninstallationYou can also uninstall the product this way:

    # BitDefender-Antispam-Mail-{os}-{arch}.{pkg}\.run --uninstall

    Uninstall 20

    BitDefender Free Antispam for Mail Servers

  • Getting Started

    21

    BitDefender Free Antispam for Mail Servers

  • 6. Start-up and Shut-downBitDefender Free Antispam for Mail Servers should be integrated into the system initscripts, in order to start at system initialization and stop at system shut down. Onceintegrated, the server will be protected all the time, since all BitDefender services willbe up and running. Normally, there is no need for the user to manually start or stopBitDefender, but there are administrative tasks when such actions might be necessary.In this chapter you will find how you can safely start and stop the BitDefender services.

    The bd((8)) commandThe program bd((8)), included in BitDefender programs, plays the role of init script.Among the many parameters it supports, there are the standard start, stop,restart, with obvious actions. The standard location of the program is/opt/BitDefender/bin/bd, in case of a standard straight-forward installation.If you have chosen a different installation directory, please use the correct path whencalling this program.As init script, bd((8)) is symbolically linked, by the install program, to the system specificinit directory, such as /etc/init.d/bd (for System V type initscripts) or/etc/rc.d/rc.bd (for BSD type initscripts). Therefore, according to your distribution,the following commands are identical, doing the same thing in the same way. Forexample, they will start BitDefender.

    # /opt/BitDefender/bin/bd start- or -

    # /etc/init.d/bd start- or -

    # /etc/rc.d/rc.bd start- or -

    # service bd start

    For convenience, the program is always referred to in this document using the first form,but remember you can use all the forms presented above. Use the one that fits youbest.For easier use of the BitDefender related commands, you may also add/opt/BitDefender/bin directory to the PATH environment variable.

    Start-up and Shut-down 22

    BitDefender Free Antispam for Mail Servers

  • 6.1. Start-upTo start BitDefender Free Antispam for Mail Servers, you have to run the followingcommand (for alternate forms, please see the note above).

    # /opt/BitDefender/bin/bd start

    The result will be similar to the screen provided as an example below. Note that if youhave more components installed, there will be more corresponding output lines.

    * Starting bdregd ... [ ok ]* Starting bdlogd ... [ ok ]* Starting bdscand ... [ ok ]* Starting bdmaild ... [ ok ]* Starting bdlived ... [ ok ]* Starting bdmond ... [ ok ]* Starting bdsmtpd ... [ ok ]

    Please wait for all the services to be started up. The script will return to the shell whenall processes have been initialized. If there are any errors while initializing, they willbe reported.

    6.2. Shut-downTo shut down BitDefender Free Antispam for Mail Servers, you have to run the followingcommand (for alternate forms, please see the note above).

    # /opt/BitDefender/bin/bd stop

    The output will be similar to the following screen, provided as an example. Note thatif you have more components installed and running, there will be more correspondingoutput lines.

    * Stopping bdsmtpd ... [ ok ]* Stopping bdmond ... [ ok ]* Stopping bdlived ... [ ok ]* Stopping bdscand ... [ ok ]* Stopping bdmaild ... [ ok ]

    Start-up and Shut-down 23

    BitDefender Free Antispam for Mail Servers

  • * Stopping bdlogd ... [ ok ]* Stopping bdregd ... [ ok ]

    The processes will be shut down in the reverse order of the start up. Please wait forall the services to be stopped. The script will return to the shell when there are nomore running processes. If there are any errors while shutting down, they will bereported.

    6.3. RestartA simple restart of all the BitDefender services can be done by running the followingcommand (for alternate forms, please see the note above).

    # /opt/BitDefender/bin/bd restart

    The output is similar to those described above.

    * Stopping bdsmtpd ... [ ok ]* Stopping bdmond ... [ ok ]* Stopping bdlived ... [ ok ]* Stopping bdscand ... [ ok ]* Stopping bdmaild ... [ ok ]* Stopping bdlogd ... [ ok ]* Stopping bdregd ... [ ok ]* Starting bdregd ... [ ok ]* Starting bdlogd ... [ ok ]* Starting bdscand ... [ ok ]* Starting bdmaild ... [ ok ]* Starting bdlived ... [ ok ]* Starting bdmond ... [ ok ]* Starting bdsmtpd ... [ ok ]

    The processes will be shut down in reverse order, then started up. Please wait for allthe services to be stopped, then started. The script will return to the shell when theaction is complete. If there are any errors while shutting down or starting up, they willbe reported.

    Start-up and Shut-down 24

    BitDefender Free Antispam for Mail Servers

  • 7. BitDefender Status OutputSince all of its components are daemons, BitDefender works in the background, withlittle or even no output at all. One source of information about the actions of BitDefenderare the logs, if enabled. Instant real-time reports can be obtained by using the built-infacilities of status and statistical reporting.

    7.1. Process StatusA short description of all running processes and their process-id (PID) is available onrunning the following command.

    # /opt/BitDefender/bin/bd status

    Invocation of bd((8)) commandA short discussion about different forms of invoking command bd((8)) can be found inChapter 6 Start-up and Shut-down (p. 22).

    Output on non-NPTL systemsOn non-NPTL systems, the output is slightly different. Instead on displaying only onethread, all the PIDs of all threads are shown. You should see the multiple process IDsfor child threads.

    7.2. Basic InformationUsing the text console, more information about the current status of BitDefender isavailable when issuing the following command:

    # /opt/BitDefender/bin/bd info

    Invocation of bd((8)) commandA short discussion about different forms of invoking command bd((8)) can be found inChapter 6 Start-up and Shut-down (p. 22).

    BitDefender RegistrySince this information is stored inside the BitDefender Registry, the bdregd daemonshould be running in order to see all of it. If not, only a small part will be shown.

    BitDefender Status Output 25

    BitDefender Free Antispam for Mail Servers

  • The following information is displayed:

    The current version of BitDefender Free Antispam for Mail Servers along with somesystem information.

    The quarantine status. The version of installed BitDefender Core Components and Integration Agents. The number of signatures, the time when BitDefender last checked for virussignatures updates and the time when it actually updated its signatures.

    7.3. Statistical ReportStatistical reports about BitDefender activity can be obtained when running the followingcommand:

    # /opt/BitDefender/bin/bd stats

    Invocation of bd((8)) commandA short discussion about different forms of invoking command bd((8)) can be found inChapter 6 Start-up and Shut-down (p. 22).

    BitDefender Status Output 26

    BitDefender Free Antispam for Mail Servers

  • 8. MTA IntegrationAfter BitDefender Free Antispam for Mail Servers has been installed, you have tointegrate it in your Mail Transfer Agent. This means you have to redirect the emailtraffic through the BitDefender integration agents, for each message to be scanned.To do so, use the bdsafe(8) command.

    # bdsafe agent integrate [MTA]

    This will automatically integrate the BitDefender agent into your MTA installation. Then,you should consider enabling it by using the command:

    # bdsafe agent enable [MTA]

    The Mail Transfer Agent can be one of the following:

    cgate courier milter postfix postfix-milter qmail smtp

    8.1. CommuniGate ProFor a manual integration of the BitDefender agent, please follow these steps:

    1. Open the CommuniGate administration interface: point your browser to theweb-based management interface on the server (usually on port 8010:http://yourserver:8010/).

    2. Go to Settings General (you will be required to login).3. Go to the Helpers tab and look at Content Filtering.

    For CommuniGate Pro version 4, do the following actions:a. Check the Use Filter boxb. Enter BitDefender in the textboxc. Set the Log list to Problems

    MTA Integration 27

    BitDefender Free Antispam for Mail Servers

  • d. Set Timeout to 2 minutese. In the Program Path, enter /opt/BitDefender/bin/bdcgatedf. Set Auto-Restart to 5 secondsg. Press Update

    For CommuniGate Pro version 5, the method is slightly different:a. Enable the filter using the drop-down combob. Enter BitDefender in the corresponding textboxc. Set the Log Level to Problemsd. Set Timeout to 2 minutese. In the Program Path textbox, enter /opt/BitDefender/bin/bdcgatedf. Set Auto-Restart to 5 secondsg. Press Update

    4. Go to Settings Mail Rules tab.5. Enter BitDefender and press Create New or Add Rule, in version 5.6. Press the Edit button next to the BitDefender filter. Do the following settings:

    look at the Data list and set it to Message Size Set Operation to "greater than" Set Parameter to 1 Look at the Action list and set it to External Filter Enter BitDefender in the Parameters box Press Update

    BitDefender will now start scanning your incoming messages.7. Restart the BitDefender services.8. Restart CommuniGate Pro.

    MTA Integration 28

    BitDefender Free Antispam for Mail Servers

  • 9. Basic Configuration

    9.1. View SettingsAfter you have installed the BitDefender Free Antispam for Mail Servers, it may be agood idea to understand how security policies work.

    The first thing to remember is that security policies apply to groups.

    You are dealing with one group only, referred to as Default, which contains theentire list of users, both senders and receivers, and specifies the implied settings.

    Naturally, the second thing to do is to have a look at the default security settings. Runthis command as root.

    # bdsafe group configure Default

    The output will be similar with the one below.

    Configuration for 'addfooters', group 'default':addfooters = 'Y'

    Configuration for 'smtpforward', group 'default':enable = 'N'when = 'BeforeScan'smtphelo = ''smtpfrom = ''smtprcpt = ''smtpip = '127.0.0.1'smtpport = ''

    Configuration for 'antivirus', group 'default':enable = 'Y'addheaders = 'Y'headername = 'X-BitDefender-Scanner'actionsonriskware = 'disinfect;delete;quarantine'actionsonsuspected = 'disinfect;delete;quarantine'actionsonvirus = 'disinfect;delete;quarantine'actionsonpassword = 'ignore'pipeprogram = ''pipeprogramarguments = ''

    Basic Configuration 29

    BitDefender Free Antispam for Mail Servers

  • Configuration for 'antispam', group 'default':enable = 'Y'addheaders = 'Y'cgatecompat = 'N'modifysubject = 'Y'aggressivity = 'default'actions = 'ignore'whitelist = '/opt/BitDefender/etc/as_Default_whitelist'blacklist = '/opt/BitDefender/etc/as_Default_blacklist'headername = 'X-BitDefender-Spam'stampheadername = 'X-BitDefender-SpamStamp'headertemplateham = '/opt/BitDefender/share/templates/ham.tpl'headertemplatespam = '/opt/BitDefender/share/templates/spam.tpl'subjecttemplate = '/opt/BitDefender/share/templates/subject.tpl'usebwfilter = 'Y'usebayesfilter = 'Y'usemultifilter = 'Y'userblfilter = 'N'useurlfilter = 'Y'usesignfilter = 'Y'usesurblfilter = 'Y'useiprblfilter = 'Y'useapmfilter = 'Y'usecloud = 'Y'markinfected = 'N'pipeprogram = ''pipeprogramarguments = ''

    Configuration for 'contentfilter', group 'default':enable = 'Y'rules = ''maxrules = ''headername = 'X-BitDefender-CF-Stamp'htmldisarm = 'N'multimatch = 'N'

    Each setting will be explained in the following table.

    ValueSettingY if it is enabled, N if it is disabled. Add anew footer to all mails or not.

    AddFooters

    Basic Configuration 30

    BitDefender Free Antispam for Mail Servers

  • ValueSettingY if you forward mails to another mailserver, N if SmtpForward is disabled.

    SmtpForward/Enable

    Shows if the mail messages are to beforward to another mail server before orafter scanning.

    SmtpForward/When

    Shows the other mail server HELOprotocol command.

    SmtpForward/SMTP_HELO

    Shows the other mail server MAIL FROMprotocol command.

    SmtpForward/SMTP_FROM

    Shows the other mail server RCPT TOprotocol command.

    SmtpForward/SMTP_RCPT_TO

    Shows the other mail server IP address.SmtpForward/SMTP_IP

    Shows the other mail server port.SmtpForward/SMTP_PORT

    Y if the antivirus module is enabled, N ifit is disabled.

    Antivirus/Enable

    Y if it is enabled, N if it is disabled. Add anew header to all mails or not.

    Antivirus/AddHeaders

    Shows the default antivirus header.Antivirus/HeaderName

    Lists the actions to be taken whenriskware message is found.

    Antivirus/ActionsOnRiskware

    Lists the actions to be taken whensuspected message is found.

    Antivirus/ActionsOnSuspected

    Lists the actions to be taken when virusinfected message is found.

    Antivirus/ActionsOnVirus

    Shows the full path to the program to pipethe mail to.

    Antivirus/PipeProgram

    Shows the corresponding argument thepipe program accepts.

    Antivirus/PipeProgramArguments

    Y if the antispam module is enabled, N ifthe antispam module disabled.

    Antispam/Enable

    Basic Configuration 31

    BitDefender Free Antispam for Mail Servers

  • ValueSettingY if it is enabled, N if it is disabled. Add anew header to all mails or not.

    Antispam/AddHeaders

    Y if it is enabled, N if it is disabled.Specifies whether the subject of the email

    Antispam/ModifySubject

    message should be modified conformingto the Subject template field or not.

    Sets up the antispam Aggressivitylevel. It goes from 0 (minimum trust in

    Antispam/Aggressivity

    antispam score returned by theBitDefender filters) up to 9 (maximumtrust).

    Lists the actions to be taken when spammessage is found.

    Antispam/Actions

    Shows the path to the white listconfiguration file.

    Antispam/WhiteList

    Shows the path to the black listconfiguration file.

    Antispam/BlackList

    Shows the default spam header.Antispam/StampHeaderName

    Shows the path to the ham headertemplate file.

    Antispam/HeaderTemplateHam

    Shows the path to the spam headertemplate file.

    Antispam/HeaderTemplateSpam

    Shows the path to the subject templatefile.

    Antispam/SubjectTemplate

    Y if the antispam Black/While list filter isenabled, N if it is disabled.

    Antispam/Engines/UseBWFilter

    Y if the antispam Bayesian filter isenabled, N if it is disabled.

    Antispam/Engines/UseBayesFilter

    Y if the antispam multi-filter is enabled,N if it is disabled.

    Antispam/Engines/UseMultiFilter

    Basic Configuration 32

    BitDefender Free Antispam for Mail Servers

  • ValueSettingY if the antispam RBL (Real-timeBlackhole List) filter is enabled, N if it isdisabled.

    Antispam/Engines/UseRblFilter

    Y if the antispam URL filter is enabled, Nif it is disabled.

    Antispam/Engines/UseURLFilter

    Y if the antispam signatures filter isenabled, N if it is disabled.

    Antispam/Engines/UseSignFilter

    Y if the antispam SURBL filter is enabled,N if it is disabled.

    Antispam/Engines/UseSURblFilter

    Y if the antispam advanced patternmatching filter is enabled, N if it isdisabled.

    Antispam/Engines/UseApmFilter

    Y if the antispam engines should querythe cloud for improved detection, N if itshould not.

    Antispam/Engines/UseCloud

    Shows the full path to the program to pipethe mail to.

    Antispam/PipeProgram

    Shows the corresponding argument thepipe program accepts.

    Antispam/PipeProgramArguments

    Y if the content filtering is enabled, N if itis disabled.

    ContentFilter/Enable

    Shows the location of the content filterconfiguration file.

    ContentFilter/Rules

    Shows themaximum number of rules thatcan be loaded from the content filterconfiguration file.

    ContentFilter/MaxRules

    Shows the user to be notified about blockor allow emails based on analysis of theircontent.

    ContentFilter/Administrator

    Shows the hostname and port in caseyou want to forward mails based on

    ContentFilter/SMTPServer

    analysis of their content to another mailserver.

    Basic Configuration 33

    BitDefender Free Antispam for Mail Servers

  • 9.2. Edit SettingsYou can customize the Default group to meet your needs, by changing its settings.Run these commands as root.

    Let's say you want that your users never misses a mail, even if it looks like spam. Toignore spam, use the bdsafe command as follows:

    # bdsafe group configure Default \antispam actions ignore

    Maybe you want to enable the Asian characters filter in order to cut down the amountof spam originating from Far East.

    # bdsafe mail antispam charsets \asian enable

    Or maybe you want to alter the spam threshold.

    # bdsafe group configure Default antispam aggressivity 9

    To check the configuration status of the mail daemon component, run this command.

    # bdsafe mail

    By default, the email footers are appended. Here is the command to disable them:

    # bdsafe group configure Default addfooters N

    NoteThe footers cannot be disabled if the product is registered with a trial key.

    You can use the mail forward feature, enabling message sending to another recipient.In order to do this, run this command as root.

    Basic Configuration 34

    BitDefender Free Antispam for Mail Servers

  • # bdsafe group configure Default \smtpforward smtpip [IP_ADDRESS]

    NoteFor a full description of BitDefender settings you must take a look at the bdsafe(8)manual pages.

    Basic Configuration 35

    BitDefender Free Antispam for Mail Servers

  • 10. Product RegistrationThe product is delivered with a trial registration key valid for thirty days. At the end ofthe trial period, if you want to continue using the product, you have to provide a newlicense key.

    To check the license status, use the following command.

    # bdsafe license antispam

    You will be presented with the license type, status, the number of covered users andthe remaining validity period.

    If you have a new license key, the following command will perform the registration ofthe installed daemon.

    # bdsafe license antispam ABCDE12345ABCDE12345

    ImportantInternet access is required for license activation and periodic validation.

    Product Registration 36

    BitDefender Free Antispam for Mail Servers

  • Advanced Usage

    37

    BitDefender Free Antispam for Mail Servers

  • 11. ConfigurationOnce BitDefender Free Antispam for Mail Servers has been installed and integratedinto the Mail Transport Agent, it just works. But there are some settings to fine-tuneyour installation that you might be interested in.

    11.1. Antivirus settingsBitDefender antivirus engines detects not only viruses, but also other potentiallymalicious applications like riskware (programs that might be executed or misused byother malware) and suspected files ( containing possible malware; these are usuallysubmitted to the AV Lab for further analysis).

    NoteThe Antivirus component is not available in BitDefender Free Antispam for Mail Servers.If you want antivirus protection also, you must purchase a license for BitDefenderSecurity for Mail Servers.

    11.2. Antispam settingsBitDefender Antispam employs remarkable technological innovations and industrystandard antispam filters to weed out spam before it reaches the user's Inbox.

    In our field, performance means high detection rates and very few false positives(legitimatemessages detected as spam). To achieve this goal we have packed togetherpowerful antispam filters. These are the entire antispam filters, in the pass-throughorder.

    The Multipurpose filterThe Multipurpose filter is a generic name for GTUBE (an antispam test) and twospecialized filters: the Charset filter and the Sexually explicit filter.

    GTUBE, the Generic Test for Unsolicited Bulk Email, is an antispam test similarto EICAR antivirus test. The test consists in entering a special 68-byte string inthe message body of an email in order to be detected as spam. Its role is to checkthe product functionality to see if the filters are correctly installed and detect theincoming spam.

    The Charset filter can be instructed to detect messages written in other languages(for instance Asian languages, or Cyrillic) and mark them as spam. This comesin handy when the user is certain that they will not receive mail in these languages.

    Configuration 38

    BitDefender Free Antispam for Mail Servers

  • The American law demands that all sexually explicit advertisement emails bemarked as such, with sexually explicit in their subject. The Sexually explicit filtercan detect and mark these messages as spam directly.

    NoteThe GTUBE is the first filter to come to action, while the specialized filters followafter the black list / white list filter.

    The Black list / White list filterThe black list / white list filter can be very useful when the user wants to blockincoming messages from a certain sender (blacklist), or when the user wants tomake sure that all messages from a friend or a newsletter arrive in the Inbox,regardless of their contents. The black list / white list filter is often called Friends/ Spammers list. It can define allow or deny lists both for individual emailaddresses, or for entire domain names (for instance all mail from any employeeof bigcorporation.com).

    Add friends to the white listWe recommend that you add your friends names and email addresses to the whitelist. BitDefender will not block messages from those on the list; therefore, addingthem ensures that legitimate messages get through.

    The two lists are plain text files, containing one entry per line. You can find thesetext files (as_wlist and as_blist) in this location: /opt/BitDefender/etcThe entries may be usual email addresses or domain names, respecting thefollowing format.

    DescriptionFormatThis format will match only the specified user from thespecified domain.

    [email protected]

    The mentioned user from any domain whose name startswith the specified text will match.

    user@domain.*

    The user from any domain with a .com suffix (for example)will match.

    user@*.com

    This will match all users from the specified domain.*@domain.com

    All users from all domains starting with the mentioned textwill match.

    *@domain.*

    Configuration 39

    BitDefender Free Antispam for Mail Servers

  • DescriptionFormatThis will match all users from all domains with a .com suffix(for example).

    *.com

    The specified user, from all domains, will match.user@*

    This will match all users whose names start with thementioned text, no matter of the domain.

    user*

    ImportantThe changes are not effective until you restart BitDefender

    The RBL filterRBL stands for Real time Black List or Real time Blackhole List. TheBitDefender implementation uses the DNSBL protocol and RBL servers to filterspam based on mail server's reputation as spam sender.

    The mail server address is extracted from the email header and checked forvalidity. If the address belongs to a private class (10.0.0.0/8 or192.168.0.0/16) or it is not relevant, it will be ignored.

    A DNS check will be performed on the domain d.c.b.a.rbl.example.com,where d.c.b.a is the reversed IP address of the server and rbl.example.comis the RBL server. If the DNS replies that domain is valid, it means that the IP islisted in the RBL server and a certain server score is provided. This score cantake values from 0 to 100, according to the server confidence (trust level), whichyou are free to configure.

    The query is performed for every RBL server in the list and the score returned byeach one is added to the intermediate score. When reaching 100, no more queriesare performed.

    Finally, a spam score is computed from the RBL servers score and added to theglobal email's spam score.

    You can easily configure the RBL nameservers for the Mail daemon, by runningthis command.

    # bdsafe mail antispam rbl nameservers [add|remove] [host]

    You can also configure the RBL servers for the Mail daemon, by running thiscommand.

    Configuration 40

    BitDefender Free Antispam for Mail Servers

  • # bdsafe mail antispam rbl servers [add|remove] \host:[weight]

    The value of the weight parameter can be between 0(minimum trust level) and100(maximum trust level).

    The URL filterAlmost all spam links to a site: whether they want us to buy cheap Rolexes orenter our login and password on a fake Citibank site, they have a link. The URLfilter detects these links and looks them up in a database created and maintained(via update) by our lab. If a message links to a forbidden site, the odds are highthat it's spam.

    The Bayesian filterWe know that not all of our users will agree with us when classifying a messageas spam or legit. For instance, a doctor talking about Viagra with his patients willcertainly need to customize his filters. That's why we've added the Bayesian filter.

    Every user can train it by example, and make it learn what messages are spamand what messages are legit (from specific examples in the user's mailbox). Afterenough learning, the Bayesian filter is adapted to the specifics of legitimate andspam messages the user usually receives, and it becomes a powerful factor inthe decision process.

    You can train the bayesian filter with spam samples, by running this command.

    # bdsafe bayes spam [file1] [file2] [dir1] [dir2]

    Let's take an example.

    # bdsafe bayes spam /home/test/viagra.eml /home/test/porn

    You can also easily train the bayesian filter with ham samples, by running thiscommand.

    # bdsafe bayes ham [file1] [file2] [dir1] [dir2]

    Configuration 41

    BitDefender Free Antispam for Mail Servers

  • Training the Bayesian filter from an inboxYou can help improve the Bayesian filter by submitting spam messages to aninbox that is periodically checked by BitDefender. The submission process worksas follows:

    1. A spam email is delivered to a user

    2. The user forwards the email as an attachment to a predefined POP3 emailaccount that BitDefender periodically checks

    3. BitDefender retrieves the email and feeds it to the Bayes dictionary

    ImportantEmails retrieved by BitDefender are erased from the Inbox.

    To configure spam submissions, you have to edit the BitDefender registry. Followthese steps:

    1. Enable/disable the submission module by running the following command:

    # bdsafe registry setkey \$BDMLD/SpamSubmit/Enable Y/N

    2. Set the POP3 host:

    # bdsafe registry setkey$BDMLD/SpamSubmit/Host [host_address:port]

    3. Enable/disable SSL encryption:

    # bdsafe registry setkey $BDMLD/SpamSubmit/UseSSL Y/N

    4. If required, enter the user names of the POP3 accounts to which spam andham are sent:

    # bdsafe registry setkey \$BDMLD/SpamSubmit/SpamUser [user_name]

    Configuration 42

    BitDefender Free Antispam for Mail Servers

  • # bdsafe registry setkey \$BDMLD/SpamSubmit/HamUser [user_name]

    5. Enter the passwords for the POP3 accounts (if required):

    # bdsafe registry setkey \$BDMLD/SpamSubmit/SpamPass [password]

    # bdsafe registry setkey \$BDMLD/SpamSubmit/HamPass [password]

    6. Set the time interval at which BitDefender will check the account for emails:

    # bdsafe registry setkey \$BDMLD/SpamSubmit/Timeout [seconds]

    ImportantSpammessages must be forwarded as attachments to emails no larger than 8MB.

    The Advanced Pattern Matching (APM) - NeuNet FilterBased on artificial neural networks, APM is a powerful heuristic antispam filter,developed by BitDefender to detect new and unknown spam. The APM filter isautomatically trained on large volumes of spammessages inside the BitDefenderAntispam Lab. During training, it learns to distinguish between spam and legitimateemails and to recognize new spam by perceiving its similarities, often very subtle,with the messages it has already examined. This filter is designed to improvesignature-based detection, while keeping the number of false positives very low.

    Once you install BitDefender Free Antispam for Mail Servers all these antispam filtersare enabled. Of course, you can set up your desired number of active filters, by usingthe bdsafe command. For example, to enable / disable the URL filter, run the followingcommand as root.

    Configuration 43

    BitDefender Free Antispam for Mail Servers

  • # bdsafe group configure \Default antispam useurlfilter [value]

    NoteThe new value might be Y, to enable the filter, or N, to disable it.

    For a full description of these antispam settings you must take a look to the bdsafe(8)manual pages.

    11.2.1. X-Junk-ScoreHeader for CommuniGate Pro IntegrationWhen integrated with CommuniGate Pro, BitDefender can add the X-Junk-Scoreheader to filtered emails. CommuniGate Pro uses the value of the X-Junk-Score headerto perform certain actions on the processed emails.

    NoteFor more information about the X-Junk-Score header, please refer to the CommuniGatePro documentation.

    To enable the X-Junk-Score header, run the following command:

    # bdsafe group configure Default antispam cgatecompat Y

    To apply the configuration changes, run the following command:

    # bdsafe reloadsettings

    11.3. Content FilteringSometimes you just need to block or allow emails based on analysis of their content,rather than other criteria. BitDefender offers support for this kind of operation.

    To create, modify or delete content filtering rules you have to run one of the followingbdsafe commands.

    Configuration 44

    BitDefender Free Antispam for Mail Servers

  • # bdsafe group configure Default contentfilter add \{priority} {name} {type} {header_name} \{condition} {value} {action} {notify}

    ValueArgumentheader, body, attachment-name, attachment-type, attachment-size,mailsize

    type

    exists, !exists, match, !match, greater-than, !greater-thancondition

    a positive number (of bytes), a regular expressionvalue

    ignore, drop, reject, replace, copy-to-quarantine, move-to-quarantineaction

    none, administrator, admin, sender, recipientsnotify

    The command above adds a new content filter rule.

    # bdsafe group configure Default contentfilter modify \{rule_priority_number} {field_name=field_value}

    ValueArgumentpriority, enabled, name, type, header_name, condition, value, action,notify

    field_name

    The command above modifies a rule, field by field.

    # bdsafe group configure Default contentfilter dump \{rule_priority_number}

    The command above lists all existing rules for the specified group. If you add a numberas argument the rule with that priority number will be displayed only.

    # bdsafe group configure Default contentfilter delete \{rule_priority_number}

    The command above deletes the rule with the specified priority number.

    Configuration 45

    BitDefender Free Antispam for Mail Servers

  • # bdsafe group configure Default contentfilter enable \{boolean_value} {rule_priority_number}

    The command above enables/disables content filtering for the Default group. If youadd a number as argument the rule with that priority number will be enabled/disabledonly .

    # bdsafe group configure Default contentfilter priority \{old_priority_number} {new_priority_number}

    The command above changes the priority of a certain rule.

    # bdsafe group configure Default contentfilter rules \{path_to_file}

    The command above lists the group content filter configuration file location. If you adda path_to_file argument, this command sets the group content filter configurationfile to the specified location.

    # bdsafe group configure Default contentfilter maxrules \{number}

    The command above sets the maximum number of rules that can be loaded from thegroup content filter configuration file.

    # bdsafe group configure Default \contentfilter htmldisarm Y

    The commmand above enables the HTML disarm feature for the specified group. Thisfeature is designed to remove potentially malicious code like JavaScript or VisualBasic from emails with HTML content.

    11.3.1. ExamplesLet's take some examples to illustrate the power content filtering offers.

    Configuration 46

    BitDefender Free Antispam for Mail Servers

  • 1.# bdsafe group configure Default \

    contentfilter add 0 MyRule header "Subject" "match" \"porn" "drop" "none"

    This will add the content filter rule, named MyRulewith 0 priority (the most important)to the specified group. The rule says: when the word porn is found within theSubject part of the header, the respective mail will be dropped and nobody will benotified.

    2.# bdsafe group configure Default \

    contentfilter add 1 Salary body "match" \"salar.*" "drop" "admin"

    This will add the content filter rule, named Salary with 1 priority to the specifiedgroup. When applied, this rule means that emails containing in their body wordslike salary, salaries, salarry, salariess, salariu will be droppedand the administrator will be notified.

    The lesson to be learn is this: if it is a must that emails containing sensitiveinformation (like salary data, personal salary reports) to be filtered accordingly, justset a rule for them. A good idea would be to use regular expressions. The tablebelow will provide you with some examples.

    DescriptionExampleYou could use this to match either Honoror Honour. The question mark makes the

    Honou?r

    preceding token in the regular expressionoptional.

    You could use this to match either Drinkor Drank or Drunk. By using this kind of

    Dr[iau]nk

    regular expression (character class) one outof several characters will be matched only.

    You could use this to match 5 MAR 2005or 3 MAR 2008 or 9 MAR 2007 and so on.

    [0-9]\sMAR\s200[5-8]

    By using a hyphen inside a character classone out of a specified range of characters

    Configuration 47

    BitDefender Free Antispam for Mail Servers

  • DescriptionExamplewill be matched only. The \s sign will matcha space.

    You could use this to match Isue or Issueor Issues or Issssuess and so on. The

    Is+ues*

    + sign will match one or more times thepreceding token. The * sign will match zeroor more times the preceding token.

    You could use this to match 30 EUR or35EUR or 023213 EUR or any string starting

    ^[0-9]+EUR

    with a digit, followed by EUR string. The ^sign represents the start of the string to bematched.

    You could use this to [email protected] or

    [^\s]*@example.com

    n e w s @ e x a m p l e . c o m o [email protected] and so on. The ^sign inside brackets matches any characterthat is not the following token. In theabove-mentioned example, [^\s]* willmatch any non-whitespace character.

    You could use this to match List-Id:aNYstring example.com or List-ID:

    ^List-I[dD]:\s.*example.com

    example.com and so on. The ^ signrepresents the start of the string to bematched. The \s sign will match a space.The [dD] expression means either d or Dwill be matched. The .* expression meansany sign will be matched.

    NoteDo not to forget to escape with a backslash the metacharacters (the square or roundbrackets, the backslash, the caret, the dollar sign, the period, the vertical bar symbol,the question mark, the asterisk, the plus sign).

    Configuration 48

    BitDefender Free Antispam for Mail Servers

  • 3.# bdsafe group configure Default \

    contentfilter add 2 BigMail attachment-size \"greater-than" "10000" "drop" "none"

    This will add the content filter rule, named BigMail with 2 priority to the specifiedgroup. When applied, this rule means that if the size of a certain attachment isgreater than 10000 bytes, the email containing the respective attachment will bedropped and nobody will be notified.

    4.# bdsafe group configure Default \

    contentfilter modify 0 "priority=3" "name=explicit content"

    This will change the MyRule (0 priority) from the old priority 0 to new priority 3.The new name of this rule will be "explicit content".

    5.# bdsafe group configure Default \

    contentfilter priority 1 0

    This will change the Salary rule of the specified group from old priority 1 to newpriority 0 (the most important rule; it will be applied first of all).

    6.# bdsafe group configure Default \

    contentfilter dump

    This will list the content filter rules of the specified group together with their priorities.

    7.# bdsafe group configure Default \

    contentfilter delete 4

    This will delete the content filter rule of the specified group with priority 4.

    8.# bdsafe group configure Default\

    contentfilter enable N 4

    This will disable the content filter rule of the specified group with priority 4.

    Configuration 49

    BitDefender Free Antispam for Mail Servers

  • 11.4. The BitDefender Logger DaemonThe BitDefender Logger Daemon (bdlogd) allows you to get a full picture of the othersdemons activity, as it receives logging messages from the other modules and passesthem to the logger plugins.

    Either a local socket (Unix domain socket) or a TCP/IP socket will be used to implementcommunication among different modules of BitDefender while the communicationamong the Logger Daemon and its plugins is based on API (Application ProgrammingInterface).

    bdlogd was designed with a plugins parallel execution philosophy in mind. In short,this means that each plugin will run on its own individual thread. The result is that theslower plugins will no longer disturb the faster ones (like filelog).

    To manage the configuration of the Logger Daemon and the associated plugins youwill use the bdsafe command. You will be provided below with a list of common settingsfor bdlogd.

    The general syntax for the bdlogd daemon and plugins configuration is the followingone:

    # bdsafe logger configuration [parameters ...]

    # bdsafe logger plugin configuration [parameters ...]

    The BasePathTo specify the fully-qualified name of a directory from which bdlogd will attempt toload plugins, run the following line as root:

    # bdsafe logger basepath [value]

    11.4.1. The Logger PluginsThe BitDefender Logger Daemon supports the following plugins:

    The Filelog Plugin The SMTP Plugin The SNMP Plugin

    Configuration 50

    BitDefender Free Antispam for Mail Servers

  • The SYSLOG logger Plugin

    The Filelog PluginThe bdlogd receives messages from the other modules and send them to the otherplugins, for instance the filelog plugin. By default, the filelog plugin settings are thefollowing:

    bdlived.info=/opt/BitDefender/var/log/update.log bdmaild.info=/opt/BitDefender/var/log/mail.log *.error=/opt/BitDefender/var/log/error.log bdlived.error=/opt/BitDefender/var/log/update.log *.license=/opt/BitDefender/var/log/license.log bdmaild.virus=/opt/BitDefender/var/log/virus.log bdmaild.spam=/opt/BitDefender/var/log/spam.log

    It means that, for example, all error-related information, coming from all BitDefenderdaemons, will be found in this location: /opt/BitDefender/var/log/error.log.

    However, you can fully customize the daemon and message type and also the filepaths where the file logger writes the messages, by using the bdsafe command. Inorder to do this, please run the following line as root:

    # bdsafe logger file path message_type [value]

    The message_type argument must follow the syntax: daemon.type.

    daemon

    It can take the following values: * (i.e. all daemons), bdmaild, bdfiled, bdlogd,bdscand, bdmond, bdlived

    type

    It can take the following values: * (i.e. all types), info, error, license, debug, virus,spam

    You can also enable or disable the entire filelog plugin or just a certain type of message.In order to do this, run these commands as root.

    # bdsafe logger file disable message_type

    Configuration 51

    BitDefender Free Antispam for Mail Servers

  • # bdsafe logger file enable message_type

    By default, the file log plugin appends the current UNIX time to the rotated file:update.log.1237491868, update.log.1238491800 etc. A log file can be rotatedas follows:

    By interval (hourly, daily, montly and multiple of them, like every 6 weeks).

    By size (ex: rotate when the size reaches 10 MB).

    There's a another option called Count which determines howmany log files are created.

    NoteFor a full description of the filelog settings you must take a look to the bdsafe(8) manualpages.

    The SMTP log pluginOne of the main characteristics of the bdlogd plugins is the fact that they are easilyand extremely configurable, by using the bdsafe command. Certainly, the SMTP logplugin makes no exceptions to the above-mentioned feature. You can find out theplugin status, enable / disable it, set a connection timeout, alert senders and receivers,choose a template or only a header, etc.

    Let's take some examples.

    If you want to find out the SMTP log plugin status (enable / disable, for the entire pluginor just for a certain type of messages) run the next line as root.

    # bdsafe logger smtp status message_type

    The message_type argument must follow the syntax: daemon.type.

    daemon

    It can take the following values: * (i.e. all daemons), bdmaild, bdfiled, bdlogd,bdscand, bdmond, bdlived, bdsmtpd

    type

    It can take the following values: * (i.e. all types), info, error, license, debug, virus,spam

    To send a notification to the receivers of an infected email, run this command.

    Configuration 52

    BitDefender Free Antispam for Mail Servers

  • # bdsafe logger smtp alertrecv value

    NoteFor a full description of the SMTP log settings you must take a look to the bdsafe(8)manual pages.

    The SNMP log pluginBy using the bdsafe command, you can get the SNMP log plugin status, enable/disable it, set the port number where notification will be sent, set a connection timeout,etc.

    For example, to set the port number where notification will be sent, run this commandas root.

    # bdsafe logger snmp port value

    NoteFor a full description of the SNMP log settings you must take a look to the bdsafe(8)manual pages.

    The SYSLOG logger pluginUse the SYSLOG logger plugin to send all product specific messages to the systemlogger. Please se