Gostaria de configurar meu novo servidor (ubuntu) para hospedar meu site www.bolleboos.be e ativar envio de e-mail dos meus scripts php. Então ... eu instalei o apache, php, mysql, ... e para o e-mail exim4
O envio de e-mail já funciona bem e eu também consegui fazer o SPF funcionar.
Se eu enviar um email para [email protected], ele me retorna
SPF check: pass
DomainKeys check: neutral
DKIM check: neutral
Sender-ID check: pass
SpamAssassin check: ham
Então, o próximo passo lógico seria ativar o DKIM
Eu criei uma chave privada de 1024 bits com
#openssl genrsa -out dkim.private.key 1024
e depois a chave pública com
#openssl rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM
Estes arquivos estão agora em / etc / exim4 /
Depois eu editei o arquivo /etc/exim4/conf.d/transport/00exim4-configheader e adicionei o seguinte conteúdo
######################################################################
# 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
Depois disso eu executo os seguintes comandos (como usuário root)
/etc/init.d/exim4 stop
update-exim4.conf
/etc/init.d/exim4 stop
Tudo funciona bem
Também adicionei algumas coisas ao meu DNS
Meu arquivo de zona é assim agora
$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"
Quando agora envio e-mails para o verificador da porta 25, ainda recebo a mensagem com o DKIM como neutro e também informa que meu e-mail não foi assinado. Então parece que o exim não assina o meu email?
Há algo que eu possa ter feito errado ou posso verificar certos arquivos de log para ver se algo não está certo?
Atenciosamente, Bart
ABAIXO é o cabeçalho completo que o gmail mostra quando eu envio um e-mail do meu servidor para o meu endereço de e-mail: ele pode mostrar informações úteis?
Delivered-To: [email protected]
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: <[email protected]>
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 <[email protected]>
(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 [email protected] 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 [email protected] designates 128.199.43.113 as permitted sender) [email protected]
Received: from localhost ([127.0.0.1] helo=www.bolleboos.be)
by bolleboos.be with esmtp (Exim 4.82)
(envelope-from <[email protected]>)
id 1XzoGv-0000sw-Me
for [email protected]; Sat, 13 Dec 2014 10:06:17 -0500
Date: Sat, 13 Dec 2014 10:06:17 -0500
To: Bart Libert <[email protected]>
From: Bolleboos setfrom <[email protected]>
Reply-To: Bolleboos setfrom <[email protected]>
Subject: Testmailtje met phpmailer class
Message-ID: <[email protected]>
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">