Moeilijkheidsgraad: expert

Inhoud

Table of Contents
minLevel1
maxLevel1

Leerdoelen

Na het lezen van dit artikel zul je in staat zijn om:

  • SPF-records en DKIM configureren

  • SPF-records en DKIM testen

Waarom SPF of DKIM gebruiken?

Mailen vanaf Werkplekbeheer waarbij het van-contact van uw eigen domein is, kan ertoe leiden dat uw e-mail door een ontvangende mailserver als "spam" wordt bestempeld. Er zijn verschillende stappen die kunnen worden genomen om dit probleem te voorkomen.

...

titleSPF (Sender Policy Framework)

SPF (Sender Policy Framework)

...

Why use email domain authentication?

By default emails sent via Workplace Management are sent via the Spacewell mail server. However, it is often desired to make these email appear to be sent via the clients email address*.

The email itself will still be sent via the Spacewell email server, but the email will look like it originated from the specified client email address. This can lead to the email being labeled as spam by a receiving mail server. This is most often the case if the receiving mail server is the same as the server the email pretends to be from. (So any email sent via Workplace Management to the employees of the client)

There are several options that can be taken to prevent this problem.

*Most likely, a contractor that gets a work order email, should receive this email from for example ‘facilities@clientname.com’ instead of 'norely@spacewell.com). See email settings part in the client settings article for information on how to set this up

Add an SPF (Sender Policy Framework) record to the clients DNS

By having the client add the necessary SPF record to their DNS, the receiving mailserver can verify that Workplace Management is allowed to send emails on behalf of the clients domain. The following inclusion needs to be done on the DNS:

Code Block
include:_spf.axxerion.com

Als je meer informatie wilt over SPF, raadpleeg dan de documentatie die online te vinden is, zoals dit bericht van DMARCIAN.

De spf-record testen

...

If you would like to have more information in regards to SPF, please refer to the documentation that can be found online like this post from DMARCIAN.

Testing the SFP record

If you want to test if the SFP record is added correctly, you can use free online tool to see if the spf record is available. Easy to use tools are:

...

DKIM (Domain Keys Identified Mail)

DKIM (Domain Keys Identified Mail)

...

A second method, which can be used in conjunction with the previous, is DKIM.

...

De sleutel genereren

...

Navigeer binnen Workplace Management naar Setup via het menu aan de linkerkant of de tegel 'Setup' op het dashboard.

...

Navigeer naar het tabblad "E-mail" en druk op het pictogram voor "Ondertekendomeinen".

...

Klik op "nieuw".

...

With DKIM, a key is generated within Workplace Management, which is in turn added to the DNS. For more in depth information about DKIM, please refer to the documentation that can be found online like this post from DMARCIAN.

Generating the key

  1. Within Workplace Management, navigate to the client settings via the tile on the dashboard.

  2. Navigate to the tab “Email” and press on the icon for “Signing domains”

    Image Added
  3. Click on “new”

  4. Fill in the following fields:

...

    • Active: if the DKIM record

...

    • is active

...

    • DKIM selector:

...

    • This is used by the receiving agent or client to retrieve the public key from the DKIM DNS text record, which has the name: <selector>._domainkey.

...

    • <domainmame>

...

Klik op het pictogram rechtsboven met de sleutel om een private en publieke sleutel te genereren

...

Als de persoonlijke sleutel extern gegenereerd en gecodeerd is, vul dan het wachtwoord voor deze privésleutel in.

...

Kopieer de PUBLIC key en deel deze met je IT-afdeling, want zij moeten dit toevoegen aan hun DNS. Zorg ervoor dat de DKIM-instelling actief is zodra het record is toegevoegd aan de DNS.

...

Verstuur een test e-mail van Axxerion en controleer of deze correct is ondertekend


Achtergrondinformatie over de niet-wijzigbare velden

...

Publieke sleutel: De publieke sleutel wordt geëxtraheerd uit de privésleutel en kan niet worden bewerkt.

...

PrivateKey: De privésleutel moet in PEM-formaat zijn. Voor DKIM moet de privésleutel een RSA-sleutel zijn. Merk op dat een nieuw sleutelpaar kan worden gegenereerd met de paginafunctie 'Sleutelpaar genereren'. Het is ook mogelijk om een privésleutel van een externe bron in te voeren. De privésleutel wordt altijd versleuteld opgeslagen met een nieuw gegenereerd sterk wachtwoord.

...

Lengte: De lengte van de privésleutel is het aantal bits van de 'modulus' van de privésleutel. Momenteel is alleen de waarde2048 toegestaan.

DKIM probleemoplossing

...

Bepaal de domeinnaam van de afzender, bijvoorbeeld "client.com".

...

