Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > General Support > Topic : Guide - How to setup DKIM and SPF with Exim



Normal Mode | Print  

 Guide - How to setup DKIM and SPF with Exim (34 Replies, Read 9601753 times)
myleene
Group: Member
Post Group: Newbie
Posts: 4
Status:
Applies to:
- Webuzo 2.3.4
- Centos 6.5 64bit
- Exim 4.72
- A dedicated server having its own IP
(*) It should work for different setups with minor adjustments.


Detail: I couldn't find a guide detailing steps to do it and had to spend 2-3 hours on how to do it. I didn't even know what "DKIM" or "SPF" meant before my email started being rejected by GMail and I stopped receiving emails from my WordPress without me changing anything.

Please note that I'm a novice in linux and that there may surely be an easier method to do this. I'm sharing as I really like Webuzo and I believe it may help others.


Steps:

1) Start an ssh session and go to /etc/exim/
(*) It's not required, but it'll help in the next few steps.

2) Generate a private and public key to sign your messages with openssl:
#openssl genrsa -out dkim.private.key 1024
(*) It works well if you get "Returned error code 0" and you see a file named "dkim.private.key" in that directory.

3) Extract the public key from the private key
#openssl rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM
(*) A new file named "dkim.private.key" will be created in this directory.

4) Open exim.conf to modify it:
Replace:
remote_smtp:
    driver = smtp
With:
remote_smtp:
    driver = smtp
    dkim_domain = ${lc:${domain:$h_from:}}
    dkim_selector = x
    dkim_private_key = /etc/exim/dkim.private.key
    dkim_canon = relaxed
(*) It allows all domains linked to this server to use DKIM and use the private key you just created. if you opt to change "dkim_selector" it'll need to be adjusted in later steps.

5) Restart Exim
(*) I go to "services" in Webuzo, but there are other options.

6) Adjust your DNS settings

6.1) If you don't have a mx record, create one:
Priority: 1
Host: @
Points to: @

6.2) Create a TXT setting specifying your SPF settings:
Host: @
txt value: v=spf1 a mx ip4:999.999.9.99 ip6:9999:9999:99:3a32:: ~all
(*) Adjust to your IPs. It's the only thing required for SPF to work.

6.3) Create a TXT setting specifying your DKIM:
Host: x._domainkey
txt value: v=DKIM1; p=<your public key>
(*) If you changed "dkim_selector" under "Host", "x" will need to be adjusted accordingly.


How to test:
- https://www.dnswatch.info/dkim/create-dns-record
- https://www.mail-tester.com/spf-dkim-check

Then: send an email from this address to an external email and check if both SPF and DKIM are specified correctly in the header. You should see "spf=pass" and "dkim=pass" as well as other configurations depending on which email provider you send to. Hotmail and GMail are both good to confirm these settings.
IP: --   


Threads
 myleene   Guide - How to setup DKIM and SPF with Exim (34 Replies, Read 9601753 times)
    |--  myleene   I forgot step...   on April 26, 2015, 8:34 pm
    |--  peopleinside   @myleene thanks for...   on July 6, 2015, 9:38 am
    |--  peopleinside   All solved, all...   on July 6, 2015, 4:50 pm
    |--  awan89   Applies to: -...   on December 22, 2015, 4:59 am
    |--  peopleinside   Hi awan89, in...   on December 22, 2015, 1:46 pm
    |--  awan89   Hi People Inside,...   on December 22, 2015, 3:44 pm
    |--  peopleinside   Hi awan89, yes...   on December 22, 2015, 5:31 pm
    |--  awan89   Hi Master -...   on December 22, 2015, 6:25 pm
    |--  awan89   Sory attachment not...   on December 22, 2015, 6:26 pm
    |--  awan89   The result -0.001...   on December 22, 2015, 6:32 pm
    |--  peopleinside   Sorry awan89 this...   on December 22, 2015, 7:44 pm
    |--  awan89   Hi PeopleInside, The...   on December 23, 2015, 8:49 am
    |--  peopleinside   Hi awan89, thank...   on December 23, 2015, 12:24 pm
    |--  awan89   Hi PepopleInside, Ahh...   on December 23, 2015, 12:44 pm
    |--  peopleinside   Hi, thank you...   on December 23, 2015, 12:58 pm
    |--  awan89   Hi PeopleInside, The...   on December 23, 2015, 2:59 pm
    |--  peopleinside   Hi, I think...   on December 23, 2015, 3:02 pm
    |--  awan89   Hi PeopleInside, Good...   on December 23, 2015, 3:35 pm
    |--  peopleinside   I think baliavata.baliavata.com...   on December 23, 2015, 3:39 pm
    |--  awan89   As you know,...   on December 23, 2015, 3:45 pm
    |--  seandex   Hi awan89, yes...   on April 18, 2017, 9:48 am
    |--  peopleinside   Hello~ I used...   on April 18, 2017, 9:53 am
    |--  peopleinside   Usually if you...   on April 18, 2017, 9:57 am
    |--  seandex   Usually if you...   on April 19, 2017, 1:08 pm
    |--  peopleinside   I discovered today...   on April 19, 2017, 1:17 pm
    |--  seandex   I discovered today...   on April 19, 2017, 1:25 pm
    |--  peopleinside   seandex, help you...   on April 19, 2017, 1:30 pm
    |--  seandex   seandex, help you...   on April 19, 2017, 1:51 pm
    |--  seandex   Hey! I got...   on April 19, 2017, 2:11 pm
    |--  peopleinside   Hey! I got...   on April 19, 2017, 2:55 pm
    |--  nitins013   How can i...   on November 3, 2017, 10:10 am
    |--  peopleinside   How can i...   on November 3, 2017, 10:17 am
    |--  nitins013   Dkim not added...   on November 3, 2017, 10:31 am
    |--  nikhil89   Dkim not added...   on November 8, 2017, 7:19 am

« Previous    Next »

Normal Mode | Print  



Users viewing this topic
9 guests, 0 users.


All times are GMT. The time now is April 28, 2024, 8:51 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.045