13/06/06

Install the following
ii  exim4          4.50-8         metapackage to ease exim MTA (v4) installati
ii  exim4-base     4.50-8         support files for all exim MTA (v4) packages
ii  exim4-config   4.50-8         configuration for the exim MTA (v4)
ii  exim4-daemon-h 4.50-8sarge2   exim MTA (v4) daemon with extended features,
ii  sa-exim        4.2-2          Use SpamAssassin at SMTP time with the Exim
ii  clamav         0.84-2.sarge.9 antivirus scanner for Unix
ii  clamav-base    0.84-2.sarge.9 base package for clamav, an anti-virus utili
ii  clamav-daemon  0.84-2.sarge.9 antivirus scanner daemon
ii  clamav-docs    0.84-2.sarge.9 documentation package for clamav, an anti-vi
ii  clamav-freshcl 0.84-2.sarge.9 downloads clamav virus databases from the In
ii  libclamav1     0.84-2.sarge.9 virus scanner library
ii  razor          2.670-1sarge2  spam-catcher using a collaborative filtering
ii  spamassassin   3.0.3-2        Perl-based spam filter using text analysis
ii  spamc          3.0.3-2        Client for SpamAssassin spam filtering
ii  courier-authda 0.47-4sarge4   Courier Mail Server - Authentication daemon
ii  courier-base   0.47-4sarge4   Courier Mail Server - Base system
ii  courier-imap   3.0.8-4sarge4  Courier Mail Server - IMAP server
ii  courier-imap-s 3.0.8-4sarge4  Courier Mail Server - IMAP over SSL
ii  courier-pop    0.47-4sarge4   Courier Mail Server - POP3 server
ii  courier-pop-ss 0.47-4sarge4   Courier Mail Server - POP3 over SSL
ii  courier-ssl    0.47-4sarge4   Courier Mail Server - SSL/TLS Support

Select multiple files in exim4-config (set dc_use_split_config to true in the /etc/exim4/update-exim.conf.conf file)

Create the Maildir directory
maildirmake ~/Maildir/

Modify the file /etc/exim4/update-exim4.conf.conf so that it contains:
dc_localdelivery=maildir_home

Edit /etc/default/spamassassin to enable spamd

update-exim4.conf

test with: exim4 -bV

start exim: /etc/init.d/exim4 start

check local address: exim4 -bt local_user@example.com

check sending a email:
exim4 -v mailbox_you_can_check@dom.ain
From: user@your.domain
To: mailbox_you_can_check@dom.ain
Subject: Testing exim
	          
Testing exim
.

To test with full debug output
exim4 -C /var/lib/exim4/config.autogenerated -d -bt user@example.com

To test the config coming from a specified ip address
exim4 -bh 192.168.1.10
HELO example.com
MAIL FROM: <user@example.com>
RCPT TO: <local_user@example.com>
DATA
Subject: something
your message here
.
QUIT

Add the following to your /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs file:
#

# This tells what virus scanner to use
av_scanner = clamd:/var/run/clamav/clamd.ctl

Edit /etc/exim4/conf.d/acl/40_exim4-config_check_data to inlude the following before the "# accept otherwise" line:

  # Reject messages that have serious MIME errors.
  # This calls the demime condition again, but it
  # will return cached results.
    deny message = Serious MIME defect detected ($demime_reason)
          demime = *
       condition = ${if >{$demime_errorlevel}{2}{1}{0}}

  # Reject file extensions used by worms.
  # Note that the extension list may be incomplete.
    deny message = $found_extension files not accepted here.
          demime = exe:com:vbs:bat:pif:scr

  # Reject messages containing malware.
    deny message = This message contains a virus ($malware_name) and has been rejected
         malware = *

In /etc/exim4/sa-exim.conf
SAEximRunCond: 1

add the clamav user to the Debian-exim group
adduser clamav Debian-exim

Be sure that /etc/clamav/clamd.conf contains a line that reads:
AllowSupplementaryGroups

/etc/init.d/clamav-daemon restart

Razor
open port 2703 and 7 on tcp for the mail server
$ razor-client           [creates symbolic links]
$ razor-admin --create   [creates the razor home]
$ razor-admin --register [registers an account]
1