Controleer of het domein van de e-mailheaders "Van:" en "Mail van:" aanwezig is in de domeinen voor e-mailondertekening en of het actief is (zie hoofdstuk DKIM-mailondertekening configureren hierboven).

...

Zorg ervoor dat het DNS TXT-record van het domein dat de e-mail ondertekent aanwezig is in het DNS van het verzendende domein. Je kunt de volgende website gebruiken om het DNS-record te controleren: DKIM-kern

...

  1. It is possible to configure multiple domains using the same specific selector for the DKIM record.
    E.g. fill in ‘spacewell’ or ‘workplace-management’ so you can easily recognize that the DNS text record that you might request

  2. Click on the top right icon with the key to generate a private and public key

  3. If the private key was externally generated and is encrypted, fill in the password for this private key.

    Image Added
  4. Copy the PUBLIC key and share this with the customers IT department as they need to add this to their DNS. Make sure the DKIM setting is active once the record has been added to the DNS.

  5. Send a test email from Workplace management and validate that is signed correctly

Background information on the non-editable fields

  • Hash Algorithm:The hashing algorithm used for the DKIM signature. Currently only SHA-256 is allowed.

  • Public Key in PEM format : The public key is extracted from the private key and is not editable.

  • Private Key in PEM format : The private key must be in PEM format. For DKIM the private key must be a RSA key. Note that a new key pair can be generated with the page function 'Generate key pair'. It is also possible to enter a private key from an external source. Note that the private key is always stored in an encrypted format by a newly generated strong password.

  • Key length (bits) : The length of the private key is the number of bits of the 'modulus' of the private key. Currently only value2048 is allowed.

DKIM troubleshooting

  1. Determine the sender domain name, for example ‘http://client.com

  2. Check that the domain of mail headers "From:" and "Mail from:" is present in the Email Signing domains and that it is active (see chapter Configure DKIM mail signing above).

  3. Make sure the DNS TXT record of the email signing domain is present in the DNS of the sending domain. You can use the following website to vailidate the DNS entry: DKIM Core

  4. Send a mail from the Workplace Management client layer to you own mail account:

    1. Contact -> Mailings ->

...

    1. Create new mailing

...

    1. Add sender contact. The email of the sender contact must match one of the signing domains defined in this client layer, for example: testdkim@somedomain.com

...

Voeg een of meer contactpersonen voor ontvangers toe, dit kan je eigen e-mailadres zijn.

...

Klik op "Bericht verzenden". Het kan even duren voordat de mail de status "verzonden" heeft. Gebruik Vernieuwen om de laatste status weer te geven.

...

Controleer of de post is ontvangen in de mailbox.

    1. Add one or more recipient contacts, this can be you own email address.

    2. Click "Send message"l, note that it can take some time before the mail goes to status "sent". Use refresh to show the latest status.

    3. Check if the mail is received in the mailbox.

    4. Open the email message source and make sure the DKIM-Signature header is present, for example:

      Code Block
      DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; t=1467293263;
      	s=selector1; d=dkimtest.axxerion.com;
      	h=From:To:Message-ID:Subject:MIME-Version:Content-Type:Date;
      	bh=wgyYNgRSqIvawIOIl/ZZ4lB8xSDZ067gS0biO571JF4=;
      	b=JLQRTJEQi6LcMRb8fBGPGjbh/j6GjL6vB+2BiHWXU9JIFjC6KgvuZwGXvCRMKb6V
      	Rd/Qc6NHIBZ+Km24oyhAc02Tqs6f+zThfI9B3IEEt466TAIhg1OjrXNDtosUhivPul/
      	UntOyB6OZO0qVyywfKCwY7dMFTB1YltnGKTTXufut2p0StslDks/SOfGV4yBXsWf07N
      	Mj4R480+2iBcYDISNumz4jiz5b2poU8Z0hpSSlMRDKzXzHzyig4ODcJ4yx2R75oJ2Vd
      	ztTQ0voxEi7utmgFOeirP0XY9KEr9Y/NQG7GwfTtIFgCZUzHw/eOo2RtsKZchifx4HT
      	x5j5v1HonA==
      

...

  1. You can use the mail client 'thunderbird'

...

  1. with the 'DKIM Verifier'

...

  1. extention to validate the DKIM-

...

  1. Signature:

    1. Download thunderbird

...

Configureer uw e-mailaccount:

  1. Bewerken -> Accountinstellingen -> Accountacties -> E-mailaccount toevoegen

  2. Vul de pop3/imap-server en je gebruikersnaam/wachtwoord in.

...

    1. from here

    2. Configure you mail account:

      1. Edit -> Account Settings -> Account Actions -> Add mail account

      2. Fill in the pop3/imap server and you userid/password.

    3. Install the DKIM Validator add-on:

...

      1. Tools -> Add-ons -> Get Add-ons

...

...

      1. Search for 'DKIM' ->

