Sheeva0 server setup

Using Kuro Sheeva, I run a host named sheeva0.

It runs ssh, exim4, and bind.

Hostname

I edit /etc/hostname and /etc/hosts.

More packages

I installed following packages.

  • sa-exim
  • spamassassin
  • ntp
  • fail2ban
  • dovecot-imapd

Note that installing sa-exim doesn't mean installing spamassassin. It is because sa-exim only use spamc, the spamassassin client. It is possible to configure spamc to access spamassassin on different server.

Exim configuration

I edit /etc/exim4/update-exim4.conf.conf. I set dc_other_hostnames for domains it accepts. I set dc_local_interfaces for interfaces of the host, 127.0.0.1 and its IP address. Besides, I do:

dc_eximconfig_configtype='internet'
dc_use_split_config='true'
dc_localdelivery='maildir_home'

For local_user: setting in /etc/exim4/router/900_exim4-config_local_user, I add following two lines, so that gniibe--$folder@ goes to different IMAP folder.

local_part_suffix = --*
local_part_suffix_optional

I add /etc/exim4/conf.d/main/01_exim4-config_listmacrosdefs_maildir with followng content:

MAILDIR_HOME_MAILDIR_LOCATION=$home/Maildir${if def:local_part_suffix {/.${substr_2:$local_part_suffix}}}

I add /etc/exim4/conf.d/router/401_exim4-config_virtual with following content, so that I can have /etc/exim4/virtual/$domain to have aliases.

# This router handles virtual domains
#
virtual:
  driver = redirect
  domains = dsearch;/etc/exim4/virtual
  data = ${lookup{$local_part}lsearch{/etc/exim4/virtual/$domain}}
  file_transport = address_file

/etc/exim4/sa-exim.conf

Check the setting of SAEximRunCond, leave commenting out of the line:

# SAEximRunCond: 0

and run:

# update-exim4.conf.template -r
# update-exim4.conf
# /etc/init.d/exim4 restart

/etc/default/spamassassin

I edit /etc/default/spamassassin:

ENABLED=1

and run:

# /etc/init.d/spamassassin start

/etc/dovecot/dovecot.conf

I edit /etc/dovecot/dovecot.conf:

protocols = imaps
[...]
mail_location = maildir:~/Maildir

and run:

# /etc/init.d/dovecot restart

Run sa-update

I do:

# sa-update

I don't know if it is better to run sa-update by cron.