Outils pour utilisateurs

Outils du site


ateliers:serveurmail:opensmtpd

Différences

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

Lien vers cette vue comparative

Prochaine révision
Révision précédente
ateliers:serveurmail:opensmtpd [2017/04/11 13:55] – créée okhinateliers:serveurmail:opensmtpd [2018/09/02 14:22] (Version actuelle) – Fix typo thibg
Ligne 12: Ligne 12:
  
     $ sudo apt install opensmtpd     $ sudo apt install opensmtpd
 +
 +Il faut alors indiquer le nom du serveur à partir duquel les emails seront envoyés : dans notre cas anarcha.pink.
 +
 +Puis indiquer les usernames pour les groupes root et postmasters. 
 +création du groupe smtpd 
        
 Il faut ensuite penser à activer son démarrage automatiquement et le démarrer à la main. Voir la page [[adminsys]] pour les opérations de maintenance régulières. Il faut ensuite penser à activer son démarrage automatiquement et le démarrer à la main. Voir la page [[adminsys]] pour les opérations de maintenance régulières.
Ligne 22: Ligne 27:
 La configuration est présente dans le fichier ''/etc/smtpd.conf'' du serveur et à le contenu suivant : La configuration est présente dans le fichier ''/etc/smtpd.conf'' du serveur et à le contenu suivant :
  
-    # This is the smtpd server system-wide configuration file. +<code|h /etc/smtpd.conf> 
-    # See smtpd.conf(5) for more information. +# This is the smtpd server system-wide configuration file. 
-     +# See smtpd.conf(5) for more information. 
-    pki setup + 
-    # This is where we configure certificates generated by letsencrypt +PKI setup 
-    pki mail.anarcha.pink certificate "/etc/letsencrypt/live/mail.anarcha.pink/full$ +pki mail.anarcha.pink certificate "/etc/letsencrypt/live/mail.anarcha.pink/fullchain.pem" 
-    pki mail.anarcha.pink key "/etc/letsencrypt/archive/mail.anarcha.pink/privkey1.$ +pki mail.anarcha.pink key "/etc/letsencrypt/live/mail.anarcha.pink/privkey.pem" 
-    pki mail.anarcha.pink dhparams "/etc/letsencrypt/csr/dhparams.pem" +pki mail.anarcha.pink dhe auto 
-     + 
-    # To accept external mail, replace with: listen on all +queue encryption key d960c8b7a34a5b37fc6bfcd637462a4f 
-    listen on eth0 port 25 tls pki mail.anarcha.pink hostname mail.anarcha.pink aut$ + 
-    listen on eth0 port 587 tls-require pki mail.anarcha.pink hostname mail.anarcha$ +# To accept external mail, replace with: listen on all 
-    listen on lo +listen on eth0 port 25 tls pki mail.anarcha.pink hostname mail.anarcha.pink auth-optional tag IN 
-     +listen on eth0 port 465 smtps pki mail.anarcha.pink hostname mail.anarcha.pink auth tag IN 
-    # If you edit the file, you have to run "smtpctl update table aliases" +listen on eth0 port 587 tls-require pki mail.anarcha.pink hostname mail.anarcha.pink auth tag IN 
-    table aliases file:/etc/aliases +listen on lo tag IN 
-     + 
-    # Uncomment the following to accept external mail for domain "anarcha.pink" +# Tag packets from dkimproxy 
-    accept from any for domain "anarcha.pink" alias <aliases> deliver to maildir "~$ +listen on lo port 10029 tag DKIM_SIGNED mask-source 
-    accept from local for local alias <aliases> deliver to maildir "~/mails" + 
-    accept from local for any relay+# When spam is done, go here, receiveing from spamc 
 +listen on lo port 10025 tag SPAM_CHECKED 
 + 
 +# If you edit the file, you have to run "smtpctl update table aliases" 
 +table aliases file:/etc/aliases 
 + 
 +# Local delivery 
 +accept from local for local alias <aliases> deliver to lmtp "/var/run/dovecot/lmtp" 
 + 
 +# Uncomment the following to accept external mail for domain "anarcha.pink" 
 +accept tagged SPAM_CHECKED from any for local deliver to lmtp "/var/run/dovecot/lmtp" 
 + 
 +# Send from IN to spamc 
 +accept tagged IN from any for domain "anarcha.pink" alias <aliases> deliver to mda "/usr/local/bin/rspamd.py %{sender} %{user.username}" as nobody 
 + 
 +# DKIM_SIGNED is relayed 
 +accept tagged DKIM_SIGNED for any relay 
 + 
 +#Untagged DKIM ! relay first to the dkimproxy 
 +accept tagged ! DKIM_SIGNED for any relay via smtp://127.0.0.1:10028 
 + 
 +# Output goes to DKIMfilter 
 +accept from local for any relay pki mail.anarcha.pink 
 +</code>
  
 ===== Administration ===== ===== Administration =====
Ligne 49: Ligne 77:
  
     $ sudo smtpctl update table aliases     $ sudo smtpctl update table aliases
 +    
 +===== /!\ Clé de queue /!\ =====
 +
 +Clé de queue opensmtpd (qu'est-ce que ça veut dire ?) : 
 +
 +    $ openssl rand -hex 16    
ateliers/serveurmail/opensmtpd.1491911717.txt.gz · Dernière modification : 2017/04/11 13:55 de okhin