# Main configuration file for the MailScanner Email Processor # # READ THIS FIRST! # Instead of making changes directly to this file, you should put your # configuration options in your own file in /etc/MailScanner/conf.d/ # Example file: /etc/MailScanner/conf.d/my_settings.conf # However, if you are changing some variable definition which is used # in other definitions in this file such as %org-name% in the first # example below, you must also either change it in this file or copy # all the definitions that use that variable into your own file. # # Examples: # # %org-name% = foobar # Max Children = 30 # Incoming Queue Dir = /var/spool/mqueue.in # # READ THIS TOO! # In addition to this file you must also set your preferences in: # # /etc/MailScanner/defaults # # It's good practice to check through configuration files to make sure # they fit with your system and your needs, whatever you expect them to # contain. # # Note: If your directories are symlinked (soft-linked) in any way, # please put their *real* location in here, not a path that # includes any links. You may get some very strange error # messages from some of the virus scanners if you don't. # # Note for Version 4.00 and above: # A lot of the settings can take a ruleset as well as just simple # values. These rulesets are files containing rules which are applied # to the current message to calculate the value of the configuration # option. The rules are checked in the order they appear in the ruleset. # # Note for Version 4.03 and above: # As well as rulesets, you can now include your own functions in # here. Look at the directory containing Config.pm and you will find # CustomConfig.pm. In here, you can add your own "value" function and # an Initvalue function to set up any global state you need such as # database connections. Then for a setting below, you can put: # Configuration Option = &ValueFunction # where "ValueFunction" is the name of the function you have # written in CustomConfig.pm. # # Note for Version 4.54 and above: # Numbers can be scaled by 1 thousand, 1 million or 1 billion by # putting a "k", "m" or "g" immediately after the number. You must # *not* put any spaces between the number and the k, m or g. # # Note for Version 4.77 and above: # If you are going to use "host:" in rulesets, it is imperative that # you have a local caching name-server (DNS server). Or else using # "host:" in rulesets will really slow you down. # # Note for Version 4.78 and above: # This file now supports nested "include" statements. The syntax is # include filename-wildcard-here # where filename-wildcard-here is replaced with the full path of one # or more other MailScanner.conf files to be read. You can use the # normal shell wildcard characters such as "*". # For each setting, the last value read will be used by MailScanner. # At the end of this file, there is an "include" that will pull in # all the files in /etc/MailScanner/conf.d so you can just add # your own local changes in there, and not need to modify this file. # # # Definition of variables which are substituted into definitions below. # # You can add any %variables% that you want to use in addition to the # ones provided. # # You can also use any shell environment variables here such as $HOSTNAME # or ${HOSTNAME} in configuration settings and rulesets. See the # definition of "Hostname" for an example. # # Enter a short identifying name for your organisation below, this is # used to make the X-MailScanner headers unique for your organisation. # Multiple servers within one site should use an identical value here # to avoid adding multiple redundant headers where mail has passed # through several servers within your organisation. # # Note: Some Symantec scanners complain (incorrectly) about "." # ***** characters appearing in the names of headers. # Some other mail servers complain about "_" characters # appearing in the names of headers as well. # So don't put "." or "_" in this setting. # # **** RULE: It must not contain any spaces! **** %org-name% = yoursite # Enter the full name of your organisation below, this is used in the # signature placed at the bottom of report messages sent by MailScanner. # It can include pretty much any text you like. You can make the result # span several lines by including "\n" sequences in the text. These will # be replaced by line-breaks. %org-long-name% = Your Organisation Name Here # Enter the location of your organisation's web site below. This is used # in the signature placed at the bottom of report messages sent by # MailScanner. It should preferably be the location of a page that you # have written explaining why you might have rejected the mail and what # the recipient and/or sender should do about it. %web-site% = www.your-organisation.com # Configuration directory containing this file %etc-dir% = /etc/MailScanner # Set the directory containing all the reports in the required language %report-dir% = /usr/share/MailScanner/reports/en # Rulesets directory containing your ".rules" files %rules-dir% = /etc/MailScanner/rules # Configuration directory containing files related to MCP # (Message Content Protection) %mcp-dir% = /etc/MailScanner/mcp # One other that is set automatically for you is %version% which is, # unsurprisingly, the string of the MailScanner version. It does not # contain the build number (the "-1" on the end), but does include the rest. # # System settings # --------------- # # How many MailScanner processes do you want to run at a time? # There is no point increasing this figure if your MailScanner server # is happily keeping up with your mail traffic. # If you are running on a server with more than 1 CPU, or you have a # high mail load (and/or slow DNS lookups) then you should see better # performance if you increase this figure. # If you are running on a small system with limited RAM, you should # note that each child takes just over 20MB. # # As a rough guide, try 5 children per CPU. But read the notes above. Max Children = 5 # The number of milter children to use when using the prefork dispatcher # This setting is ignored when using the postfork dispatcher Milter Max Children = 10 # Dispatcher method for the milter. Options are prefork and postfork. # prefork spawns a predefined maximum number of children, which is suitable # for non-bursty and steady traffic # A word of caution with prefork: bursts in traffic may exhaust all children # and result in connection failures to the milter. Use more children or # consider using postfork # postfork spawns children as connections are made and is suitable for # bursty and intermittent traffic Milter Dispatcher = postfork # User to run as (not normally used for sendmail) # If you want to change the ownership or permissions of the quarantine or # temporary files created by MailScanner, please see the "Incoming Work" # settings later in this file. #Run As User = mail #Run As User = postfix Run As User = # Group to run as (not normally used for sendmail) #Run As Group = mail #Run As Group = postfix Run As Group = # How often (in seconds) should each process check the incoming mail # queue for new messages? If you have a quiet mail server, you might # want to increase this value so it causes less load on your server, at # the cost of slightly increasing the time taken for an average message # to be processed. Queue Scan Interval = 6 # Set location of incoming mail queue # # This can be any one of # 1. A directory name # Example: /var/spool/mqueue.in # 2. A wildcard giving directory names # Example: /var/spool/mqueue.in/* # 3. The name of a file containing a list of directory names, # which can in turn contain wildcards. # Example: /etc/MailScanner/mqueue.in.list.conf # # If you are using sendmail and have your queues split into qf, df, xf # directories, then just specify the main directory, do not give me the # directory names of the qf,df,xf directories. # Example: if you have /var/spool/mqueue.in/qf # /var/spool/mqueue.in/df # /var/spool/mqueue.in/xf # then just tell me /var/spool/mqueue.in. I will find the subdirectories # automatically. # Incoming Queue Dir = /var/spool/mqueue.in # Set location of outgoing mail queue. # This can also be the filename of a ruleset. Outgoing Queue Dir = /var/spool/mqueue # Set where to unpack incoming messages before scanning them # This can completely safely use tmpfs or a ramdisk, which will # give you a significant performance improvement. # NOTE: The path given here must not include any links at all, # NOTE: but must be the absolute path to the directory. # NOTE: If you change this, you should change these too: # NOTE: SpamAssassin Temporary Dir # NOTE: SpamAssassin Cache Database File Incoming Work Dir = /var/spool/MailScanner/incoming # Set where to store infected and message attachments (if they are kept) # This can also be the filename of a ruleset. Quarantine Dir = /var/spool/MailScanner/quarantine # Set where to store the process id number so you can stop MailScanner # You should NOT put this in a subdirectory of /var/run else you will # run into problems. PID file = /var/run/MailScanner.pid # Set Milter PID File, if in use Milter PID File = /var/run/MSMilter.pid # To avoid resource leaks, re-start periodically. Forces a re-read of all # the configuration files too, so new updates to the bad phishing sites list # are read frequently. Restart Every = 7200 # Set whether to use postfix, sendmail, exim, zmailer, or msmail (milter) # If you are using postfix, then see the "SpamAssassin User State Dir" # setting near the end of this file MTA = sendmail # If using msmail, define whether postfix is using long or short IDs MSMail Queue Type = short # MSMail delivery method # Scanned mail can be delivered using SMTP or QMQP MSMail Delivery Method = SMTP # MSMail Socket type when using QMQP # Can be set to unix or inet # This setting is ignored for SMTP delivery MSMail Socket Type = unix # MSMail Socket Directory when using a unix port # This setting is ignored for SMTP delivery MSMail Socket Dir = /var/spool/postfix/public/qmqp # Port msmail should deliver messages to relay # If using QMQP with an inet socket, this port is typically 628 MSMail Relay Port = 25 # IP Address msmail should use to deliver MSMail Relay Address = 127.0.0.1 # Milter loopback behavior # When delivering scanned mail using SMTP, this prevents # an infinite mail loop and must be set to yes # When delivering scanned mail using QMQP, this can be # set to no to allow scanning of mail received on loopback # interfaces Milter Ignore Loopback = yes # If using the milter/msmail, this setting will activate # the milter scanner, which will reject mail that meets # certain criteria (i.e. blacklisted) Milter Scanner = yes # Port the milter should use Milter Port = 33333 # IP the milter should bind Milter Bind = 127.0.0.1 # Set how to invoke MTA when sending messages MailScanner has created # (e.g. to sender/recipient saying "found a virus in your message") # This can also be the filename of a ruleset. Sendmail = /usr/lib/sendmail # Sendmail2 is provided for Exim users. # It is the command used to attempt delivery of outgoing cleaned/disinfected # messages. # This is not usually required for sendmail. # This can also be the filename of a ruleset. #For Exim users: Sendmail2 = /usr/sbin/exim -C /etc/exim/exim_send.conf #For sendmail users: Sendmail2 = /usr/lib/sendmail #Sendmail2 = /usr/sbin/sendmail -C /etc/exim/exim_send.conf Sendmail2 = /usr/lib/sendmail # # Incoming Work Dir Settings # -------------------------- # # You should not normally need to touch these settings at all, # unless you are using ClamAV and need to be able to use the # external archive unpackers instead of ClamAV's built-in ones. # If you want to create the temporary working files so they are owned # by a user other than the "Run As User" setting at the top of this file, # you can change that here. # # Note: If the "Run As User" is not "root" you cannot change the # user but may still be able to change the group, if the # "Run As User" is a member of both of the groups "Run As Group" # and "Incoming Work Group" # Note: If the "Run As User" is "root" (or not set at all) and you are # using the "clamd" virus scanner AND clamd is not running as root, # then this must be set to the group clamd is using (from your # clamd.conf), example: # Incoming Work Group = mtagroup # Incoming Work Permissions = 0660 # # The installer creates a group on your system called "mtagroup" # and adds found users from mail, clamav, postfix, exim, etc # to that group. This combined with Incoming Work Permissions # of 0660 allows file access without errors such as the # infamous ClamAV ./lstat() error. Incoming Work User = Incoming Work Group = mtagroup # If you want processes running under the same *group* as MailScanner to # be able to read the working files (and list what is in the # directories, of course), set to 0640. If you want *all* other users to # be able to read them, set to 0644. For a detailed description, if # you're not already familiar with it, refer to `man 2 chmod`. # Typical use: external helper programs of virus scanners (notably ClamAV), # like unpackers. # Use with care, you may well open security holes. # # Note: If the "Run As User" is "root" (or not set at all) and you are # using the "clamd" virus scanner, add the clam daemon user to # the group "mtagroup" and set: # Incoming Work Group = mtagroup # Incoming Work Permissions = 0660 # # 0660 is useful for using a group to allow permissions across # your MTA and virus scanners. the installer creates mtagroup # and adds found users (clamav, postfix, mail, exim) to that # group during the install process Incoming Work Permissions = 0660 # # Quarantine and Archive Settings # ------------------------------- # # If, for example, you are using a web interface so that users can manage # their quarantined files, you might want to change the ownership and # permissions of the quarantined so that they can be read and/or deleted # by the web server. # Don't touch this unless you know what you are doing! # If you want to create the quarantine/archive so the files are owned # by a user other than the "Run As User" setting at the top of this file, # you can change that here. # Note: If the "Run As User" is not "root" then you cannot change the # user but may still be able to change the group, if the # "Run As User" is a member of both of the groups "Run As Group" # and "Quarantine Group". Quarantine User = Quarantine Group = # If you want processes running under the same *group* as MailScanner to # be able to read the quarantined files (and list what is in the # directories, of course), set to 0640. If you want *all* other users to # be able to read them, set to 0644. For a detailed description, if # you're not already familiar with it, refer to `man 2 chmod`. # Typical use: let the webserver have access to the files so users can # download them if they really want to. # Use with care, you may well open security holes. Quarantine Permissions = 0660 # # Processing Incoming Mail # ------------------------ # # In every batch of virus-scanning, limit the maximum # a) number of unscanned messages to deliver # b) number of potentially infected messages to unpack and scan # c) total size of unscanned messages to deliver # d) total size of potentially infected messages to unpack and scan Max Unscanned Bytes Per Scan = 100m Max Unsafe Bytes Per Scan = 50m Max Unscanned Messages Per Scan = 30 Max Unsafe Messages Per Scan = 30 # If more messages are found in the queue than this, then switch to an # "accelerated" mode of processing messages. This will cause it to stop # scanning messages in strict date order, but in the order it finds them # in the queue. If your queue is bigger than this size a lot of the time, # then some messages could be greatly delayed. So treat this option as # "in emergency only". Max Normal Queue Size = 800 # If this is set to "yes", then email messages passing through MailScanner # will be processed and checked, and all the other options in this file # will be used to control what checks are made on the message. # # If this is set to "no", then email messages will NOT be processed or # checked *at all*, and so any viruses or other problems will be ignored. # # If this is set to "virus", then email messages will only be scanned for # viruses and *nothing* else. # # The purpose of this option is to set it to be a ruleset, so that you # can skip all scanning of mail destined for some of your users/customers # and still scan all the rest. # A sample ruleset would look like this: # To: bad.customer.com no # From: ignore.domain.com no # From: my.domain.com virus # FromOrTo: default yes # That will scan all mail except mail to bad.customer.com and mail from # ignore.domain.com. To set this up, put the 3 lines above into a file # called /etc/MailScanner/rules/scan.messages.rules and set the next line to # Scan Messages = %rules-dir%/scan.messages.rules # This can also be the filename of a ruleset (as illustrated above). Scan Messages = yes # You may not want to receive mail from certain addresses and/or to certain # addresses. If so, you can do this with your email transport (sendmail, # Postfix, etc) but that will just send a one-line message which is not # helpful to the user sending the message. # If this is set to yes, then the message set by the "Rejection Report" # will be sent instead, and the incoming message will be deleted. # If you want to store a copy of the original incoming message then use the # "Archive Mail" setting to archive a copy of it. # The purpose of this option is to set it to be a ruleset, so that you # can reject messages from a few offending addresses where you need to send # a polite reply instead of just a brief 1-line rejection message. Reject Message = no # Limit the number of attempts made at processing any particular message. # If you get a message which repeatedly crashes MailScanner, it will # limit the impact by ignoring the message and refusing to process it, # after more than the given number of attempts have been made at it. # Note that enabling this feature causes a slight performance hit. # Set this to 0 to disable the limit and the entire Processing Attempts # Database and its requirement for SQLite. # This cannot be a ruleset, only a simple value. Maximum Processing Attempts = 6 # This is the location of the database file used to track the number of # times any message has been attempted. # To clear out the database, just delete the file, MailScanner will re- # create it automatically when it starts. Processing Attempts Database = /var/spool/MailScanner/incoming/Processing.db # The maximum number of attachments allowed in a message before it is # considered to be an error. Some email systems, if bouncing a message # between 2 addresses repeatedly, add information about each bounce as # an attachment, creating a message with thousands of attachments in just # a few minutes. This can slow down or even stop MailScanner as it uses # all available memory to unpack these thousands of attachments. # This can also be the filename of a ruleset. Maximum Attachments Per Message = 200 # Expand TNEF attachments using an external program (or a Perl module)? # This should be "yes" unless the scanner you are using (Sophos, McAfee) has # the facility built-in. However, if you set it to "no", then the filenames # within the TNEF attachment will not be checked against the filename rules. Expand TNEF = yes # When the TNEF (winmail.dat) attachments are expanded, should the # attachments contained in there be added to the list of attachments in # the message? # If you set this to "add" or "replace" then recipients of messages sent # in "Outlook Rich Text Format" (TNEF) will be able to read the attachments # if they are not using Microsoft Outlook. # # no => Leave winmail.dat TNEF attachments alone. # add => Add the contents of winmail.dat as extra attachments, but also # still include the winmail.dat file itself. This will result in # TNEF messages being doubled in size. # replace => Replace the winmail.dat TNEF attachment with the files it # contains, and delete the original winmail.dat file itself. # This means the message stays the same size, but is usable by # non-Outlook recipients. # # This can also be the filename of a ruleset. Use TNEF Contents = replace # Some versions of Microsoft Outlook generate unparsable Rich Text # format attachments. Do we want to deliver these bad attachments anyway? # Setting this to yes introduces the slight risk of a virus getting through, # but if you have a lot of troubled Outlook users you might need to do this. # We are working on a replacement for the TNEF decoder. # This can also be the filename of a ruleset. Deliver Unparsable TNEF = no # Where the MS-TNEF expander is installed. # This is EITHER the full command (including maxsize option) that runs # the external TNEF expander binary, # OR the keyword "internal" which will make MailScanner use the Perl # module that does the same job. # They are both provided as I am unsure which one is faster and which # one is capable of expanding more file formats (there are plenty!). # # The --maxsize option limits the maximum size that any expanded attachment # may be. It helps protect against Denial Of Service attacks in TNEF files. # This can also be the filename of a ruleset. #TNEF Expander = internal TNEF Expander = /usr/bin/tnef --maxsize=100000000 # The maximum length of time the TNEF Expander is allowed to run for 1 message. # (in seconds) TNEF Timeout = 120 # Where the "file" command is installed. # This is used for checking the content type of files, regardless of their # filename. # To disable Filetype checking, set this value to blank. File Command = /usr/bin/file # The maximum length of time the "file" command is allowed to run for 1 # batch of messages (in seconds). File Timeout = 20 # Where the "gunzip" command is installed. # This is used for expanding .gz files. # To disable gzipped file checking, set this value to blank # and the timeout to 0. Gunzip Command = /bin/gunzip # The maximum length of time the "gunzip" command is allowed to run to expand # 1 attachment file (in seconds). Gunzip Timeout = 50 # Where the "unrar" command is installed. # If you haven't got this command, look at www.rarlab.com. # # This is used for unpacking rar archives so that the contents can be # checked for banned filenames and filetypes, and also that the # archive can be tested to see if it is password-protected. # Virus scanning the contents of rar archives is still left to the virus # scanner, with one exception: # If using the clavavmodule virus scanner, this adds external RAR checking # to that scanner which is needed for archives which are RAR version 3. Unrar Command = /usr/bin/unrar # The maximum length of time the "unrar" command is allowed to run for 1 # RAR archive (in seconds) Unrar Timeout = 50 # Used as unpacking engine for multiple archive formats Un7zip Command = /usr/bin/7z # The maximum length of time the "7z" command is allowed to run for 1 # 7zip or other 7zip compatible archive (in seconds) Un7zip Timeout = 50 # A few viruses store their infected data in UU-encoded files, to try to # catch out virus scanners. This rarely succeeds at all. # Setting this option to yes means that you can apply filename and filetype # checks to the contents of UU-encoded files. This may occasionally be # useful, in which case you should set to yes. # This can also be the filename of a ruleset. Find UU-Encoded Files = no # The maximum size, in bytes, of any message including the headers. # If this is set to zero, then no size checking is done. # This can also be the filename of a ruleset, so you can have different # settings for different users. You might want to set this quite small for # dialup users so their email applications don't time out downloading huge # messages. Maximum Message Size = %rules-dir%/max.message.size.rules # The maximum size, in bytes, of any attachment in a message. # If this is set to zero, effectively no attachments are allowed. # If this is set less than zero, then no size checking is done. # This can also be the filename of a ruleset, so you can have different # settings for different users. You might want to set this quite small for # large mailing lists so they don't get deluged by large attachments. # This can also be the filename of a ruleset. Maximum Attachment Size = -1 # The minimum size, in bytes, of any attachment in a message. # If this is set less than or equal to zero, then no size checking is done. # It is very useful to set this to 1 as it removes any zero-length # attachments which may be created by broken viruses. # This can also be the filename of a ruleset. Minimum Attachment Size = -1 # The maximum depth to which zip archives, rar archives and Microsoft Office # documents will be unpacked, to allow for checking filenames and filetypes # within zip and rar archives and embedded within Office documents. # # Note: This setting does *not* affect virus scanning in archives at all. # # To disable this feature set this to 0. # A common useful setting is this option = 0, and Allow Password-Protected # Archives = no. That block password-protected archives but does not do # any filename/filetype checks on the files within the archive. # This can also be the filename of a ruleset. Maximum Archive Depth = 8 # Find zip archives by filename or by file contents? # Finding them by content is a far more reliable way of finding them, but # it does mean that you cannot tell your users to avoid zip file checking # by renaming the file from ".zip" to "_zip" and tricks like that. # Only set this to no (i.e. check by filename only) if you don't want to # reliably check the contents of zip files. Note this does not affect # virus checking, but it will affect all the other checks done on the contents # of the zip file. # This can also be the filename of a ruleset. Find Archives By Content = yes # Do you want to unpack Microsoft "OLE" documents, such as *.doc, *.xls # and *.ppt documents? This will extract any files which have been hidden # by being embedded in these documents. # There are one or two minor bugs in the third-party code that does the # processing of these files, so it can cause MailScanner to hang in very # rare cases. # ClamAV has its own OLE unpacking code, so you can safely switch this off # if you just rely on ClamAV for your virus-scanning. Note that this will, # however, disabled all filename and filetype checking of embedded files. # This can also be the filename of a ruleset. Unpack Microsoft Documents = yes # Should the attachments be compressed and put into a single zip file? # This can also be the filename of a ruleset. Zip Attachments = no # If the attachments are to be compressed into a single zip file, # this is the filename of the zip file. # This can also be the filename of a ruleset. Attachments Zip Filename = MessageAttachments.zip # If the original total size of all the attachments to be compressed is # less than this number of bytes, they will not be zipped at all. # This can also be the filename of a ruleset. Attachments Min Total Size To Zip = 100k # Attachments whose filenames end in these strings will not be zipped. # This can also be the filename of a ruleset. Attachment Extensions Not To Zip = .zip .rar .gz .tgz .jpg .jpeg .mpg .mpe .mpeg .mp3 .rpm .htm .html .eml # Do you want to add the plain text contents of Microsoft Word documents? # This feature uses the 'antiword' program available from # http://www.winfield.demon.nl/ # For those of you running on Linux, you can get RPMs and SRPMs from # http://www.volny.cz/zellerin/rpmmenu.html # It is switched off by default, as it causes a slight performance hit. # This can also be the filename of a ruleset. Add Text Of Doc = no # Location and full command of the "antiword" program # Using a ruleset here, you could have different output styles for # different people. # This can also be the filename of a ruleset. Antiword = /usr/bin/antiword -f # The maximum length of time the "antiword" command is allowed to run for 1 # Word document (in seconds) Antiword Timeout = 50 # MailScanner can automatically unpack small archives, # so you don't have to go through several extra clicks to extract small # files from automatically-generated emailed archives. # # This is the maximum number of files in each archive. If an archive contains # more files than this, we do not try to unpack it at all. # Set this value to 0 to disable this feature. # This can also be the filename of a ruleset. Unzip Maximum Files Per Archive = 0 # The maximum unpacked size of each file in an archive. Bigger than this, and # the file will not be unpacked. Setting this value to 0 will disable this # feature completely. # This can also be the filename of a ruleset. Unzip Maximum File Size = 50k # The list of filename extensions that should be unpacked. # This can also be the filename of a ruleset. Unzip Filenames = *.txt *.ini *.log *.csv # The MIME type of the files unpacked from the archive. # If you are using it for mostly text files, then use "text/plain". # If you are using it for mostly binary files, then use # "application/octet-stream". # This can also be the filename of a ruleset. Unzip MimeType = text/plain # # Virus Scanning and Vulnerability Testing # ---------------------------------------- # # Do you want to scan email for viruses? # A few people don't have a virus scanner licence and so want to disable # all the virus scanning. # If you use a ruleset for this setting, then the mail will be scanned if # *any* of the rules match (except the default). That way unscanned mail # never reaches a user who is having their mail virus-scanned. # # If you want to be able to switch scanning on/off for different users or # different domains, set this to the filename of a ruleset. # This can also be the filename of a ruleset. Virus Scanning = yes # Which Virus Scanning package(s) to use: # avast from www.avast.com # avastd the daemon version from www.avast.com # sophos from www.sophos.com # sophossavi (also from www.sophos.com, using the SAVI perl module) # savid (also from www.sophos.com, using the SAVID daemon) # bitdefender from www.bitdefender.com # esets from www.eset.com # f-secure from www.f-secure.com # f-secured the daemon version of f-secure from www.f-secure.com # f-protd-6 the daemon version of f-prot 6 from www.f-prot.com # clamav Removed, use clamd # clamavmodule Removed, use clamd # clamd (also from www.clamav.net using the clamd daemon) # *Note: read the comments above the "Incoming Work Group" setting*, # avg from www.grisoft.com # generic Other virus scanner: edit the generic-wrapper and generic-autoupdate # to fit your own needs. The output spec is in generic-wrapper, or # drweb from www.drweb.com (note: this is a commercial scanner) # kse Kaspersky Scan Engine from www.kaspersky.com # (note: this is a commercial scanner) # none No virus scanning at all. # # # Note: If you want to use multiple virus scanners, then this should be a # space-separated list of virus scanners. For example: # Virus Scanners = sophos f-prot mcafee # # Note: Make sure that you check that the base installation directory in the # 3rd column of virus.scanners.conf matches the location you have # installed each of your virus scanners. The supplied # virus.scanners.conf file assumes the default installation locations # recommended by each of the virus scanner installation guides. # # Note: If you specify "auto" then MailScanner will search for all the # scanners you have installed and will use all of them. If you really # want none, then specify "none". # # This *cannot* be the filename of a ruleset. Virus Scanners = auto # The maximum length of time the virus scanner is allowed to run # for 1 batch of messages (in seconds). Virus Scanner Timeout = 300 # Should I attempt to disinfect infected attachments and then deliver # the clean ones. "Disinfection" involves removing viruses from files # (such as removing macro viruses from documents). "Cleaning" is the # replacement of infected attachments with "VirusWarning.txt" text # attachments. # Less than 1% of viruses in the wild can be successfully disinfected, # as macro viruses are now a rare occurrence. So the default has been # changed to "no" as it gives a significant performance improvement. # # This can also be the filename of a ruleset. Deliver Disinfected Files = no # Strings listed here will be searched for in the output of the virus scanners. # It is used to list which viruses should be handled differently from other # viruses. If a virus name is given here, then # 1) The sender will not be warned that he sent it # 2) No attempt at true disinfection will take place # (but it will still be "cleaned" by removing the nasty attachments # from the message) # 3) The recipient will not receive the message, # unless the "Still Deliver Silent Viruses" option is set # Other words that can be put in this list are the 5 special keywords # HTML-IFrame : inserting this will stop senders being warned about # HTML Iframe tags, when they are not allowed. # HTML-Codebase : inserting this will stop senders being warned about # HTML Object Codebase/Data tags, when they are not allowed. # HTML-Script : inserting this will stop senders being warned about # HTML Script tags, when they are not allowed. # HTML-Form : inserting this will stop senders being warned about # HTML Form tags, when they are not allowed. # Zip-Password : inserting this will stop senders being warned about # password-protected zip files, when they are not allowed. # This keyword is not needed if you include All-Viruses. # All-Viruses : inserting this will stop senders being warned about # any virus, while still allowing you to warn senders # about HTML-based attacks. This includes Zip-Password # so you don't need to include both. # # The default of "All-Viruses" means that no senders of viruses will be # notified (as the sender address is always forged these days anyway), # but anyone who sends a message that is blocked for other reasons will # still be notified. # # This can also be the filename of a ruleset. Silent Viruses = HTML-IFrame All-Viruses # Still deliver (after cleaning) messages that contained viruses listed # in the above option ("Silent Viruses") to the recipient? # Setting this to "yes" is good when you are testing everything, and # because it shows management that MailScanner is protecting them, # but it is bad because they have to filter/delete all the incoming virus # warnings. # # Note: Once you have deployed this into "production" use, you should set # Note: this option to "no" so you don't bombard thousands of people with # Note: useless messages they don't want! # # This can also be the filename of a ruleset. Still Deliver Silent Viruses = no # Do you want to still scan the message for spam? # Setting this to yes will allow a message with a # silent virus to proceed with spam checks and not be deleted immediately. # Silent viruses will be replaced with a warning message by default. # # This can be a filename of a ruleset. Still Scan Silent Viruses = no # If Still Deliver Silent Viruses is yes, do you want to deliver the # message unmodified? # # Warning: This is dangerous and should only be used if the # silent viruses you are targeting are safe. # Even so, a message could still have other viruses that could # come through with this setting enabled on the message payload. # # MailScanner versions <= to 5.1.3-2 actually did this by default # when Still Deliver Silent Viruses was set to yes. This setting exists # to remove this behavior by default in 5.1.4 onward. # # The subject line will still be modified if configured to do so for # virus infected messages, which is consistent with the old behavior. # # This can be a filename of a ruleset. Still Deliver Silent Viruses Unmodified = no # Strings listed here will be searched for in the output of the virus scanners. # It works to achieve the opposite effect of the "Silent Viruses" listed above. # If a string here is found in the output of the virus scanners, then the # message will be treated as if it were not infected with a "Silent Virus". # If a message is detected as both a silent virus and a non-forging virus, # then the ___non-forging status will override the silent status.___ # In simple terms, you should list virus names (or parts of them) that you # know do *not* forge the From address. # A good example of this is a document macro virus or a Joke program. # Another word that can be put in this list is the special keyword # Zip-Password : inserting this will cause senders to be warned about # password-protected zip files, when they are not allowed. # This will over-ride the All-Viruses setting in the list # of "Silent Viruses" above. # Non-Forging Viruses = Joke/ OF97/ WM97/ W97M/ eicar # Some virus scanners now use their signatures to detect spam as well as # viruses. These "viruses" are called "spam-viruses". When they are found # the following header will be added to your message before it is passed to # SpamAssassin, listing all the "spam-viruses" that were found as a comma- # separated list. # This can also be the filename of a ruleset. Spam-Virus Header = X-%org-name%-MailScanner-SpamVirus-Report: # This defines which virus reports from your virus scanners are really the # names of "spam-viruses" as described in the "Spam-Virus Header" section # above. This is a space-separated list of strings which can contain "*" # wildcards to mean "any string of characters", and which will match the # whole name of the virus reported by your virus scanner. So for example # "HTML/*" will match all virus names which start with the string "HTML/". # The supplied example is suitable for F-Prot6 and the SaneSecurity # databases for ClamAV. The test is case-sensitive. # This cannot be a ruleset, it must be a simple value as described. Virus Names Which Are Spam = Sane*UNOFFICIAL HTML/* *Phish* # Should encrypted messages be blocked? # This is useful if you are wary about your users sending encrypted # messages to your competition. # This can be a ruleset so you can block encrypted message to certain domains. Block Encrypted Messages = no # Should unencrypted messages be blocked? # This could be used to ensure all your users send messages outside your # company encrypted to avoid snooping of mail to your business partners. # This can be a ruleset so you can just check mail to certain users/domains. Block Unencrypted Messages = no # Should archives which contain any password-protected files be allowed? # Leaving this set to "no" is a good way of protecting against all the # protected zip files used by viruses at the moment. # This can also be the filename of a ruleset. Allow Password-Protected Archives = no # Normally, you can still get the filenames out of a password-protected # archive, despite the encryption. So by default filename checks are still # done on these files. However, some people want to suppress this checking # as they allow a few people to receive password-protected archives that # contain things such as .exe's as part of their business needs. This option # can be used to suppress filename checks inside password-protected archives. # This can also be the filename of a ruleset. Check Filenames In Password-Protected Archives = yes # # Options specific to Sophos Anti-Virus # ------------------------------------- # # Anything on the next line that appears in brackets at the end of a line # of output from Sophos will cause the error/infection to be ignored. # Use of this option is dangerous, and should only be used if you are having # trouble with lots of corrupt PDF files, for example. # If you need to specify more than 1 string to find in the error message, # then put each string in quotes and separate them with a comma. # For example: #Allowed Sophos Error Messages = "corrupt", "format not supported", "File was encrypted", "The main body of virus data is out of date", "Password protected file" Allowed Sophos Error Messages = # The directory (or a link to it) containing all the Sophos *.ide files. # This is only used by the "sophossavi" virus scanner, and is irrelevant # for all other scanners. Sophos IDE Dir = /opt/sophos-av/lib/sav # The directory (or a link to it) containing all the Sophos *.so libraries. # This is only used by the "sophossavi" virus scanner, and is irrelevant # for all other scanners. Sophos Lib Dir = /opt/sophos-av/lib # SophosSAVI only: monitor each of these files for changes in size to # detect when a Sophos update has happened. The date of the Sophos Lib Dir # is also monitored. # This is only used by the "sophossavi" virus scanner, not the "sophos" # scanner setting. Monitors For Sophos Updates = /opt/sophos-av/lib/sav/*.ide # SophosSAVID only: location of the socket SAVID Socket = /var/lib/savdid/savdid.sock # # Options specific to ClamAV Anti-Virus # ------------------------------------- # # Removed # ClamAVModule only: monitor each of these files for changes in size to # detect when a ClamAV update has happened. # This is only used by the "clamavmodule" virus scanner, not the "clamav" # scanner setting. # Monitors for ClamAV Updates = /usr/local/share/clamav/*.cld /usr/local/share/clamav/*.cvd /var/lib/clamav/*.inc/* /var/lib/clamav/*.?db /var/lib/clamav/*.cvd # ClamAVModule only: set limits when scanning for viruses. # # The maximum recursion level of archives, # The maximum number of files per batch, # The maximum file of each file, # The maximum compression ratio of archive. # These settings *cannot* be the filename of a ruleset, only a simple number. # ClamAVmodule Maximum Recursion Level = 8 # ClamAVmodule Maximum Files = 1000 # ClamAVmodule Maximum File Size = 10000000 # (10 Mbytes) # ClamAVmodule Maximum Compression Ratio = 250 # Clamd only: configuration options for using the clamd daemon. # 1. The port to use when communicating with clamd via TCP connection # 2. The Socket, or IP to use for communicating with the clamd Daemon. # You enter either the full path to the UNIX socket file or the IP # address the daemon is listening on. # 3. The ClamD Lock file should be created by clamd init script in most # cases. If it is not then the entry should be blank. # 4. If MailScanner is running on a system with more then 1 CPU core (or # more than 1 CPU) then you can set "Clamd Use Threads" to "yes" to # speed up the scanning, otherwise there is no advantage and it should # be set to "no". # # None of these options can be the filenames of rulesets, they must be just # simple values. Clamd Port = 3310 Clamd Socket = /var/run/clamd.scan/clamd.sock Clamd Lock File = # /var/lock/subsys/clamd Clamd Use Threads = yes # There are now sets of signatures available from places such as # www.sanesecurity.co.uk which use ClamAV to detect spam. Some of these # signatures rely on being passed the whole message as one file. By setting # this option to "yes", each entire message is written out to the scanning # area, thus enabling these signatures to work reliably. # It has a slight speed impact but is worth it for the extra spam-spotting # ability. # # This option cannot be the filename of a ruleset, it must be "yes" or "no". ClamAV Full Message Scan = yes # # Options specific to F-Protd-6 Anti-Virus # ---------------------------------------- # # This is the port number used by the local fpscand daemon. 10200 is the # default value used by the F-Prot 6 installation program, and so should # be correct. # This option cannot be the filename of a ruleset, it must be a number. Fpscand Port = 10200 # # Options specific to Kaspersky Scan Engine (kse) # ----------------------------------------------- # kse only: configuration options for using the kse daemon. # 1. The port to use when communicating with kse via TCP connection # 2. The Socket, or IP to use for communicating with the kse Daemon. # You enter either the full path to the UNIX socket file or the IP # address the daemon is listening on. Kse Port = 9999 Kse Socket = /var/run/kse/kse.sock # Options specific to Avastd Anti-Virus # ------------------------------------- # This is the unix socket used by the local Avastd daemon. # /var/run/avast/scan.sock is the default location # This option cannot be the filename of a ruleset, it must be a path. Avastd Socket = /var/run/avast/scan.sock # # Options specific to F-Secure Anti-Virus (f-secured) # --------------------------------------------------- # This is the unix socket used by the local F-Secure daemon. # /tmp/.fsav-0 is the default location # This option cannot be the filename of a ruleset, it must be a path. Fsecure Socket = /tmp/.fsav-0 # # Removing/Logging dangerous or potentially offensive content # ----------------------------------------------------------- # # Do you want to scan the messages for potentially dangerous content? # Setting this to "no" will disable all the content-based checks except # Virus Scanning, Allow Partial Messages and Allow External Message Bodies. # This can also be the filename of a ruleset. Dangerous Content Scanning = yes # Do you want to allow partial messages, which only contain a fraction of # the attachments, not the whole thing? There is absolutely no way to # scan these "partial messages" properly for viruses, as MailScanner never # sees all of the attachment at the same time. Enabling this option can # allow viruses through. You have been warned. # This can also be the filename of a ruleset so you can, for example, allow # them in outgoing mail but not in incoming mail. Allow Partial Messages = no # Do you want to allow messages whose body is stored somewhere else on the # internet, which is downloaded separately by the user's email package? # There is no way to guarantee that the file fetched by the user's email # package is free from viruses, as MailScanner never sees it. # This feature is dangerous as it can allow viruses to be fetched from # other Internet sites by a user's email package. The user would just # think it was a normal email attachment and would have been scanned by # MailScanner. # It is only currently supported by Netscape 6 anyway, and the only people # who use it are the IETF. So I would strongly advise leaving this switched off. # This can also be the filename of a ruleset. Allow External Message Bodies = no # Do you want to check for "Phishing" attacks? # These are attacks that look like a genuine email message from your bank, # which contain a link to click on to take you to the web site where you # will be asked to type in personal information such as your account number # or credit card details. # Except it is not the real bank's web site at all, it is a very good copy # of it run by thieves who want to steal your personal information or # credit card details. # These can be spotted because the real address of the link in the message # is not the same as the text that appears to be the link. # Note: This does cause extra load, particularly on systems receiving lots # of spam such as secondary MX hosts. # This can also be the filename of a ruleset. Find Phishing Fraud = yes # While detecting "Phishing" attacks, do you also want to point out links # to numeric IP addresses. Genuine links to totally numeric IP addresses # are very rare, so this option is set to "yes" by default. If a numeric # IP address is found in a link, the same phishing warning message is used # as in the Find Phishing Fraud option above. # This can also be the filename of a ruleset. Also Find Numeric Phishing = yes # If this is set to yes, then most of the URL in a link must match the # destination address it claims to take you to. This is the default as it is # a much stronger test and is very hard to maliciously avoid. # If this is set to no, then just the company name and country (and any # names between the two, dependent on the specific country) must match. # This is not as strict as it will not protect you against internal # malicious sites based within the company being abused. For example, it would # not find www.nasty.company-name.co.uk pretending to be # www.nice.company-name.co.uk. But it will still detect most phishing attacks # of the type www.nasty.co.jp versus www.nice.co.jp. # Depending on the country code it knows how many levels of domain need to # be checked. # This can also be the filename of a ruleset. Use Stricter Phishing Net = yes # If a phishing fraud is detected, do you want to highlight the tag with # a message stating that the link may be to a fraudulent web site. # This can also be the filename of a ruleeset. Highlight Phishing Fraud = yes # Do you want to highlight links that do not show a URL to the user? Highlight Hidden URLs = no # Do you want Highlight Phishing in mailto: links? Highlight Mailto Phishing = yes # There are some companies, such as banks, that insist on sending out # email messages with links in them that are caught by the "Find Phishing # Fraud" test described above. # This is a space-separated list of the names of files which contain a # list of link destinations which should be ignored in the test. This may, # for example, contain the known websites of some banks. # See the file itself for more information. # This can only be the names of the files containing the list, it *cannot* # be the filename of a ruleset. Phishing Safe Sites File = %etc-dir%/phishing.safe.sites.conf # As an opposite to the "safe" list above, there is also a live continuously- # updated list of known bad sites, which will always trigger the "Find # Phishing Fraud" test described above. # This is a space-separated list of the names of files which contain # a list of link destinations which should always trigger the test. This # file should be updated hourly. # This can only be the name of the file containing the list, it *cannot* # be the filename of a ruleset. Phishing Bad Sites File = %etc-dir%/phishing.bad.sites.conf # This file lists all the countries that use 2nd-level and 3rd-level # domain names to classify distinct types of website within their country. # This cannot be the name of a ruleset, it is just a simple setting. Country Sub-Domains List = %etc-dir%/country.domains.conf # Do you want to allow