2

I'm trying to add a DKIM key to an additional domain on my Ubuntu mail server, I am trying to add the following block of code to the amavisd.conf file

    $enable_dkim_verification = 1;
    $enable_dkim_signing = 1;
    dkim_key('example.com', 'foo', '/var/db/dkim/example-foo.key.pem');
    @dkim_signature_options_bysender_maps = (
    { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
    @mynetworks = qw(0.0.0.0/8 127.0.0.0/8 10.0.0.0/8 172.16.0.0/12
               192.168.0.0/16);  # list your internal networks

However, on my setup the amavisd.conf file is split into the following files:

  • 01-debian
  • 05-domain_id
  • 05-node_id
  • 15-av_scanners
  • 15-content_filter_mode
  • 20-debian_defaults
  • 21-ubuntu_defaults
  • 25-amavis_helpers
  • 30-template_localization
  • 40-policy_banks
  • 50-user
  • 50-user.2014.02.20.10.30.51

Can you advise which file I need to add this to?

Thanks

Danny Green
  • 121
  • 3

1 Answers1

2

For user-defined configuration you should placed in 50-user file. This file will override the other-dkim-parameter, for example in 20-debian_defaults and 21-ubuntu_defaults.

user@ubuntu:/etc/amavis/conf.d$ grep dkim  *
20-debian_defaults:$enable_dkim_verification = 0; #disabled to prevent warning
21-ubuntu_defaults:$enable_dkim_verification = 1;

Here the content of 50-user file

use strict;

#
# Place your configuration directives here.  They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#


#------------ Do not modify anything below this line -------------
1;  # ensure a defined return

Some References: this page

masegaloeh
  • 18,236
  • 10
  • 57
  • 106