1

Topic: DKIM key for subdomain

Hi,

I have added DKIM record for my domain.com, how can we add similar key for subdomains like mail.domain.com and www.domain.com

php scripts send email using apache@www.domain.com

2

Re: DKIM key for subdomain

Here's FAQ:
http://www.iredmail.org/forum/post1807.html#p1807

Don't forget to add DNS record for subdomain.

3

Re: DKIM key for subdomain

ZhangHuangbin wrote:

Here's FAQ:
http://www.iredmail.org/forum/post1807.html#p1807

Don't forget to add DNS record for subdomain.

Hi Zhang ..

My domain name is airsurvey.net

hostname is set to mail.airsurvey.net

I have added dkim record using amavisd genrsa airsurvey.net, added same record in DNS.

amavisd testkeys
TESTING#1: dkim._domainkey.airsurvey.net    => pass

Now since my server name is mail.airsurvey.net, my php scripts are sending emails using mail.airsurvey.net

Do i need to add separate dkim key in amavisd for mail.airsurvey.net?

or how can I set that all server emails are having airsurvey.net and not mail.airsurvey.net or www.airsurvey.net?

Please let me know.

Richard

4

Re: DKIM key for subdomain

Add one more DKIM key (for mail.airsurvey.net) is ok. Another way is address rewrite. Reference:
http://www.postfix.org/ADDRESS_REWRITIN … masquerade

5

Re: DKIM key for subdomain

ZhangHuangbin wrote:

Add one more DKIM key (for mail.airsurvey.net) is ok. Another way is address rewrite. Reference:
http://www.postfix.org/ADDRESS_REWRITIN … masquerade

Hi Zhang,

The iredmail main.cf does not having the parameter mentioned in above document.

So I added

masquerade_domains = mail.airsurvey.net airsurvey.net

Is that correct?  what will be the syntax to add two more domains?

also is there any way to have multiple Reverse mapping to a servers?
e.g. I am hosting 3 virtual mail domains on this server, but server reverse mapping only happens to airsurvey.net


Richard

6

Re: DKIM key for subdomain

You should use this setting:

masquerade_domains = airsurvey.net

Quote from postfix web site:

Example:

/etc/postfix/main.cf:
    masquerade_domains = foo.example.com example.com

strips "any.thing.foo.example.com" to "foo.example.com", but strips "any.thing.else.example.com" to "example.com".

7

Re: DKIM key for subdomain

vasaiflowers.com wrote:

also is there any way to have multiple Reverse mapping to a servers?
e.g. I am hosting 3 virtual mail domains on this server, but server reverse mapping only happens to airsurvey.net

It's better to contact your ISP (DNS service provider), ask them to achieve this.