How to setup caff and exim to work on Fedora 16

From IdeaNet
Jump to: navigation, search

Exim configuration

  • We need to install exim and system-switch-mail:
$ sudo yum install exim system-switch-mail
  • Use system-switch-mail to set Exim as the default MTA used by the system:
$ sudo system-switch-mail
  • Configure Exim to deliver emails through your ISP smtp server by editing the file /etc/exim/exim.conf
  • In the ROUTERS CONFIGURATION, find and put in comment the following line, like this:
#  driver = dnslookup
#  domains = ! +local_domains
#  transport = remote_smtp
#  ignore_target_hosts = :
#  no_more
  • Find or add the following line just below the commented dnslookup: instance:
  driver = manualroute
  domains = ! +local_domains
  transport = remote_smtp
  route_data = <your_isp_smtp_server_hostname_here>
  • ALTERNATIVELY you can configure exim to use an SSH tunnelled smtp server.
  • For instance is redirected to with:
$ ssh -fN
  • You must then add a new transport instance with specification of the smarthost port (10025 in our example). In the ROUTERS CONFIGURATION, add a new router as follows:
  driver = smtp
  port = 10025
  • Adapt the smarthost: instance to use the new transport instance (called remote_tun_smtp in our example) and the local address used for the redirection ( in our example):
  driver = manualroute
  domains = ! +local_domains
  transport = remote_tun_smtp
  route_data =
  • Finally, make it possible for your user to use the exim -r option (equivalent to sendmail -f option). Edit /etc/exim/exim.conf and add under the MAIN CONFIGURATION section the line:
trusted_users = <you_username_here>:root:exim
Now (re)start exim:
$ sudo service exim stop; sleep 5; sudo service exim start
To make exim start upon reboots:
$ sudo chkconfig --add exim

caff configuration

  • Install caff utility. caff is provided by the package pgp-tools:
$ sudo yum install pgp-tools
  • Configure caff by editing your ~/.caffrc file as follows:
$CONFIG{'owner'} = 'Firstname Lastname';
$CONFIG{'email'} = 'user@domain.tld';
$CONFIG{'reply-to'} = 'user@domain.tld';
$CONFIG{'mailer-send'} =  [ 'sendmail', '-f user@domain.tld' ];
$CONFIG{'keyid'} = [ qw{<HERE_16_DIGITS_OF_YOUR_PGP_KEY>} ];
  • Now you can start signing PGP keys with:
caff --no-download --key-file <file_containing_exported_keys> <key_ID1> <key_ID2> <key_ID3> ...

and check that emails are correctly sent by inspecting the file /var/log/exim/main.log