Outils pour utilisateurs

Outils du site


informatique:reseau:exim4

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
informatique:reseau:exim4 [04/06/2020 17:51] – [Exim4] cyrilleinformatique:reseau:exim4 [11/08/2021 19:35] (Version actuelle) – [DKIM] test cyrille
Ligne 13: Ligne 13:
 ===== Tips & Tricks ===== ===== Tips & Tricks =====
  
-===== fallback (wildcard) alias  =====+==== fallback (wildcard) alias  ====
  
 In ''/etc/exim4/exim4.conf.template'' replace: In ''/etc/exim4/exim4.conf.template'' replace:
Ligne 60: Ligne 60:
  
 <code> <code>
-/usr/sbin/exim   -M   email-id        => Force delivery of one message +exim4   -M   email-id        => Force delivery of one message 
-/usr/sbin/exim -qf                  => Force another queue run +exim4 -qf                  => Force another queue run 
-/usr/sbin/exim -qff                 => Force another queue run and attempt to flush the frozen message +exim4 -qff                 => Force another queue run and attempt to flush the frozen message 
-/usr/sbin/exim  -Mvl   messageID  => View the log for the message +exim4  -Mvl   messageID  => View the log for the message 
-/usr/sbin/exim  -Mvb  messageID  => View the body of the message +exim4  -Mvb  messageID  => View the body of the message 
-/usr/sbin/exim  -Mvh  messageID  => View the header of the message +exim4  -Mvh  messageID  => View the header of the message 
-/usr/sbin/exim -Mrm  messageID  =>  Remove message without sending any error message +exim4 -Mrm  messageID  =>  Remove message without sending any error message 
-/usr/sbin/exim  -Mg  messageID   =>  Giveup and fail message to bounce the message to the Sender+exim4  -Mg  messageID   =>  Giveup and fail message to bounce the message to the Sender
  
-/usr/sbin/exim -bpr | grep “<” | wc -l    =>Number of emails in the que +exim4 -bpr | grep “<” | wc -l    =>Number of emails in the que 
-/usr/sbin/exim -bpr | grep frozen | wc -l   => How many Frozen mails on the queue+exim4 -bpr | grep frozen | wc -l   => How many Frozen mails on the queue
  
 # Deleteing Frozen Messages # Deleteing Frozen Messages
-$ sudo /usr/sbin/exim -bpr | grep frozen | awk {'print $3'} | xargs sudo /usr/sbin/exim -Mrm+$ sudo exim4 -bpr | grep frozen | awk {'print $3'} | xargs sudo /usr/sbin/exim -Mrm
 </code> </code>
  
Ligne 89: Ligne 89:
  
 View new config: ''$ sudo exim4 -bP | grep smtp_accept_'' View new config: ''$ sudo exim4 -bP | grep smtp_accept_''
 +
 +====== Configuration ======
 +
 +Smarthost + TLS :
 +  * https://wiki.debian.org/Exim
 +  * [[https://logd.fr/exim4-connexion-smtp-securisee-via-tls/|Exim4, connexion SMTP sécurisée via TLS]]
 +
 +
 +===== DKIM =====
 +
 +Cet exemple pour ''domain.tld'' et ses sous-domaines, avec le selecteur ''default''
 +
 +Générer les clés:
 +<code bash>
 +$ openssl genrsa -out dkim.key 2048
 +$ openssl rsa -in dkim.key -out dkim.pub -pubout -outform PEM
 +</code>
 +
 +Publier la clé publique sur le DNS
 +
 +<code>
 +default._domainkey.domain.tld. 60 DKIM "k=rsa;s=email;p=MIIBIjANBgkqhkiG9w0B...QAB;"
 +</code>
 +
 +Configurer exim4 dans ''/etc/exim4/exim4.conf.localmacros''
 +<code bash>
 +MAIN_TLS_ENABLE=1
 +REMOTE_SMTP_SMARTHOST_HOSTS_REQUIRE_TLS=*
 +
 +DKIM_DRIVER=smtp
 +DKIM_DOMAIN=domain.tld
 +#DKIM_DOMAIN=${lc:${domain:$h_from:}}
 +DKIM_SELECTOR=default
 +DKIM_CANON=relaxed
 +DKIM_PRIVATE_KEY=/etc/exim4/dkim.key
 +</code>
 +
 +Générer la config et informer le service:
 +<code bash>
 +$ sudo update-exim4.conf
 +$ sudo systemctl reload exim4.service
 +</code>
 +
 +Puis vérifier en envoyant un email à check-auth@verifier.port25.com ou https://mail-tester.com (3 tests par jour).
 +<code bash>$ mail -s 'test' check-auth@verifier.port25.com</code>
  
informatique/reseau/exim4.1591285907.txt.gz · Dernière modification : 04/06/2020 17:51 de cyrille

Sauf mention contraire, le contenu de ce wiki est placé sous les termes de la licence suivante : CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki