Sheeva0 server setup

Using Kuro Sheeva, I run a host named sheeva0.

It runs ssh, exim4, and bind.


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, and its IP address. Besides, I do:


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 = --*

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
  driver = redirect
  domains = dsearch;/etc/exim4/virtual
  data = ${lookup{$local_part}lsearch{/etc/exim4/virtual/$domain}}
  file_transport = address_file


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


I edit /etc/default/spamassassin:


and run:

# /etc/init.d/spamassassin start


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.