...

      1. install

      2. You can configure the 'DKIM Verifier'

...

      1. in

...

      1. Tools -> Add-ons ->

...

      1. Extensions -> DKIM Verifier ->

...

  1. Om foutopsporing in te schakelen: Geavanceerd -> Debuggen inschakelen en Gedetailleerde fouten weergeven

...

Open de mail met de DKIM-handtekening

...

      1. Preferences

        1. To enable debugging: Advanced -> enable debugging and Show detailed errors

    1. Open the mail with the DKIM Signature

    2. Open the error console with: <ctrl> + <shift> + j

...

titleOwn mailserver

Eigen mailserver

...

    1. Detailed info and error messages are now shown.

Allow the use of the clients own mailserver

If the above options are not sufficient or the client would allow to use there own mailserver, that is also possible. Navigate to “Client settings> Email”. Fill in the following fields (be aware: these values should be provided by the clients IT department):

  • Mail host:

...

  • Fill in the host for the e-mail

...

  • Mail

...

Gebruikersnaam: De gebruikersnaam waarmee de mailserver moet worden geopend.

...

Mail wachtwoord: De gebruikersnaam waarmee de mailserver benaderd moet worden

...

SSL-verbinding gebruiken: Als u de SSL-variant van de verbinding met de mailbox wilt gebruiken

...

TLS-modus: Selecteer de TLS-modus die u wilt gebruiken (laat deze op "Default" staan als dit niet bekend is)

...

Beperking

Wanneer u uw eigen mailbox gebruikt, is er één grote beperking in vergelijking met het gebruik van de native mailfunctie in Workplace Management. Wanneer Workplace Management een e-mail verstuurt naar de clientserver en deze mislukt, zal het deze e-mail niet opnieuw proberen. De eenvoudige reden hiervoor is dat als het systeem dit wel zou doen, het geblokkeerd zou kunnen worden vanwege een mogelijke identificatie als DDoS-aanval ("spamming" van de server met verzoeken). Als de native e-mailfunctie wordt gebruikt, wordt een e-mail 24 uur lang opnieuw geprobeerd voordat hij mislukt.

Testinstellingen

Als je wilt testen of de bovenstaande instellingen van toepassing zijn op jouw e-mail, kun je dat al doen met de methoden die in de artikelen worden genoemd. Maar een specifieke manier die bewezen heeft goed te werken is het gebruik van mail-test.com. Hier krijg je een e-mailadres waarnaar je een e-mail kunt sturen en het controleert de spamrating van de e-mail. Voer dit e-mailadres dus in op een willekeurige plek in Werkplekbeheer en zorg ervoor dat er een e-mail naar dat contact wordt gestuurd. Als dat gebeurd is, klik je op "check je score" en krijg je een lijst met mogelijke problemen en oplossingen die je kunt veranderen. Let op: dit is een externe tool, dus zorg ervoor dat je geen gevoelige informatie verstuurt in de testmail. Bovendien wordt de tool vooral gebruikt voor nieuwsbrieven, wat betekent dat het sommige aspecten van de e-mail controleert die niet relevant zijn voor toepassingsmails van een systeem als Werkplekbeheer.

Samenvatting

Rw ui textbox macro
  • Gebruik DKIM, SPF of configureer je eigen mailbox voor het verzenden van e-mails om te voorkomen dat e-mails in een SPAM-map terechtkomen

Oefening

  •  N.V.T.

Zoek op

...

  • port: Fill in the required port

  • User name: The username with which the mailserver should be accessed

  • Mail password: The username with which the mailserver should be accessed

  • Use SSL Connection: If you would like to use the SSL variant of the connection to the mailbox

  • TLS Mode: Select the TLS mode that you would like to use (leave it on “Default” if unknown)

Image Added

Limitation

When using the clients own mailbox, there is one major limitation compared to using the native mail feature in Workplace Management. When Workplace Management sends an e-mail to the client server and it fails, it will not retry this e-mail. The simple reason is that if the system would do this, it might be blocked due to a possible identification as a DDoS attack (“spamming” the server with requests). In case the native e-mail feature is used, an e-mail is retried for 24 hours before failing.

Testing settings

If you want to test if the above settings apply to your e-mail, you can already test those using the methods mentioned in the articles. But one specific way which has proven to work good is the use of mail-test.com. Here you get an e-mail address where you can send an e-mail to, and it checks the spam rating of the e-mail. So enter this e-mail in any location in Workplace Management and make sure an e-mail is sent to that contact. Once it has, press on “check your score” and you have a list of possible problems and solutions on what you can change. Be aware: this is an external tool, so make sure to not send sensitive information in the test e-mail. Also, the tool is used mostly for newsletters, which means that it checks some aspects of the e-mail which are not relevant for application e-mails from a system like Workplace Management.