1 (edited by ryba 2015-11-17 03:06:17)

Topic: Multiple domains setup: issues with DKIM keys / amavisd , etc.

==== Required information ====
- iRedMail version 0.9.2
- Distrib: CentOS 7.1
- Backend: MariaDB (MySQL)
- Web server: Nginx
- No iRedAdminPRO
====

Hello.

When my setup has only one domain - everything works OK:
- spam headers appear in every email;
- emails with spam scores higher than X.Y are marked as ***SPAM*** and automatically moved to JUNK folder
- DKIM keys for the only domain operate OK

When I add additional domains (I need to have a total of 4), I seem to have issues with creating DKIM keys and making sure amavisd and/or spamassassin know that secondary domains mail have to be processed too.

My previous installation was 0.8.1 on Ubuntu 12.04, where I had to edit /etc/amavis/conf.d/50-user, adding domain names to:

@local_domains_maps = ['mx.xxx.com', 'secondary1.com', 'secondary2.com']

and adding DKIM support by adding the line like:

dkim_key("secondary1.com", "dkim", "/var/lib/dkim/secondary1.com.pem");

I can't seem to locate a '50-user' file under amavis configuration folder.
CentOS stores amavisd.conf at/etc/amavisd/amavisd.conf, but '50-user' and a bunch of other similar files seem not to be there.

/etc/amavisd directory listing is provided below:

drwxr-xr-x.  2 root root    4096 Nov 14 11:06 .
drwxr-xr-x. 93 root root   12288 Nov 14 12:33 ..
-rw-r-----.  1 root amavis 26325 Nov 15 21:56 amavisd.conf
-rw-r--r--.  1 root root   36776 Nov 14 11:06 amavisd.conf.2015.11.14.10.58.46

What am I doing wrong and what's the path to solve the issue?

Thank you.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Multiple domains setup: issues with DKIM keys / amavisd , etc.

To have a multi domain setup the following is required:
- @local_domains_maps needs to have all domains listed
- As you self write a dkim_key is needed for every domain
- @dkim_signature_options_bysender_maps needs an entry for every domain like:
  'secondary1.com' => { d => 'secondary1.com', a => 'rsa-sha256', ttl => 10*24*3600 },
  ......
- $enable_dkim_verification = 1;
- $enable_dkim_signing = 1;

3

Re: Multiple domains setup: issues with DKIM keys / amavisd , etc.

Mir:
Thank you, but my primary question was - how do I find the location for the files to edit?
I can't find /etc/amavis/conf.d/50-user, and on my previous installation that was the file I had to edit.
There must be some difference between Ubuntu and RHEL/CentOS installation that I am unaware of.

Thank you

4

Re: Multiple domains setup: issues with DKIM keys / amavisd , etc.

ryba wrote:

Thank you, but my primary question was - how do I find the location for the files to edit?

*) CentOS (and FreeBSD, OpenBSD) uses only one amavisd config file, /etc/amavisd/amavisd.conf.
*) Debian, Ubuntu split Amavisd config file to multiple files under /etc/amavis/conf.d/.

So, just update /etc/amavisd/amavisd.conf on CentOS please.

Reference: http://www.iredmail.org/docs/file.locat … ml#amavisd

5

Re: Multiple domains setup: issues with DKIM keys / amavisd , etc.

Thank you for the list of files and their locations. It helps a lot.