Make sure we are prepared for some of the new features:mkdir /var/lib/amavis/tmp mkdir /var/lib/amavis/db mkdir /var/lib/amavis/var ln -s /etc/amavis/amavisd.conf /etc/amavisd.conf chown -R amavis:amavis /var/lib/amavis chmod -R 750 /var/lib/amavis
|
In this section, we download source, make multiple backup copies of our 20030616-p10 files
and create a copy of amavisd.conf-sample which is the configuration file we will work
with until we are ready to actually do the upgrade:
cd /usr/local/src wget http://www.ijs.si/software/amavisd/amavisd-new-2.2.1.tar.gz tar xzvf amavisd-new-2.2.1.tar.gz rm amavisd-new-2.2.1.tar.gz cp /usr/local/src/amavisd-new-2.2.1/amavisd /usr/sbin/amavisd-new-2.2.1 cp /usr/local/src/amavisd-new-2.2.1/amavisd.conf-sample /etc/amavis/amavisd.conf-2.2.1 cp /etc/amavis/amavisd.conf /etc/amavis/amavisd.conf-20030616 cp /etc/amavis/amavisd.conf /etc/amavis/amavisd.conf-20030616-extra-backup cp /usr/sbin/amavisd-new /usr/sbin/amavisd-new-20030616 cp /usr/sbin/amavisd-new /usr/sbin/amavisd-new-20030616-extra-backup grep -vE "^$|^#" /etc/amavis/amavisd.conf > /etc/amavis/amavisd.conf-20030616-short
It's a good idea to make sure all of the external modules amavisd-new requires are up to date. You should exercise caution here because in order to solve dependencies, apt-get may upgrade Perl. This is at times a bad thing, but I personally have had no problem when it does. You may possibly need to reinstall any Perl modules you installed via CPAN if apt-get upgrades Perl. I strongly suggest you have a good backup of your hard drive before you continue. apt-get update
apt-get install file libarchive-tar-perl libarchive-zip-perl libcompress-zlib-perl
libconvert-tnef-perl libconvert-uulib-perl libberkeleydb-perl
libmailtools-perl libdb4.3-dev libmime-perl libnet-perl libnet-dns-perl libconvert-binhex-perl
libnet-server-perl libunix-syslog-perl arj nomarch unrar pax
|
$MYHOME
$mydomain
$daemon_user
$daemon_group
$pid_file
$lock_file
$enable_db (new setting)
$enable_global_cache (new setting)
Note: If you get errors when you first start your 2.2.1 program up, the first thing I
would do is disable those two new settings. However, if you leave these settings disabled
you will loose some new features of 2.x.x (like amavisd-nanny). It is also a known
problem that on a busy server, BerkeleyDB may run out of locker entries and as a result
amavisd-new will begin refusing mail, causing mail to back up in the Postfix deferred queue.
$max_servers
$max_requests
Instead of the old @local_domains_acl, I used the new @local_domains_maps in the form:
@local_domains_maps = ( [ '.domain1.com', '.domain2.com', '.domain3.com' ] );
$relayhost_is_client (had to add this)
$insert_received_line
$unix_socketname
$inet_socket_port
$inet_socket_bind
Use the new default for @inet_acl, not the old one
Uncomment @mynetworks
(and the line below it) and change the IP addresses to match "mynetworks" in your Postfix main.cf (postconf mynetworks)
$LOGFILE
$log_level
is your choice, but in this version, set it to 2 to get useful log files
unless you are a busy site and need to reduce the size of the log files or simply
don't need the extra information. In that case, set to 0. I set mine to 0.
You most likely will not want to be annoyed by every message amavisd-new Blocks,
so edit this file using vi or the WinSCP editor:
vi /etc/logcheck/ignore.d.server/amavisd-new
At the bottom, you will find the text:
amavis\[[0-9]+\]: +(\([-0-9]+\) +)?(SPAM|Not-Delivered|Passed|BANNED|INFECTED)
Change this to:
amavis\[[0-9]+\]: +(\([-0-9]+\) +)?(Blocked|SPAM|Not-Delivered|Passed|BANNED|INFECTED)
There is a new $log_templ
read_l10n_templates
The Debian package maintainers created notification templates in different languages
in subdirectories in /etc/amavis. If you would like to continue to use these
templates, copy over the read_l10n_templates
parameter from your old config. If
you choose not to use them, amavisd-new will use the default (English) templates at
the bottom the amavisd-new source code.
$final_virus_destiny
$final_banned_destiny
$final_spam_destiny
$final_bad_header_destiny
Rather that use the old $viruses_that_fake_sender_re, use the new @viruses_that_fake_sender_maps provided.
$virus_admin (and possibly $spam_admin)
$mailfrom_notify_admin
$mailfrom_notify_recip
$mailfrom_notify_spamadmin
$hdrfrom_notify_sender
$QUARANTINEDIR
$virus_quarantine_to
$banned_quarantine_to (new setting)
$bad_header_quarantine_to (new setting)
These new parameters must be configured. I suggest creating a new mailbox to send messages
containing banned attachments to, "banned\@$mydomain", and treat them in a similar manner
to spam messages. You can use the same mailbox for bad headers. Messages with bad
headers do not get quarantined on my system because I have $final_bad_header_destiny = D_PASS;
Set your 'banned' email client's SMTP server to your final destination server (your Exchange server)
so when you forward mail out of this mailbox, it will not pass through the spamfilter again. If
you have not done so already, you may wish to also have a separate mailbox for viruses (virii).
$spam_quarantine_to
$X_HEADER_LINE
$defang_virus (new setting)
$defang_banned (new setting)
These will wrap up the message into an attachment and give the recipient a warning
about opening the attachment. It does not make the attachment safe to open. I personally do not defang, because I quarantine
these messages and personally review them. Messages that end up in a quarantine do not get defanged.
Use the new @keep_decoded_original_maps instead of the old $keep_decoded_original_re
$banned_filename_re
has changed quite a bit. Add or remove items to meet your needs.
Now is a good time to review what it is you ban. It is suggested to add wmf, emf and grp if not already present. @bypass_virus_checks_maps = (1);
if you wish to disable virus scanning.
$recipient_delimiter
$replace_existing_extension
$blacklist_sender_re and $whitelist_sender have been replaced with @score_sender_maps.
This
new method uses "soft" white or black listing by modifying the SpamAssassin score by the
numbers shown in the example. I suggest increasing the -3.0 negative scores (to something like
-15.0) to insure mail from these senders is received. If you have customized this
section, remember to add your senders here.
Some of our most important settings:
$sa_local_tests_only
$sa_tag_level_deflt
$sa_tag2_level_deflt
$sa_kill_level_deflt
$sa_dsn_cutoff_level
You may wish to uncomment "#$first_infected_stops_scan = 1;"
In the @av_scanners section, configure AV scanners as you did in the
old file. If you use ClamAV, make sure you edit the value after CONTSCAN
so it matches your old config. I personally delete all the virus scanners I don't use.
I keep ClamAV and BitDefender and delete or comment out all the rest. The
only reason I do this is because it lessens the amount of data displayed
when running amavisd-new debug. Remember that you must leave at least one
backup scanner uncommented, whether it is used or not.
OK, save your file, then let's give it a try:amavisd-new stop cp /usr/sbin/amavisd-new-2.2.1 /usr/sbin/amavisd-new cp /etc/amavis/amavisd.conf-2.2.1 /etc/amavis/amavisd.conf amavisd-new debug |
amavisd-new start
If things don't go well, you will want to revert to 20030616-p10 until your problems are solved:amavisd-new stop cp /usr/sbin/amavisd-new-20030616 /usr/sbin/amavisd-new cp /etc/amavis/amavisd.conf-20030616 /etc/amavis/amavisd.conf amavisd-new start |
If all goes well, make a backup copy of our new configuration file:cp /etc/amavis/amavisd.conf /etc/amavis/amavisd.conf-2.2.1-backup |
apt-get upgrade
or apt-get install amavisd-new
will clobber our new installation, either don't do either of these, or revert
back to 20030616-p10 during the upgrade, or use the instructions below to prevent
amavisd-new from upgrading. Either way, just make sure you keep backup
copies of each version of amavisd.conf and amavisd-new. If you used my
amavisd-new hack for deleting high scoring spam, then you will need to use that
document as a reference for modifying version 2.2.1.
To prevent the old version of amavisd-new from installing over our new one,
place the package on hold:echo "amavisd-new hold" | dpkg --set-selections If in the future, you would like to take amavisd-new off hold: echo "amavisd-new install" | dpkg --set-selections |