1

I'd like to setup my fresh server (ubuntu) for hosting my www.bolleboos.be website and enable sending of email from my php scripts. So... I installed apache, php, mysql, ... and for the mail exim4

Sending mail allready works fine and I also managed to get SPF working .

If I send a mail to check-auth@verifier.port25.com then it returns me

SPF check: pass
DomainKeys check: neutral
DKIM check: neutral
Sender-ID check: pass
SpamAssassin check: ham

So logical next step would be to enable DKIM

I created a 1024 bits private key with

#openssl genrsa -out dkim.private.key 1024

and then the public key with

#openssl rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM

These files are now in /etc/exim4/

Then I edited the file /etc/exim4/conf.d/transport/00exim4-configheader and added the following content

######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
# ORDER DOES NOT MATTER #
# Only one appropriate transport is called for each delivery. #
######################################################################
# A transport is used only when referenced from a router that successfully
# handles an address.

begin transports

DKIM_CANON = relaxed
DKIM_DOMAIN = bolleboos.be
DKIM_SELECTOR = dkim
DKIM_PRIVATE_KEY = /etc/exim4/dkim.private.key

After that I execute the following commands (as root user)

/etc/init.d/exim4 stop
update-exim4.conf
/etc/init.d/exim4 stop

All executes fine

I also added a few things to my DNS

My zone file looks like this now

$ORIGIN bolleboos.be.
$TTL 1800
bolleboos.be. IN SOA ns1.digitalocean.com. hostmaster.bolleboos.be. 1418477398 10800 3600 604800 1800
bolleboos.be. 1800 IN NS ns1.digitalocean.com.
bolleboos.be. 1800 IN NS ns2.digitalocean.com.
bolleboos.be. 1800 IN NS ns3.digitalocean.com.
bolleboos.be. 1800 IN A 128.199.43.113
*.bolleboos.be. 1800 IN CNAME bolleboos.be.
bolleboos.be. 1800 IN MX 10 mx.mailprotect.be.
bolleboos.be. 1800 IN MX 50 mx.backup.mailprotect.be.
bolleboos.be. 1800 IN TXT "v=spf1 a:bolleboos.be -all"
dkim._domainkey.bolleboos.be. 1800 IN TXT "TXT v=DKIM1; t=y; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDWdCBmsPYub6KXNdiuntRwQJ8y LLh1viv3YLeoNW7ayPDHXFpR3O1pcU3fHQimhSBH67KXpH7oWAfka09GRUCh7UBm iEbjldlrTXdX7QBr4Ff70vRIhBogkwN8rRPlF+c69lRkrALJp6psOD4D1Gwx58kZ LDQrM19qwVH+SKIaBQIDAQAB"

When I now send mail to the port25 checker, I still get message back with DKIM as neutral and it also says my mail was not signed. So it looks like exim doesn't sign my mail ?

Is there something I might have done wrong or can I check certain logfiles to see if something is not right ?

Kind regards, Bart

BELOW is the full header gmail shows me when I send a mail from my server to my email address: It might show usefull info ?

Delivered-To: educasoft@gmail.com
Received: by 10.70.95.36 with SMTP id dh4csp311478pdb;
        Sat, 13 Dec 2014 07:06:20 -0800 (PST)
X-Received: by 10.194.91.205 with SMTP id cg13mr37051885wjb.21.1418483179344;
        Sat, 13 Dec 2014 07:06:19 -0800 (PST)
Return-Path: <educa@bolleboos.be>
Received: from bolleboos.be (bolleboos.be. [128.199.43.113])
        by mx.google.com with ESMTPS id e7si8277602wic.29.2014.12.13.07.06.18
        for <educasoft@gmail.com>
        (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
        Sat, 13 Dec 2014 07:06:19 -0800 (PST)
Received-SPF: pass (google.com: domain of educa@bolleboos.be designates 128.199.43.113 as permitted sender) client-ip=128.199.43.113;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of educa@bolleboos.be designates 128.199.43.113 as permitted sender) smtp.mail=educa@bolleboos.be
Received: from localhost ([127.0.0.1] helo=www.bolleboos.be)
    by bolleboos.be with esmtp (Exim 4.82)
    (envelope-from <educa@bolleboos.be>)
    id 1XzoGv-0000sw-Me
    for educasoft@gmail.com; Sat, 13 Dec 2014 10:06:17 -0500
Date: Sat, 13 Dec 2014 10:06:17 -0500
To: Bart Libert <educasoft@gmail.com>
From: Bolleboos setfrom <educa@bolleboos.be>
Reply-To: Bolleboos setfrom <educa@bolleboos.be>
Subject: Testmailtje met phpmailer class
Message-ID: <23272ca210edc22079917cd8bffdcf23@www.bolleboos.be>
X-Priority: 3
X-Mailer: PHPMailer 5.2.6 (https://github.com/PHPMailer/PHPMailer/)
MIME-Version: 1.0
Content-Type: multipart/alternative;
    boundary="b1_23272ca210edc22079917cd8bffdcf23"

--b1_23272ca210edc22079917cd8bffdcf23
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Welkom bij  Hier is een pinguin:


--b1_23272ca210edc22079917cd8bffdcf23
Content-Type: multipart/related;
    boundary="b2_23272ca210edc22079917cd8bffdcf23"

--b2_23272ca210edc22079917cd8bffdcf23
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Welkom bij <img src="cid:logo"> <br><br>Hier is een pinguin: <img src="cid:pinguin">
  • I am not familiar with exim, but the neutral DKIM result indicates there is no DKIM header in the message, which would appear in the authentication-results portion of the header at the receiving server. – Paul Dec 13 '14 at 16:20
  • 1
    You are missing the step to actually enable DKIM in exim4. The shown headers don't contain anything related to DKIM, thus exim does not sign at all. – sebix Dec 13 '14 at 16:59
  • 1
    DKIM_* directives should be placed inside the outgoing router, not just inside begin routers section. – Kondybas Dec 15 '14 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.