Changes

Jump to navigation Jump to search
15,494 bytes added ,  11:06, 10 June 2023
Line 1: Line 1: −
{{usefulnote}}
   
{{Languages|Email}}
 
{{Languages|Email}}
 +
{{usefulnote/fr}}
 
Informations sur le sous-système de courrier électronique utilisé dans le Serveur SME comprennant l'envoi / la réception, le filtrage de pourriels, la recherche de virus, le webmail, les domaines et les utilisateurs.
 
Informations sur le sous-système de courrier électronique utilisé dans le Serveur SME comprennant l'envoi / la réception, le filtrage de pourriels, la recherche de virus, le webmail, les domaines et les utilisateurs.
   Line 14: Line 14:  
Si le Serveur SME ne reçoit pas de courrier, vous devez vous assurer que les connexions SMTP atteignent votre serveur SME (paramètres DNS, configuration du routeur, blocs de ports ISP) et vous devez examiner les journaux /var/log/qpsmtpd/current pour déterminer ce que le Serveur SME fait avec les connexions entrantes. La plupart des problèmes sont des problèmes de DNS, de routeur ou d'ISP et n'ont rien à voir avec le fonctionnement ou la configuration du serveur SME.
 
Si le Serveur SME ne reçoit pas de courrier, vous devez vous assurer que les connexions SMTP atteignent votre serveur SME (paramètres DNS, configuration du routeur, blocs de ports ISP) et vous devez examiner les journaux /var/log/qpsmtpd/current pour déterminer ce que le Serveur SME fait avec les connexions entrantes. La plupart des problèmes sont des problèmes de DNS, de routeur ou d'ISP et n'ont rien à voir avec le fonctionnement ou la configuration du serveur SME.
   −
====Erreurs qpsmtpd «Connection Timed Out»====
+
====Erreurs qpsmtpd « Connection Timed Out »====
 
Voir [[Bugzilla:6888]] et [[Bugzilla:2360]].
 
Voir [[Bugzilla:6888]] et [[Bugzilla:2360]].
   −
Une erreur qpsmtpd «timeout» peut se produire, ce n'est pas un problème qui est causé par le Serveur SME directement, mais il peut devenir un problème en fonction du matériel et des paramètres de configuration qui sont contenus dans et autour d'autres environnements.
+
Une erreur qpsmtpd «timeout» peut se produire, ce n'est pas un problème qui est causé par le serveur KOOZALI SME directement, mais il peut devenir un problème en fonction du matériel et des paramètres de configuration qui sont contenus dans et autour d'autres environnements.
 +
 
 +
On en parle (en anglais) sous différentes dénominations :
   −
On en parle (en anglais) sous différentes dénominations :
   
*Path MTU Discovery Blackhole http://www.phildev.net/mss/mss-talk.pdf
 
*Path MTU Discovery Blackhole http://www.phildev.net/mss/mss-talk.pdf
 
*Path MTU Discovery Failures http://www.wand.net.nz/~mluckie/pubs/debugging-pmtud.imc2005.pdf
 
*Path MTU Discovery Failures http://www.wand.net.nz/~mluckie/pubs/debugging-pmtud.imc2005.pdf
Line 28: Line 29:  
L'utilitaire [http://linux.die.net/man/8/tracepath tracepath] (inclus dans SME 8.0) peut être utilisé pour localiser des valeurs MTU anormales entre votre Serveur SME et n'importe quel hôte distant.
 
L'utilitaire [http://linux.die.net/man/8/tracepath tracepath] (inclus dans SME 8.0) peut être utilisé pour localiser des valeurs MTU anormales entre votre Serveur SME et n'importe quel hôte distant.
   −
Vous pouvez découvrir le plus petit MTU entre vous et google.com (par exemple) en exécutant cette commande, puis localiser la plus petite valeur de «pmtu» dans les résultats :
+
Vous pouvez découvrir le plus petit MTU entre vous et google.com (par exemple) en exécutant cette commande, puis localiser la plus petite valeur de « pmtu » dans les résultats :
 
  tracepath google.com
 
  tracepath google.com
   Line 39: Line 40:     
===Webmail cassé après mise à jour===
 
===Webmail cassé après mise à jour===
Après le «post-upgrade» habituel et le redémarrage, webmail est rompu avec des messages comme suit dans le journal des messages :
+
Après le « post-upgrade » habituel et le redémarrage, webmail est rompu avec des messages comme suit dans le journal des messages :
    
  Apr 20 17:29:53 mail [4614]: PHP Fatal error:  Call to a member function on a non-object in /home/httpd/html/horde/imp/lib/Block/tree_folders.php on line 65
 
  Apr 20 17:29:53 mail [4614]: PHP Fatal error:  Call to a member function on a non-object in /home/httpd/html/horde/imp/lib/Block/tree_folders.php on line 65
Line 58: Line 59:  
*Envoyer les pourriels dans la corbeille : Activé
 
*Envoyer les pourriels dans la corbeille : Activé
 
*Modifier le sujet des pourriels : Activé
 
*Modifier le sujet des pourriels : Activé
 +
 
Je recommande également de bloquer tout le contenu de fichiers exécutables. Pour ce faire, sélectionnez (mettez en surbrillance) tous les types de pièces jointes autres que les fichiers zip (les deux derniers).
 
Je recommande également de bloquer tout le contenu de fichiers exécutables. Pour ce faire, sélectionnez (mettez en surbrillance) tous les types de pièces jointes autres que les fichiers zip (les deux derniers).
   −
Cliquer sur «Enregistrer».
+
Cliquer sur « Enregistrer ».
 +
 
 
====Comment ça marche====
 
====Comment ça marche====
 
Lors de la réception d'un message entrant, le serveur teste d'abord les listes RBL et DNSBL, si cette option est activée. Si l'expéditeur est en liste noire, les messages sont bloqués complètement et Spamassassin ne le voit jamais.
 
Lors de la réception d'un message entrant, le serveur teste d'abord les listes RBL et DNSBL, si cette option est activée. Si l'expéditeur est en liste noire, les messages sont bloqués complètement et Spamassassin ne le voit jamais.
   −
Avec cette configuration, les messages les plus pourris, ceux marqués comme 12 ou plus, seront rejetés au niveau SMTP. Les messages de pourriels entre 4 et 12 seront acheminés vers le dossier «junkmail» des utilisateurs (IMAP). Cela est fait afin que les utilisateurs peuvent vérifier les faux positifs ... les messages valides qui ont été classés comme pourriel par SpamAssassin.
+
Avec cette configuration, les messages les plus pourris, ceux marqués comme 12 ou plus, seront rejetés au niveau SMTP. Les messages de pourriels entre 4 et 12 seront acheminés vers le dossier « junkmail » des utilisateurs (IMAP). Cela est fait afin que les utilisateurs peuvent vérifier les faux positifs ... les messages valides qui ont été classés comme pourriel par SpamAssassin.
   −
Les utilisateurs peuvent vérifier leurs dossiers de courrier indésirable pour les faux positifs via webmail, ou, s'ils utilisent un client de messagerie IMAP, en vérifiant simplement le dossier «junkmail» de leur client de messagerie.
+
Les utilisateurs peuvent vérifier leurs dossiers de courrier indésirable pour les faux positifs via webmail, ou, s'ils utilisent un client de messagerie IMAP, en vérifiant simplement le dossier « junkmail » de leur client de messagerie.
    
  https://servername/webmail
 
  https://servername/webmail
   −
{{note box |type=Note :| suivant les courrielleurs, le dossier «junkmail» est traduit en français ou non. S'il est traduit, ce peut être «Indésirables», ... Dans ce cas, noter que dans le serveur SME, le dossier reste nommé «junkmail».}}
+
{{note box |type=Note :| suivant les courrielleurs, le dossier « junkmail » est traduit en français ou non. S'il est traduit, ce peut être « Indésirables », ... Dans ce cas, noter que dans le serveur SME, le dossier reste nommé « junkmail ».}}
    
====Activer/désactiver le filtrage par utilisateur====
 
====Activer/désactiver le filtrage par utilisateur====
Cette procédure ne désactive pas vraiment le filtrage du courrier indésirable, elle empêche simplement le pourriel d'être acheminé vers le dossier «junkmail».
+
Cette procédure ne désactive pas vraiment le filtrage du courrier indésirable, elle empêche simplement le pourriel d'être acheminé vers le dossier « junkmail ».
   −
Le filtrage par utilisateur est activé par défaut. Désactivez le filtrage avec la commande suivante, en tant que «root» :
+
Le filtrage par utilisateur est activé par défaut. Désactivez le filtrage avec la commande suivante, en tant que « root » :
    
  db accounts setprop NomUtilisateur SortSpam disabled
 
  db accounts setprop NomUtilisateur SortSpam disabled
Line 81: Line 84:  
  signal-event user-modify NomUtilisateur
 
  signal-event user-modify NomUtilisateur
   −
 
+
====Utiliser le dossier « Junkmail »====
====Utiliser le dossier «Junkmail»====
+
Le comportement par défaut de Spamassassin est de mettre les pourriels dans la boîte de réception, ce qui est très pratique pour les utilisateurs en cas de faux positif, mais ce n'est pas pratique pour l'apprentissage et, surtout, cela ne facilite pas la vie de l'utilisateur. Si vous voulez mettre directement les pourriels dans le dossier « junkmail », lancez la commande ci-dessus.
Le comportement par défaut de Spamassassin est de mettre les spams dans la boîte de réception, ce qui est très pratique pour les utilisateurs en cas de faux positif, mais ce n'est pas pratique pour l'apprentissage et, surtout, cela ne facilite pas la vie de l'utilisateur. Si vous voulez mettre directement les pourriels dans le dossier «junkmail», lancez la commande ci-dessus.
      
  config setprop spamassassin SortSpam enabled
 
  config setprop spamassassin SortSpam enabled
Line 90: Line 92:  
====Durée de rétention des messages====
 
====Durée de rétention des messages====
 
Configurer Spamassassin pour la suppression automatique des pourriels.
 
Configurer Spamassassin pour la suppression automatique des pourriels.
Vous pouvez changer, dans la configuration de Spamassassin, le «nombre de jours» au bout duquel les pourriels seront automatiquement effacés. Pour effacer après 2 mois :
+
Vous pouvez changer, dans la configuration de Spamassassin, le « nombre de jours » au bout duquel les pourriels seront automatiquement effacés. Pour effacer après 2 mois :
    
  db configuration setprop spamassassin MessageRetentionTime 60   
 
  db configuration setprop spamassassin MessageRetentionTime 60   
  signal-event email-update  
+
  signal-event email-update
    
====Niveau de score d'un pourriel et score pour le rejet d'un pourriel====
 
====Niveau de score d'un pourriel et score pour le rejet d'un pourriel====
Le «niveau de rejet de pourriel personnalisé» ne fonctionnera que lorsque «Sensibilité du filtre» est réglé sur «Personnalisé».
+
Le « niveau personnalisé de rejet de pourriel » ne fonctionnera que lorsque la « Sensibilité du filtre » est réglé sur « Personnalisé ».
<ol></li><li>Ouvrez le gestionnaire du serveur.
+
<ol><li>Ouvrez le gestionnaire du serveur.
</li><li>Cliquez sur «Messagerie électronique» dans le panneau «Configuration» à gauche.
+
</li><li>Cliquez sur « Messagerie électronique » dans le panneau « Configuration » à gauche.
</li><li>Cliquez sur «Modifier les paramètres de filtrage des courriels».
+
</li><li>Cliquez sur « Modifier les paramètres de filtrage des courriels ».
</li><li>Modifiez «Sensibilité du filtre» à «Personnalisé» et ajustez les paramètres à votre goût.
+
</li><li>Modifiez « Sensibilité du filtre » à « Personnalisé » et ajustez les paramètres à votre goût.
 
</li></ol>
 
</li></ol>
 
Cela est ainsi parce que, par défaut, aucun courriel (sauf pour les virus) n'est rejeté sans que l'administrateur ait d'abord effectué une action.
 
Cela est ainsi parce que, par défaut, aucun courriel (sauf pour les virus) n'est rejeté sans que l'administrateur ait d'abord effectué une action.
Line 108: Line 110:  
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! Sensibilité !! Niveau de marquage de pourriel !! Niveau de rejet de pourriel
+
!Sensibilité!!Niveau de marquage de pourriel!! Niveau de rejet de pourriel
 
|-
 
|-
| Personnalisé || Valeur du niveau de marquage <br>(niveau personnalisé du marquage) || Valeur du niveau de rejet <br>(niveau de rejet personnalisé)
+
|Personnalisé|| Valeur du niveau de marquage <br>(niveau personnalisé du marquage)||Valeur du niveau de rejet <br>(niveau de rejet personnalisé)
 
|-
 
|-
| très haut || 2 || Pas de rejet
+
|Très haut||2||Pas de rejet
 
|-
 
|-
| haut || 3 || Pas de rejet
+
|Haut||3||Pas de rejet
 
|-
 
|-
| moyen || 5 || Pas de rejet
+
| Moyen||5||Pas de rejet
 
|-
 
|-
| bas || 7 || Pas de rejet
+
|Bas||7||Pas de rejet
 
|-
 
|-
| très bas || 9 || Pas de rejet
+
|Très bas||9||Pas de rejet
 
|}
 
|}
   −
====En-tête «X-Spam-Level» dans les messages électroniques====
+
====En-tête « X-Spam-Level » dans les courriels====
SME ne crée pas d'en-tête «X-Spam-Level» dans les messages électroniques traités par défaut. Voir [[https://fr.wikipedia.org/wiki/SpamAssassin#Fonctionnement X-Spam-Level]].
+
SME ne crée pas d'en-tête « X-Spam-Level » dans les courriels traités par défaut. Voir [[https://fr.wikipedia.org/wiki/SpamAssassin#Fonctionnement X-Spam-Level]].
    
Pour activer cette fonctionnalité :
 
Pour activer cette fonctionnalité :
Line 131: Line 133:     
(Fondé sur [[Bugzilla:3505]])
 
(Fondé sur [[Bugzilla:3505]])
{{note box|type=Note :| depuis SME8, cette fonctionalité semble être incluse --[[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]]) 09:05, 3 February 2014 (MST)}}
+
{{note box|type=Note :| depuis SME8, cette fonctionnalité semble être incluse --[[User:Unnilennium|Unnilennium]] ([[User talk:Unnilennium|talk]]) 09:05, 3 February 2014 (MST)}}
    
====Taille limite de courriel pour le module d'extension qpsmtpd de Spamassassin====
 
====Taille limite de courriel pour le module d'extension qpsmtpd de Spamassassin====
Ce paramètre de configuration db définit la taille maximale de courrier électronique au-dessus de laquelle Spamassassin n'appliquera pas les règles de filtrage de pourriel telles qu'elles ont été définies.
+
Ce paramètre de configuration db définit la taille maximale de courriel au-dessus de laquelle Spamassassin n'appliquera pas les règles de filtrage de pourriel telles qu'elles ont été définies.
   −
Le paramètre par défaut est 500 kb ; pour augmenter la taille maximale, appliquez les commandes suivantes à partir d'un terminal «administrateur» :
+
Le paramètre par défaut est 500 kb ; pour augmenter la taille maximale, appliquez les commandes suivantes à partir d'un terminal « administrateur » :
 
  db configuration setprop spamassassin MaxMessageSize 2000000  
 
  db configuration setprop spamassassin MaxMessageSize 2000000  
 
augmente la taille du message à 2 Mb ; appliquer la modification avec :  
 
augmente la taille du message à 2 Mb ; appliquer la modification avec :  
Line 143: Line 145:  
(Fondé sur [[Bugzilla:7606]]).
 
(Fondé sur [[Bugzilla:7606]]).
   −
====Custom Rule Scores====
+
====Niveaux de règles personnalisées====
You can customize the score assigned by a specific Spamassassin rule (SARE_ADULT2 in this case) as follows:
+
Vous pouvez personnaliser le score attribué par une règle Spamassassin spécifique (SARE_ADULT2 dans ce cas) comme suit :
mkdir -p /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf
+
  mkdir -p /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf
cd /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf
+
  cd /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf
echo "score SARE_ADULT2 20.000" >> 20localscores
+
  echo "score SARE_ADULT2 20.000" >> 20localscores
signal-event email-update
+
  signal-event email-update
   −
You can now add additional tests and custom scores by editing the newly-created template fragment ''20localscores'' and adding new custom scores using:
+
Vous pouvez maintenant ajouter des tests supplémentaires et des scores personnalisés en modifiant le fragment de modèle nouvellement créé '' 20localscores '' et en ajoutant de nouveaux scores personnalisés en utilisant :
 
  nano -w /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores
 
  nano -w /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores
 
  signal-event email-update
 
  signal-event email-update
Each custom score goes on its own line. If you enter a score surrounded by parentheses, the "custom" score will be added to the default score for the specified test (use ''score TEST_NAME (-1)'' to reduce the score for 'TEST_NAME' by 1)  
+
Chaque score personnalisé va sur sa propre ligne. Si vous entrez un score entre parenthèses, le score « personnalisé » sera ajouté à la note par défaut du test spécifié (utilisez « score TEST_NAME (-1) » pour réduire le score de « TEST_NAME » de 1).
   −
You can remove these customizations using:  
+
Vous pouvez supprimer ces personnalisations en utilisant :
 
  rm -f /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores
 
  rm -f /etc/e-smith/templates-custom/etc/mail/spamassassin/local.cf/20localscores
 
  signal-event email-update
 
  signal-event email-update
   −
References:
+
Références :
 +
 
 
* http://spamassassin.apache.org/full/3.1.x/dist/doc/Mail_SpamAssassin_Conf.html#scoring_options
 
* http://spamassassin.apache.org/full/3.1.x/dist/doc/Mail_SpamAssassin_Conf.html#scoring_options
 
* http://spamassassin.apache.org/tests_3_2_x.html
 
* http://spamassassin.apache.org/tests_3_2_x.html
 
* http://www.rulesemporium.com/
 
* http://www.rulesemporium.com/
   −
====SPF mail rejection/flagging policy====
+
====Politique de rejet / d'annulation de courrier électronique SPF====
{{Warning box|Please note that these instructions do not apply to SME9.2 where the version of qpsmtpd (0.96) does all this out of the box. Indeed if
+
[[https://fr.wikipedia.org/wiki/Sender_Policy_Framework SPF | Sender Policy Framework]]
the custom template below is applied (or left in?) to an SME9.2 system, then you may find that emails are denied when they ought to be accepted!}}
+
{{Warning box|type=Attention :|Veuillez noter que ces instructions ne s'appliquent pas à SME 9.2 où la version de qpsmtpd (0.96) fait tout cela en dehors de la boîte. En effet, si le modèle personnalisé ci-dessous est appliqué à (ou laissé dans ?) un système SME 9.2, alors vous pouvez constater que les courriels sont refusés alors qu'ils devraient être acceptés !}}
 
+
Le Serveur SME peut protéger des enregistrements fondés sur SPF en utilisant Spamassassin et le module d'extension 'sender_permitted_from'. Les lignes suivantes activeront le module d'extension :
SME server can protect based of SPF records using spamassassin and the 'sender_permitted_from' plugin. The following lines will enable the plugin.
   
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
 
  cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
 
  cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
Line 174: Line 176:  
  /sbin/e-smith/expand-template /var/service/qpsmtpd/config/peers/0
 
  /sbin/e-smith/expand-template /var/service/qpsmtpd/config/peers/0
   −
Then set your custom rule scores using the [[#Custom_Rule_Scores|Custom Rule Scores]] section of this page. You should base these scores on your settings in server-manager > Configuration > Email > Change e-mail filtering settings  or via db config commands for those with that skillset
+
Ensuite, définissez vos scores de règles personnalisées en utilisant la section [[#Niveaux_de_r.C3.A8gles_personnalis.C3.A9es | Niveaux de règles personalisées]] de cette page. Vous devez fonder ces scores sur vos paramètres dans le Gestionnaire du serveur> Configuration> Messagerie électronique> Modifier les paramètres de filtrage des courriels ou via les commandes db config pour ceux qui possèdent ce niveau de compétences.
 
  echo "score SPF_SOFTFAIL 6.000" >> 20localscores  
 
  echo "score SPF_SOFTFAIL 6.000" >> 20localscores  
 
  echo "score SPF_FAIL 14.000" >> 20localscores
 
  echo "score SPF_FAIL 14.000" >> 20localscores
 
  signal-event email-update
 
  signal-event email-update
   −
In our testing an email that doesn't match SPF records and the sender domain owner has defined a soft fail, if is attributed 6 points and sorted to junkmail folder. If the sender domain owner has defined a hard fail the email attibuted 14 points and is subsequently rejected.
+
Dans nos tests, un courriel qui ne correspond pas aux enregistrements SPF et dont le propriétaire du domaine expéditeur a défini un échec faible, se verra attribuer 6 points et sera classé dans le dossier « junkmail ». Si le propriétaire du domaine de l'expéditeur a défini un échec fort, le courrier électronique aura reçu 14 points et sera ensuite rejeté.
 
<br>
 
<br>
References (but instructions changed to meet new qmail structure):
+
Références (mais les instructions ont changé pour répondre à la nouvelle structure qmail) :
 +
 
 
* http://forums.contribs.org/index.php?topic=21631.0
 
* http://forums.contribs.org/index.php?topic=21631.0
   Line 214: Line 217:  
  signal-event email-update
 
  signal-event email-update
   −
====Whitelist and Blacklist====
+
====Liste blanche et liste noire====
If mail comes in and it is misclassified as spam by Spamasassin, you can add the sender to the Spamassassin whitelist so that future messages coming in from that sender are not filtered.
+
Si le courrier arrive et qu'il est mal classé comme pourriel par Spamasassin, vous pouvez ajouter l'expéditeur à la liste blanche de Spamassassin afin que les futurs messages provenant de cet expéditeur ne soient pas filtrés. Inversement, vous pouvez ajouter un spammeur à la liste noire de Spamassassin afin que vous ne revoyiez plus ses pourriels. Ajoutez des expéditeurs (ou leurs domaines entiers) à la liste blanche globale (ou à liste noire) avec des commandes similaires à celles-ci (en tant que root) :
Conversely, you can add a spammer to the Spamassassin blacklist so you never see their spam again.
  −
Add senders (or their entire domains) to the global whitelist (or blacklist) with commands similar to these (as root):
      
  db spamassassin setprop wbl.global *@vonage.com White
 
  db spamassassin setprop wbl.global *@vonage.com White
Line 223: Line 224:  
  db spamassassin setprop wbl.global user@domain3.com White
 
  db spamassassin setprop wbl.global user@domain3.com White
 
  db spamassassin setprop wbl.global spammer@spamdomain.com Black
 
  db spamassassin setprop wbl.global spammer@spamdomain.com Black
 
+
Vous pouvez bloquer un TLD (domaine de premier niveau - comme .org) entier mais, s.v.p., soyez conscient que vous pourriez être en train de refuser un courriel légitime à l'avenir.
you can block an entire TLD but please be aware that you might be denying a legitimate email in the future.
   
  db spamassassin setprop wbl.global *@*.xyz Black
 
  db spamassassin setprop wbl.global *@*.xyz Black
 
  db spamassassin setprop wbl.global *@*.link Black
 
  db spamassassin setprop wbl.global *@*.link Black
 
+
Développez le modèle et enregistrez la configuration dans la base de données :
expland template and save the configuration to the database
   
  signal-event email-update
 
  signal-event email-update
 
+
Vous pouvez afficher les listes avec cette commande :
You can view the lists with this command:
   
  db spamassassin show
 
  db spamassassin show
 +
Ces listes peuvent également être contrôlées par le gestionnaire du serveur avec la contribution wbl http://wiki.contribs.org/Email_Whitelist-Blacklist_Control/fr
   −
These lists can be also controlled by the server-manager with the wbl contrib http://wiki.contribs.org/Email_Whitelist-Blacklist_Control
+
====Tests====
 
+
Vous pouvez consulter les statistiques d'auto-apprentissage avec cette commande. Vous pourrez noter l'accumulation des jetons de spam (ou non). Notez que le filtrage bayésien doit recevoir 200 messages de pourriels avant qu'il ne commence à fonctionner, alors ne vous attendez pas à des résultats instantanés.
====Testing====
  −
 
  −
You can check the auto-learning statistics with this command. You will be able to note the accumulation of the spam tokens (or not). Note that the Bayesian filtering must receive 200 spam messages before it starts to function, so don't expect instantaneous results.
  −
 
   
  sa-learn --dump magic
 
  sa-learn --dump magic
   −
You can check the spam filter log with this command:
+
Vous pouvez consulter le journal du filtre anti-spam avec cette commande :
 
   
  tail -50 /var/log/spamd/current | tai64nlocal
 
  tail -50 /var/log/spamd/current | tai64nlocal
   −
Check spamassassin configuration like this:
+
Vérifiez la configuration de SpamAssassin comme ceci :
 
   
  spamassassin -D --lint
 
  spamassassin -D --lint
   −
If you ever see an error such as:
+
Si jamais vous voyez une erreur telle que :
 
   
  warn: bayes: cannot open bayes databases /etc/mail/spamassassin/bayes_* R/W: tie failed: Permission denied
 
  warn: bayes: cannot open bayes databases /etc/mail/spamassassin/bayes_* R/W: tie failed: Permission denied
   −
Try adjusting some permissions with these commands:
+
Essayez de régler certaines autorisations avec ces commandes :
 
   
  chown :spamd /var/spool/spamd/.spamassassin/*
 
  chown :spamd /var/spool/spamd/.spamassassin/*
 
  chmod g+rw /var/spool/spamd/.spamassassin/*
 
  chmod g+rw /var/spool/spamd/.spamassassin/*
   −
===Real-time Blackhole List (RBL)===
+
===Liste « trou noir » en temps réel (RBL)===
Enabling RBL's <br>
+
[[https://fr.wikipedia.org/wiki/Lutte_anti-spam#RBL| RBL]]
RBL's are disabled by default to allow maximum accommodation (your ISP may be on a RBL & you may not know it). You can enable RBL's by:
+
 
 +
Activation de la RBL<br>
 +
Les RBL sont désactivées par défaut pour permettre une adaptation maximale (votre fournisseur d'accès peut être sur un RBL et vous ne le savez peut-être pas). Vous pouvez activer les RBL :
 
  config setprop qpsmtpd DNSBL enabled RHSBL enabled
 
  config setprop qpsmtpd DNSBL enabled RHSBL enabled
 
  signal-event email-update
 
  signal-event email-update
   −
You can see your RBL's by:
+
Vous pouvez voir vos RBL par :
 
  config show qpsmtpd
 
  config show qpsmtpd
   −
You can add to your RBL's by:
+
Vous pouvez ajouter à vos RBL par :
 
  config setprop qpsmtpd RBLList <rbl-list-name>
 
  config setprop qpsmtpd RBLList <rbl-list-name>
 
  signal-event email-update
 
  signal-event email-update
   −
Many will argue what's best, some say the SME defaults are too aggressive and affect some popular free webmail accounts, but most would agree that you can set stable, conservative and non aggressive settings by:
+
Beaucoup diront que c'est le mieux, certains disent que les valeurs par défaut du Serveur SME sont trop agressives et affectent certains comptes webmail gratuits et populaires, mais la plupart seraient d'accord que vous pouvez régler des paramètres stables, conservateurs et non agressifs par :
 
  config setprop qpsmtpd RBLList zen.spamhaus.org
 
  config setprop qpsmtpd RBLList zen.spamhaus.org
 
  signal-event email-update
 
  signal-event email-update
   −
A conservative setting for the associated DNSBL SBLList is:
+
Un cadre conservateur pour la DNSBL Associated SBLList est :
 
  config setprop qpsmtpd SBLList dbl.spamhaus.org
 
  config setprop qpsmtpd SBLList dbl.spamhaus.org
 
  signal-event email-update
 
  signal-event email-update
      −
Note: More information on this topic can be found here:
+
Note : plus d'information sur ce sujet peut être trouvée ici :
 
[http://wiki.contribs.org/Updating_to_SME_7.2#RHSBL_Servers]
 
[http://wiki.contribs.org/Updating_to_SME_7.2#RHSBL_Servers]
 
[http://wiki.contribs.org/Updating_to_SME_7.2#DNSBL_Servers]
 
[http://wiki.contribs.org/Updating_to_SME_7.2#DNSBL_Servers]
   −
====Possible issues with RBL====
+
====Problèmes possibles avec RBL====
When an external dns provider is set in the console menu, it may interfere with some blaclists activated here (RHSBL and DNSBL). the black.uribl.com is know to bounce all emails in this case with a rejection message delivered to the sender. You can in this case
+
Quand un fournisseur de DNS externe est configuré dans le menu de la configuration du serveur (en console), il peut interférer avec certaines listes noires activées ici (RHSBL et DNSBL). L'adresse black.uribl.com est connue pour renvoyer tous les courriels dans ce cas avec un message de rejet remis à l'expéditeur. Vous pouvez dans ce cas :
* Remove the black.uribl.com of your SBLList  
+
* Retirer black.uribl.com de votre liste SBLList :
 
  config setprop qpsmtpd SBLList multi.surbl.org:rhsbl.sorbs.net:dbl.spamhaus.org
 
  config setprop qpsmtpd SBLList multi.surbl.org:rhsbl.sorbs.net:dbl.spamhaus.org
 
  signal-event email-update
 
  signal-event email-update
* Let the SME Server being the only dns resolver by removing the dns provider/forwarder in the console menu.
+
* Laisser le serveur SME comme seul résolveur DNS en supprimant le fournisseur de DNS/intermédiaire dans le menu de la console.
   −
See http://uribl.com/about.shtml#abuse for more information about this issue with black.uribl.com
+
Voir http://uribl.com/about.shtml#abuse pour plus d'informations sur cette question avec black.uribl.com
 +
 
 +
====Listes obsolètes====
 +
Ces listes ne peuvent pas être utilisées avec le Serveur SME. Un fragment migré va les supprimer de vos paramètres à chaque fois que vous reconfigurerez votre serveur.
   −
====Obsolete lists====
  −
These lists can not be used with smeserver. A migrate fragment will remove them from your settings each time you reconfigure your server.
   
* RBLList
 
* RBLList
 +
 
       combined.njabl.org
 
       combined.njabl.org
 
       list.dsbl.org
 
       list.dsbl.org
 
       multihop.dsbl.org
 
       multihop.dsbl.org
 
       dnsbl.ahbl.org
 
       dnsbl.ahbl.org
 +
 
* SBLLIST
 
* SBLLIST
   Line 311: Line 307:  
       ex.dnsbl.org
 
       ex.dnsbl.org
   −
===Server Only===
+
===Serveur seulement===
Some of the spam filter rules cannot work unless the SMESERVER knows the external IP of the box. If you put a SMESERVER in server-only mode behind other firewalls, it will lose some of the anti-spam rules. For example, the rule that blocks attempts where spammers try "HELO a.b.c.d" where a.b.c.d is your external IP address.
+
Certaines des règles de filtrage anti-pourriels ne peuvent fonctionner que si le serveur SME connaît l'adresse IP externe du modem. Si vous mettez un Serveur SME en mode « serveur seulement » derrière d'autres pare-feux, il perdra certaines des règles anti-pourriels. Par exemple, la règle qui bloque les tentatives où les spammeurs tentent « HELO A.B.C.D » où A.B.C.D est votre adresse IP externe.
 
  −
Unfortunately, many admins believe that port-forwarding SMTP provides additional security. It doesn't, it limits the SMESERVER's ability to apply some rules.
      +
Malheureusement, de nombreux administrateurs pensent que la redirection de port SMTP offre une sécurité supplémentaire. Ce n'est pas le cas, cela limite la capacité du Serveur SME à appliquer certaines règles.
   −
===I want to enable GreyListing===
+
===Je veux activer GreyListing===
GreyListing support is under the covers and can easily be enabled for those who know what they are doing. However, many experienced users found that they spent more time looking after the greylisting configuration than they received in benefit.
+
Le support de GreyListing est confidentiel et peut facilement être activé par ceux qui savent ce qu'ils font. Cependant, de nombreux utilisateurs expérimentés ont constaté qu'ils ont passé plus de temps à la configuration de la liste grise qu'ils en ont reçu en services rendus.
see [[Greylisting]]
+
Voir la [[Greylisting]].
   −
===Bayesian Filtering===
+
=== Filtrage bayésien ===
From [[wikipedia:Naive_Bayes_spam_filtering|Wikipedia]]:
+
De [[wikipedia: Naive_Bayes_spam_filtering | Wikipedia]]:
<blockquote>Naive Bayes classifiers work by correlating the use of tokens (typically words, or sometimes other things), with spam and non-spam e-mails and then using Bayes' theorem to calculate a probability that an email is or is not spam.</blockquote>
+
<Blockquote> Les classificateurs Naive Bayes fonctionnent en corrélant l'utilisation des jetons (généralement des mots, ou parfois d'autres choses), avec des pourriels et des courriels, puis en utilisant le théorème de Bayes pour calculer la probabilité qu'un courrier électronique soit ou non un spam.</Blockquote>
   −
SME server supports bayesian filtering, but does not have it enabled by default.
+
Le serveur SME prend en charge le filtrage bayésien, mais il n'est pas activé par défaut.
   −
Enabling bayesian filtering, autolearning, and spam/ham training allows spamassassin to learn from received email and improve spam filter performance. [[Bugzilla: 6822]]
+
L'activation du filtrage bayésien, de l'auto-apprentissage et de la formation sur le spam / ham permet à spamassassin d'apprendre à partir des courriels reçus et d'améliorer les performances du filtre anti-spam. [[Bugzilla: 6822]]
   −
====Bayesian Autolearning====
+
====Autoapprentissage bayésien====
The following command will enable the bayesian learning filter and set thresholds for the bayesian filter.
+
La commande suivante activera le filtre d'apprentissage bayésien et réglera des seuils pour le filtre bayésien.
 
  config setprop spamassassin UseBayes 1
 
  config setprop spamassassin UseBayes 1
 
  config setprop spamassassin BayesAutoLearnThresholdSpam 6.00
 
  config setprop spamassassin BayesAutoLearnThresholdSpam 6.00
 
  config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10
 
  config setprop spamassassin BayesAutoLearnThresholdNonspam 0.10
 +
config setprop spamassassin UseBayesAutoLearn 1
 
  expand-template /etc/mail/spamassassin/local.cf
 
  expand-template /etc/mail/spamassassin/local.cf
 
  sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
 
  sa-learn --sync --dbpath /var/spool/spamd/.spamassassin -u spamd
Line 343: Line 339:  
  config setprop spamassassin TagLevel 4
 
  config setprop spamassassin TagLevel 4
 
  config setprop spamassassin Sensitivity custom
 
  config setprop spamassassin Sensitivity custom
 +
config setprop spamd SpamLearning enabled
 
  signal-event email-update
 
  signal-event email-update
   −
These commands will:
+
Ces commandes :
* enable spamassassin
+
 
* configure spamassassin to reject any email with a score above 12
+
* activeront spamassassin ;
* tag spam scored between 4 and 12 in the email header
+
* configuront spamassassin pour rejeter tout courriel de score supérieur à 12 ;
* enable bayesian filter
+
* marqueront comme pourriel dans l'objet ceux de score compris entre 4 et 12 ;
* 'autolearn' as SPAM any email with a score above 6.00
+
* activeront le filtre bayésien ;
Note: SpamAssassin requires at least 3 points from the header, and 3 points from the body
+
* 'auto-apprendront' comme POURRIEL tout courriel de score supérieur à 6.00 ;
to auto-learn as spam.
  −
Therefore, the minimum working value for this option is 6, to be changed in increments of 3,
  −
12 considered to be a good working value..
  −
* 'autolearn' as HAM any email with a score below 0.10
     −
Check the bayes stats with the command:
+
Note : SpamAssassin a besoin d'au moins 3 points de l'objet (header) et de 3 points du corps pour auto-apprendre à détecter un pourriel.
 +
Par conséquent, la valeur minimale de fonctionnement de cette option est 6, à modifier par incrément de 3, 12 étant considéré comme une bonne valeur de fonctionnement.
 +
* 'auto-apprendront' comme HAM tout courriel de score inférieur à 0.10.
 +
 
 +
Vérifiez les statistiques bayésiennes avec la commande :
 
  sa-learn --dump magic
 
  sa-learn --dump magic
   −
The database is located in /var/spool/spamd/.spamassassin/bayes
+
La base de données est située dans /var/spool/spamd/.spamassassin/bayes.
   −
====LearnAsSpam / LearnAsHam (spam/ham training)====
+
====LearnAsSpam / LearnAsHam (apprentissage spam/ham)====
   −
LearnAsSpam & LearnAsHam are scripts that can be installed on your server to allow users to manually "train" the bayes database. Training is done by users moving Spam from their Inbox to the "LearnAsSpam" folder, and by COPYING real email that was delivered to junkmail into the "LearnAsHam" folder. All messages in both LearnAsSpam and LearnAsHam are deleted once they have been processed and their tokens have been added to the bayes database.
+
LearnAsSpam & LearnAsHam sont des scripts qui peuvent être installés sur votre serveur pour permettre aux utilisateurs d'« entraîner » manuellement la base de données Bayes. La formation est effectuée par les utilisateurs en déplaçant le courriel indésirable (le spam) de leur boîte de réception vers le dossier « LearnAsSpam », et en COPIANT le courriel véritable envoyé par erreur dans le dossier « pourriels » (junk) dans le dossier « LearnAsHam ». Tous les messages dans LearnAsSpam et LearnAsHam sont supprimés une fois qu'ils ont été traités et leurs jetons ajoutés à la base de données Bayes.
   −
To install:
+
Pour l'installation :
   −
<ol>
+
* Activez la base de données bayes comme décrit dans [[Email/fr#Autoapprentissage_bay.C3.A9sien | Auto-apprentissage bayésien]] (ce n'est pas la meilleure approche, préférez l'apprentissage manuel par l'utilisateur), ou
<li>Enable bayes database as described in [[Email#Bayesian_Autolearning | Bayesian Autolearning]]</li>
+
* Installez smeserver-learn comme indiqué sur la page du wiki [[Learn/fr | Learn]] (et maintenez l'autoapprentissage désactivé), puis
<li>Install smeserver-learn as per wiki page [[Learn]]</li>
+
* Demandez à vos utilisateurs de déplacer tout le courrier indésirable trouvé dans leur boîte de réception vers leur dossier LearnAsSpam et de COPIER tout courriel non spam (ham) trouvé dans leur dossier junkmail dans leur dossier LearnAsHam.
<li>Instruct your users to move any SPAM they find from their Inbox to their LearnAsSpam folder, and to COPY any non-spam (ham) they find in their junkmail folder into their LearnAsHam folder.</li>
  −
</ol>
     −
This is a really efficient way to reduce impact of SPAM to your particular installation. Do not fear to run again files that are tagged as SPAM, as they will either get ignored if all their patterns are known, or the Bayes might catch one more pattern that could help you to get ride of the next incoming SPAM to even get accepted.
+
C'est un moyen très efficace de réduire l'impact du spam sur votre installation. Ne craignez pas de réexécuter des fichiers étiquetés en tant que SPAM, car ils seront soit ignorés si tous leurs modèles sont connus, soit les Bayes risquent d’attraper un modèle de plus qui pourrait vous aider à éviter le prochain SPAM entrant d'être accepté.
 +
 
 +
Si vous le souhaitez, le code ci-dessous compte le nombre de courriels contenus dans les répertoires LearnAsSpam et LearnAsHam (de tous les utilisateurs). C'est utile pour savoir si vos utilisateurs utilisent ces dossiers. Cependant, Learn vous enverra un rapport après chaque passe. Si vous êtes intéressé(e) par le nombre de courriels laissés dans le répertoire junkmail sans aucune attention, vous pouvez installer [[mailstats | smeserver-mailstats]] et activer l'option pour les compter.
   −
If you want, the code below counts how many e-mail are in LearnAsSpam and LearnAsHam directories (of all users). It's useful to know if your users are using those folders. However Learn will send you a report after each pass. If you are interested on the number of emails lefts in the junkmail directory without any attention, you could install [[mailstats | smeserver-mailstats]] and activate the option to account for them
   
<pre>
 
<pre>
 
#!/bin/bash
 
#!/bin/bash
Line 419: Line 415:  
</pre>
 
</pre>
   −
====Learn Contrib====
+
====Contribution Learn====
The [[Learn]] contrib was intended to install and configure the bayes training tools LearnAsSpam & LarnAsHam but is no longer maintained(?)
+
La contribution [[Learn/fr | Learn]] est destinée à installer et configurer les outils d'apprentissage Bayesien LearnAsSpam & LarnAsHam.
   −
====Reset the Bayes Database====
+
====Remettre la base de données Bayésienne à zéro====
Based on this forum post http://forums.contribs.org/index.php/topic,50712.msg258844.html#msg258844 it may be advantageous to remove the bayes database every few years & recreate it, in order to improve spam filtering performance.  
+
Fondé sur ce fil de forum http://forums.contribs.org/index.php/topic,50712.msg258844.html#msg258844, il peut être avantageux de vider les bases de données Bayésiennes au bout de quelques années et de les re-créer, de façon à tester la performance du filtrage des pourriels.  
   −
Follow these instructions to turn bayes OFF, delete the database, create an empty database, and turn bayes back on:
+
Suivre ces instructions pour arrêter l'auto-apprentissage Bayésien, effacer la base de données, créer une base de données vide et redémarrer l'auto-apprentissage Bayésien :
    
  config setprop spamassassin UseBayes 0
 
  config setprop spamassassin UseBayes 0
Line 438: Line 434:  
  chmod 640 /var/spool/spamd/.spamassassin/bayes_*  
 
  chmod 640 /var/spool/spamd/.spamassassin/bayes_*  
 
  signal-event email-update
 
  signal-event email-update
 +
 +
Les mises à jour de smeserver-spamassasin nécessitent désormais deux nouveaux paramètres de base de données de configuration pour activer l'auto-apprentissage bayésien. Voir le message du forum à https://forums.contribs.org/index.php/topic,54320.msg284208.html#msg284208
    
===The Sonora Communications "Spam Filter Configuration for SME 7" howto===
 
===The Sonora Communications "Spam Filter Configuration for SME 7" howto===
Line 443: Line 441:  
http://www.sonoracomm.com/support/19-inet-support/49-spam-filter-configuration-for-sme-7
 
http://www.sonoracomm.com/support/19-inet-support/49-spam-filter-configuration-for-sme-7
   −
===GeoIP: spam blocking based on geographical information===
+
===GeoIP : blocage de pourriel fondé sur des informations géographiques===
   −
The GeoIP plugin for Spamassasin lets us know where our mail server is receiving mail from. If we're receiving too much spam from a particular location, this will help track it down. We can then use that info to reject connections from that place taking the load off our server.
+
Le module d'extension GeoIP pour Spamassasin nous permet de savoir d’où notre serveur de messagerie reçoit un courriel. Si nous recevons trop de pourriels d'un endroit particulier, cela aidera à le localiser. Nous pouvons ensuite utiliser cette information pour rejeter les connexions provenant de cet endroit, qui augmentent la charge de notre serveur.
   −
{{Note box | This can be a crude way of blocking spam and potentially also block legitimate users!}}
+
{{Note box | type=Note :| cela peut être un moyen grossier de bloquer le spam et aussi, potentiellement, de bloquer les utilisateurs légitimes !}}
   −
You can find information how to install and use it on the [[GeoIP]] page.
+
Vous pouvez trouver des informations sur son installation et son utilisation sur la page [[GeoIP]].
   −
==Anti Virus==
+
==Antivirus==
SME Server uses Clam AntiVirus (http://www.clamav.net) as the default and built-in anti virus engine.
+
Le serveur SME-KOOZALI utilise Clam AntiVirus (http://www.clamav.net) comme moteur antivirus intégré et par défaut.
 +
===Les signatures===
   −
===Signatures===
+
Par défaut, le serveur SME-KOOZALI obtiendra automatiquement les mises à jour de la base de données de signatures de virus de ClamAV.
By default SME Server will automatically get virus signature database updates from ClamAV.
     −
Other people and organizations have developed additional signatures which can also be used with ClamAV to provide extra protection. Databases of these signatures can be downloaded and installed on SME Server, and used by ClamAV
+
D'autres personnes et organisations ont développé des signatures supplémentaires pouvant également être utilisées avec ClamAV pour fournir une protection supplémentaire. Les bases de données de ces signatures peuvent être téléchargées et installées sur le serveur SME-KOOZALI et utilisées par ClamAV.
   −
In order to automate the download and installation of the additional databases, as well as control which databases you use, follow the instruction in the [[Virus:Additional_Signatures|Virus:Additional Signatures]] Howto
+
Pour automatiser le téléchargement et l'installation des bases de données supplémentaires, ainsi que pour contrôler les bases de données que vous utilisez, suivez les instructions données dans le [[Virus:Additional_Signatures|Virus:Additional Signatures]] Howto (en anglais).
 +
===Analyse heuristique===
 +
HeuristicScanPrecedence est une nouvelle option de clamav 0.94.
   −
===Heuristic Scan===
+
Lorsqu'elle est activée, si une analyse heuristique (telle que phishingScam) détecte un éventuel virus/ameçonnage, elle cessera immédiatement. Recommandé, elle économise du temps d'analyse de processeur.
HeuristicScanPrecedence is a new option in clamav 0.94.
     −
When enabled, if a heuristic scan (such as phishingScam) detects a possible virus/phish it will stop scan immediately. Recommended, saves CPU scan-time.
+
Pour activer cette fonctionnalité :
 +
  config setprop clamav HeuristicScanPrecedence yes
 +
  expand-template /etc/clamd.conf
 +
  sv t clamd
   −
To enable this feature:
+
La valeur est désactivée par défaut.
config setprop clamav HeuristicScanPrecedence yes
+
=== Filtrage des pièces jointes ===
expand-template /etc/clamd.conf
+
La fonctionnalité permettant de bloquer d'éventuels fichiers exécutables et de virus joints aux courriels a été intégrée à SME Server v7.x. Consultez la page [[SME_Server:Documentation:Administration_Manual:Chapter13/fr#13.10.2._Param.C3.A8tres_de_filtrage_des_courriels | Messagerie électronique]] dans le gestionnaire du serveur.
sv t clamd
     −
Default is disabled.
+
Des modèles supplémentaires de signature de fichier peuvent être ajoutés aux valeurs par défaut SME. Voir le guide pratique [[Virus:Email_Attachment_Blocking | Virus: Email Attachment Blocking]] (en anglais) pour plus d'informations.
   −
===Attachment Filtering===
+
===Filtrage des pièces jointes===
The functionality to block possible executable and virus files attached to emails has been incorporated into SME Server v7.x. See the [[SME_Server:Documentation:Administration_Manual:Chapter13#E-mail_Filtering|Email]] panel in server manager.
+
La fonctionnalité permettant de bloquer les éventuels fichiers exécutables et virus joints aux courriels a été intégrée à SME Server v7.x. Voir le panneau [[https://wiki.koozali.org/SME_Server:Documentation:Administration_Manual:Chapter13/fr#13.10.2._Param.C3.A8tres_de_filtrage_des_courriels|Email]] dans le gestionnaire de serveur.
   −
Additional file signature patterns can be added to the SME defaults. See the [[Virus:Email_Attachment_Blocking|Virus:Email Attachment Blocking]] Howto for further information
+
Des modèles de signature de fichier supplémentaires peuvent être ajoutés aux valeurs par défaut de SME. Voir le tutoriel [[Virus:Email_Attachment_Blocking|Virus:Email Attachment Blocking]] pour plus d'informations.
   −
==Email Clients==
+
==Clients de messagerie (courrielleurs)==
==="concurrency limit reached" when using IMAP===
+
===Message « concurrency limit reached » en utilisation IMAP===
Sometime shows as Thunderbird giving this error message,
+
Ce message d'erreur apparaît parfois de Thunderbird :
 
''This Mail-server is not a imap4 mail-server''
 
''This Mail-server is not a imap4 mail-server''
   −
To workaround thunderbirds limitations change, this thunderbird setting to false
+
Pour contourner ces limitations de Thunderbirds, changer ce paramètre de Thunderbird sur false
* Preferences, Advanced, Config editor (aka about:config): filter on tls.
+
 
* set security.enable_tls to false
+
*Préférences, Avancé, Éditeur de configuration (alias about:config) : filtre sur tls.
 +
* définir security.enable_tls sur « false ».
 +
 
 +
Si la limite totale de simultanéité est atteinte, cela ressemblera à ceci dans /var/log/dovecot/current :
 +
 
 +
@400000005a1c2c1f19c9381c master: Warning: service(imap): process_limit (2) reached, client connections are being dropped
 +
 
 +
@400000005a1c2c291a4712dc imap-login: Error: read(imap) failed: Remote closed connection (destination service { process_limit } reached?)
   −
You can also increase the ConcurrencyLimitPerIP and/or ConcurrencyLimit value for imap and/or imaps (secure)
+
@400000005a1c2c291a471aac imap-login: Error: read(imap) failed: Remote closed connection (destination service { process_limit } reached?)
 +
 
 +
 
 +
Pour la limite de simultanéité par adresse IP, cela ressemblera à ceci :
 +
 
 +
@400000005a1c2c6214542b94 imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=2): user=<someone>, method=PLAIN, rip=192.168.x.y, lip=192.168.z.t, TLS, session=<abcdefgh>
 +
 
 +
@400000005a1c2c6233f1bcb4 imap-login: Info: Maximum number of connections from user+IP exceeded (mail_max_userip_connections=2): user=<someone>, method=PLAIN, rip=192.168.x.y, lip=192.168.z.t, TLS, session=<ijklmnop>
 +
 
 +
Les commandes suivantes vous donneront la valeur actuelle :
 +
db configuration getprop imap ConcurrencyLimit || echo 400
 +
  db configuration getprop imap ConcurrencyLimitPerIP || echo 12
 +
 
 +
Vous pouvez aussi augmenter les valeurs des paramètres ConcurrencyLimitPerIP et/ou ConcurrencyLimit pour imap et/ou imaps (sécure)
 
  config setprop imap ConcurrencyLimitPerIP 20
 
  config setprop imap ConcurrencyLimitPerIP 20
 
  config setprop imaps ConcurrencyLimitPerIP 20
 
  config setprop imaps ConcurrencyLimitPerIP 20
 
  signal-event post-upgrade; signal-event reboot
 
  signal-event post-upgrade; signal-event reboot
{{Note box| for sme9, only the key imap has properties ConcurrencyLimitPerIP,checkConcurrencyLimit,ProcessMemoryLimit. If you set these properties to the key imaps, a migrate fragment will remove them automatically}}
+
{{Note box|type=Note : |pour SME9, seules les clés imap ont des propriétés ConcurrencyLimitPerIP, checkConcurrencyLimit, ProcessMemoryLimit. si vous réglez ces propriétés sur les clés imaps, un fragment de migration les supprimera automatiquement.}}
 +
Pour voir la configuration :
 +
config show imap
   −
config show imap
+
  tail -f /var/log/dovecot/current | tai64nlocal #anciennement
  tail -f /var/log/imap/current | tai64nlocal
     −
More detail can be found  [http://forums.contribs.org/index.php?topic=33124.0 here].
+
Plus de détails peuvent être trouvés en anglais [http://forums.contribs.org/index.php?topic=33124.0 ici] ou [https://forums.contribs.org/index.php/topic,51872.0 ici].
   −
{{Tip box|You can see if you are running out of the number of available connections in your log file /var/log/imaps/current and look for messages like the log extract below where the ConcurrencyLimitPerIP was set to 20. A 21st connection was attempted and was denied.
+
{{Tip box|type=Astuce : |vous pouvez voir si vous manquez de connexions disponibles dans votre fichier journal /var/log/imaps/current et rechercher des messages comme l'extrait de journal ci-dessous où le paramètre ConcurrencyLimitPerIP a été défini sur 20. Une 21e connexion a été tentée et a été refusée.
    
  tcpsvd: info: pid 30693 from 10.1.0.104
 
  tcpsvd: info: pid 30693 from 10.1.0.104
Line 504: Line 526:  
  tcpsvd: info: deny 30693 0:10.1.0.21 ::10.1.0.104:49332 ./peers/10.1.0
 
  tcpsvd: info: deny 30693 0:10.1.0.21 ::10.1.0.104:49332 ./peers/10.1.0
 
}}
 
}}
{{Tip box|Mobile devices have a tendency to frequently disconnect and connect from the network. When this disconnect happens, the sessions on the server are not always immediately cleaned up (they get cleaned up after a time out of some minutes). When the email client reconnects, they create new network connections and you get into the situation that these new connections get denied because of the concurrency limit. On the mobile device this may be noted as a "Unable to connect to server" message.
+
{{Tip box|type=Astuce :| les oordinateurs portables ont tendance à se déconnecter fréquemment du réseau et à se reconnecter. Quand cette déconnection se fait, les sessions créées sur le serveur ne sont pas immédiatement nettoyées (il faut un délai de quelques minutes avant qu'elles ne le soient. Quand le client courriel se reconnecte, il crée de nouvelles connexions réseau et vous vous trouvez dans la situation où ces nouvelles connexions sont refusées à cause de la limite de simultanéité. Sur l'ordinateur portable, cela peut générer un message comme « Impossible de se connecter au serveur ».}}
}}
+
{{Tip box|type=Astuce : |certains clients de messagerie utilisent une connexion distincte par dossier imap, de sorte que les limites de simultanéité peuvent se produire pour les utilisateurs qui ont de nombreux dossiers imap.}}
{{Tip box|Some email clients use a separate connection per imap folder, so the concurrency limits may occur for users that have many imap folders.
  −
}}
     −
===Mail server is not an IMAP4 mail server===
+
===« Mail server is not an IMAP4 mail server »===
This is a bug in Thunderbird, the previous tips may help
+
C'est un bogue de Thunderbird, les précédentes astuces peuvent aider.
    
===The Bat===
 
===The Bat===
Line 537: Line 557:  
  -click OK > NEXT > FINISHED
 
  -click OK > NEXT > FINISHED
 
  -you're finished, your email should work now
 
  -you're finished, your email should work now
 +
 +
===Outlook 2013 on Windows 10 gives "An unknown error occurred, error code 0x8004011c" when attempting an IMAP connection for a DOMAIN user===
 +
This is a known issue with the above combination of Windows and Outlook version as of 2015-02-18 (see: [http://bugs.contribs.org/show_bug.cgi?id=9618 Bug 9618]).
 +
 +
The following registry key resolves the issue: To work around this problem, set the value of the ProtectionPolicy registry entry to 1 to enable local backup of the MasterKey instead of requiring a RWDC in the following registry subkey:
 +
[HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography\Protect\Providers\df9d8cd0-1501-11d1-8c7a-00c04fc297eb] "ProtectionPolicy"=dword:00000001
 +
The PortectionPolicy entry may need to be created
    
===Outlook 2013 on Windows 8.1 gives error 0x800CCC1A when sending over SMTP port 465===
 
===Outlook 2013 on Windows 8.1 gives error 0x800CCC1A when sending over SMTP port 465===
Line 576: Line 603:  
  signal-event email-update
 
  signal-event email-update
   −
===After I upgrade my SME Server, my email folders have disappeared when using IMAP===
+
===Après avoir mis à niveau mon serveur SME, mes dossiers de messagerie ont disparu en utilisant l'IMAP===
After upgrade, if there are missing IMAP folders, the client may need to re-subscribe to folders. This may affect either webmail users or users who use an IMAP email client.
+
Après une mise à niveau vers une nouvelle version, s'il y a des dossiers IMAP manquants, le client peut avoir besoin de se réabonner aux dossiers. Cela peut affecter soit les utilisateurs de webmail, soit ceux qui utilisent un client de messagerie IMAP.
    
===Entourage: Using SME's Self-Signed Certificate for SSL Connections from Entourage on OS X 10.4===
 
===Entourage: Using SME's Self-Signed Certificate for SSL Connections from Entourage on OS X 10.4===
Line 608: Line 635:  
If you are accessing your SME server using a different name than the one encoded in the certificate you will still receive a security warning from Entourage, but "OK" will now grant access to your folders.
 
If you are accessing your SME server using a different name than the one encoded in the certificate you will still receive a security warning from Entourage, but "OK" will now grant access to your folders.
   −
Notes:  
+
Notes :
 +
 
* Procedure mostly taken from http://www.kerio.com/manual/kmsug/en/ch09s06.html
 
* Procedure mostly taken from http://www.kerio.com/manual/kmsug/en/ch09s06.html
 
* I still get various other IMAP errors due, I suspect, to the "concurrency limit reached" issue.
 
* I still get various other IMAP errors due, I suspect, to the "concurrency limit reached" issue.
 
* Click on "Show Keychains" in Apple's "Keychain Access" if you need to delete a certificate and try again.
 
* Click on "Show Keychains" in Apple's "Keychain Access" if you need to delete a certificate and try again.
   −
===How do I get my e-mail to show the correct From Address===
+
===Comment puis-je faire en sorte que mon courriel affiche l'adresse d'expéditeur correcte===
 +
 
 +
L'adresse « De : » d'un courriel n'est pas fournie par le serveur. Elle est fournie par le client de messagerie.
 +
 
 +
* Configurez votre compte dans votre client de messagerie avec la bonne adresse « De : ».
 +
* Vous pouvez changer l'adresse « De : » dans le webmail avec ce qui suit :
 +
**Connectez-vous au webmail en tant qu'utilisateur, allez dans ''options-informations personnelles'' et changez ''identité'' pour avoir la bonne adresse « De : ». Vous pouvez avoir plusieurs identités avec un seul utilisateur.
 +
 
 +
Certains e-courriels générés par le système sont créés par le serveur, certaines contributions peuvent envoyer des courriels en externe, dans ces cas, vous avez besoin d'un nom de domaine valide pour le serveur, achetez-en un ou utilisez un fournisseur gratuit comme dyndns.org.
   −
The From address on an e-mail is not supplied by the server. It is supplied by the e-mail client.
+
===Outlook 365 / Outlook 2019 IMAP Configuration===
   −
* Configure your Account in your e-mail client with the correct FROM address.
+
Microsoft has disabled the ability to enter the IMAP/SMTP username in the account setup wizard in Outlook 365 / 2019 for Windows.  The wizard used within Outlook requires that the IMAP/SMTP username be the full email address.
* You can change the FROM address in webmail with the following:
  −
**Login to webmail as the user, go to ''options-personal information'' and change the ''identity'' to have the correct FROM address. You can have multiple identities with a single user.
     −
Some system generated email is created by the server, some contribs may send mail externally, in these cases you need a valid domain name for the server, buy one or use a free provider like dyndns.org
+
To work around this issue, setup the account using "Mail (Microsoft Outlook 2016)" in the Windows control panel:
 +
[[File:Screen Shot 2019-12-04 at 6.44.18 AM.png|450px]]
   −
==Server Settings==
+
==Réglages du serveur==
 
===qmail ConcurrencyLocal===
 
===qmail ConcurrencyLocal===
The default value for /var/qmail/control/concurrencylocal is 20. This setting controls the maximum amount of simultaneous local deliveries.
+
La valeur par défaut pour /var/qmail/control/concurrencylocal est 20. Ce réglage controle le nombre maximum d'envois simultanés en local.
   −
There is a optional database property (does not show unless changed from the default setting) called ConcurrencyLocal for qmail in the config database. The ConcurrencyLocal property changes the value stored in /var/qmail/control/concurrencylocal.
+
Il y a une propriété optionnelle de la base de données (qui n'apparaît pas jusqu'à qu'elle soit modifiée de sa valeur par défaut) dénommée ConcurrencyLocal pour qmail dans la base de données de configuration. La propriété ConcurrencyLocal change la valeur enregistrée dans /var/qmail/control/concurrencylocal.
   −
It can be set, for example to decrease the local concurrency limit
+
Elle peut être réglée, par exemple, pour diminuer la limite de concurrence :
 
  config setprop qmail ConcurrencyLocal 6
 
  config setprop qmail ConcurrencyLocal 6
 
  signal-event email-update
 
  signal-event email-update
    
===qmail ConcurrencyRemote===
 
===qmail ConcurrencyRemote===
The default value for /var/qmail/control/concurrencyremote is 20. This setting controls the maximum amount of simultaneous remote deliveries.
+
La valeur par défaut pour /var/qmail/control/concurrencyremote est 20. Ce réglage controle le nombre maximum d'envois simultanés à distance.
   −
There is a optional database property (does not show unless changed from the default setting) called ConcurrencyRemote for qmail in the config database. The ConcurrencyRemote property changes the value stored in /var/qmail/control/concurrencyremote.  
+
Il y a une propriété optionnelle de la base de données (qui n'apparaît pas jusqu'à qu'elle soit modifiée de sa valeur par défaut) dénommée ConcurrencyRemote pour qmail dans la base de données de configuration. La propriété ConcurrencyRemote change la valeur enregistrée dans /var/qmail/control/concurrencyremote.  
   −
It can be set, for example to decrease the remote concurrency limit
+
Elle peut être réglée, par exemple, pour diminuer la limite de concurrence à distance :
 
  config setprop qmail ConcurrencyRemote 10
 
  config setprop qmail ConcurrencyRemote 10
 
  signal-event email-update
 
  signal-event email-update
   −
Refer also this comment by CB
+
Se référer également à ce commentaire de CB http://forums.contribs.org/index.php/topic,50091.msg251320.html#msg251320
 
  −
http://forums.contribs.org/index.php/topic,50091.msg251320.html#msg251320
     −
===How long retry before return e-mail as undeliverable===
+
===Pendant combien de temps renvoyer un courriel avant de le déclarer comme non livrable===
To configure how long SME server will try to delivery a message before return a permanent error
+
Pour configurer la durée pendant laquelle le serveur SME essaiera de livrer un message avant de renvoyer une erreur permanente :
    
  mkdir -p /etc/e-smith/templates-custom/var/qmail/control
 
  mkdir -p /etc/e-smith/templates-custom/var/qmail/control
Line 654: Line 687:  
  sv t qmail
 
  sv t qmail
   −
The default value is 604800 seconds, or one week.<br>
+
La valeur par défaut est 604800 secondes, soit une semaine.<br>
The example above shows 172800 seconds, or two days (a weekend for infra upgrade!)
+
L'exemple ci-dessus montre 172800 secondes, soit deux jours (une fin de semaine pour la mise à niveau infra !)
    
source: http://forums.contribs.org/index.php/topic,47471.0.html
 
source: http://forums.contribs.org/index.php/topic,47471.0.html
      −
===Double bounce messages===
+
===Messages à double rebond===
To stop admin receiving double bounce messages
+
Pour empêcher l'administrateur de recevoir des messages à double rebond :
   −
config setprop qmail DoubleBounceTo someoneuser
+
  config setprop qmail DoubleBounceTo nom_d_utilisateur
signal-event email-update
+
  signal-event email-update
   −
Or just delete them. You risk losing legitimate double bounces (which are
+
Ou simplement les supprimer. Vous risquez de perdre des doubles rebonds légitimes (qui sont rares, mais vous voulez les regarder quand ils se produisent) :
rare, but you want to look at them when they do occur)
     −
config setprop qmail DoubleBounceTo devnull
+
  config setprop qmail DoubleBounceTo devnull
signal-event email-update
+
  signal-event email-update
   −
see a longer explaination [[Email_delete_double-bounce_messages | here]]
+
Voir une explication plus longue [[Email_delete_double-bounce_messages | ici]].
   −
===Keep a copy of all emails===
+
===Conservez une copie de tous les courriels===
You may need to keep a copy of all emails sent to or from your email server.
+
Vous devrez peut-être conserver une copie de tous les e-mails envoyés vers ou depuis votre serveur de messagerie.
This may be for legal, or other reasons.
+
Cela peut être pour des raisons juridiques ou autres.
   −
The following instructions will create a new user account (maillog) and forward every email that goes through your SME server to it.
+
Les instructions suivantes créeront un nouveau compte utilisateur (maillog par défaut) et lui transmettront tous les courriels qui transitent par votre serveur SME.
   −
First, log onto the server-manager and create the user '''maillog'''
+
Tout d'abord, connectez-vous au gestionnaire de serveur et créez l'utilisateur '''maillog'''.
   −
Go to the SME Command Line (logon as root) and issue the following commands:
+
Accédez à la ligne de commande SME (connectez-vous en tant qu'utilisateur root) et émettez les commandes suivantes :
    
  config setprop qpsmtpd Bcc enabled
 
  config setprop qpsmtpd Bcc enabled
 
  signal-event email-update
 
  signal-event email-update
   −
Optionally make the forwarding of the emails invisible to the end user. Without it, there will be an X-Copied-To: header in each email. Run this command before the signal-event
+
En option, rendez le transfert des courriels invisible pour l'utilisateur final. Sans cela, il y aura un en-tête X-Copied-To: dans chaque courriel. Exécutez cette commande avant le « signal-event » :
    
  config setprop qpsmtpd BccMode bcc
 
  config setprop qpsmtpd BccMode bcc
   −
If you want to view the emails, point your email client at the SME and log on as maillog.
+
Si vous souhaitez afficher les courriels, pointez votre client de messagerie vers le SME et connectez-vous en tant que maillog.
 +
 
 +
Vous pouvez modifier l'utilisateur par défaut :
 +
 
 +
config setprop qpsmtpd BccUser someuser
    
====Keep a copy of outgoing emails only====
 
====Keep a copy of outgoing emails only====
Line 714: Line 750:  
More info:
 
More info:
 
  perldoc /usr/share/qpsmtpd/plugins/bcc
 
  perldoc /usr/share/qpsmtpd/plugins/bcc
      
===Set Helo hostname===
 
===Set Helo hostname===
Line 730: Line 765:  
===Set max email size===
 
===Set max email size===
   −
* IMPORTANT: [[bugzilla: 7876]] points out that if your system has ''/var/service/qpsmtpd/config/databytes'' it should be deleted. (Fixed as of smeserver-qpsmtpd-2.4.0-7.el6.sme.noarch - see [[bugzilla: 8329]]).
+
*IMPORTANT: [[bugzilla: 7876]] points out that if your system has ''/var/service/qpsmtpd/config/databytes'' it should be deleted. (Fixed as of smeserver-qpsmtpd-2.4.0-7.el6.sme.noarch - see [[bugzilla: 8329]]).
    
There are several components involved in sending email on a SME server.  Each component has a size limit that may affect an email message that passes through the server.
 
There are several components involved in sending email on a SME server.  Each component has a size limit that may affect an email message that passes through the server.
Line 736: Line 771:  
Be aware that ''email size'' is not the same thing as ''attachment size''.  Binary attachments to email are encoded using techniques that result in email sizes that can be as much as 30% larger than the original attachment. Most major email clients (Thunderbird, Apple Mail, Outlook) allow you to enable a "message size" column in the message list that will show you the size of your email messages ([http://forums.contribs.org/index.php/topic,48366.msg241720.html#msg241720 More]).
 
Be aware that ''email size'' is not the same thing as ''attachment size''.  Binary attachments to email are encoded using techniques that result in email sizes that can be as much as 30% larger than the original attachment. Most major email clients (Thunderbird, Apple Mail, Outlook) allow you to enable a "message size" column in the message list that will show you the size of your email messages ([http://forums.contribs.org/index.php/topic,48366.msg241720.html#msg241720 More]).
   −
{| width="100%" border="1" cellpadding="5" cellspacing="0"
+
{| width="100%" cellspacing="0" cellpadding="5" border="1"
! Subsystem
+
!Subsystem
! Function
+
!Function
! Default Limit
+
!Default Limit
! Command to change size
+
!Command to change size
! Notes
+
!Notes
 
|-
 
|-
 
|qmail
 
|qmail
Line 753: Line 788:  
|15M
 
|15M
 
|config&nbsp;setprop&nbsp;clamav&nbsp;MaxFileSize&nbsp;15M
 
|config&nbsp;setprop&nbsp;clamav&nbsp;MaxFileSize&nbsp;15M
|Value includes human-readable abbreviations.  "15M" equals 15 MegaBytes.  
+
|Value includes human-readable abbreviations.  "15M" equals 15 MegaBytes.
 +
|-
 +
|clamd
 +
|Involved in attachment virus scanning
 +
|1400000000
 +
|config&nbsp;setprop&nbsp;clamd&nbsp;MemLimit&nbsp;1400000000
 +
|May require increase per [https://forums.contribs.org/index.php?topic=54070.0;topicseen this forum topic]
 
|-
 
|-
 
|qpsmtpd
 
|qpsmtpd
Line 776: Line 817:     
These attributes could result in the rejection of a  compressed attachment on a SME server:
 
These attributes could result in the rejection of a  compressed attachment on a SME server:
* ArchiveMaxCompressionRatio (default 300)
+
 
* MaxFiles (default 1500)
+
*ArchiveMaxCompressionRatio (default 300)
* MaxRecursion (default 8)
+
*MaxFiles (default 1500)
 +
*MaxRecursion (default 8)
 +
 
 
====spamassassin====
 
====spamassassin====
 
By default the qpsmtpd 'spamassassin' plugin does not pass any messages over 500,000 bytes to spamassassin for scanning.  
 
By default the qpsmtpd 'spamassassin' plugin does not pass any messages over 500,000 bytes to spamassassin for scanning.  
Line 803: Line 846:  
  signal-event email-update
 
  signal-event email-update
   −
=== Large attachments not displaying in webmail ===
+
===Large attachments not displaying in webmail===
 
Due to limits set in the PHP configuration it might be that webmail will not display large attachments (see also [[bugzilla:3990]]). The following entries are related to the error and can be found in the log files:
 
Due to limits set in the PHP configuration it might be that webmail will not display large attachments (see also [[bugzilla:3990]]). The following entries are related to the error and can be found in the log files:
   Line 823: Line 866:     
Can be either a user, pseudonym or group
 
Can be either a user, pseudonym or group
  db accounts setprop groupname/username Visible internal
+
  db accounts setprop groupname/username/pseudonym Visible internal
 
  signal-event email-update
 
  signal-event email-update
    
If you want to remove  
 
If you want to remove  
  db accounts delprop groupname/username Visible
+
  db accounts delprop groupname/username/pseudonym Visible
 
  signal-event email-update
 
  signal-event email-update
   −
* If you need to restrict emails for all users you can perform this command line
+
*If you need to restrict emails for all users you can perform this command line
    
  db accounts show | awk -F "="  '/\=user/ {print $1}' |while read USER; do db accounts setprop $USER Visible internal; done
 
  db accounts show | awk -F "="  '/\=user/ {print $1}' |while read USER; do db accounts setprop $USER Visible internal; done
Line 838: Line 881:  
  db accounts show | awk -F "="  '/\=user/ {print $1}' |while read USER; do db accounts delprop $USER Visible; done
 
  db accounts show | awk -F "="  '/\=user/ {print $1}' |while read USER; do db accounts delprop $USER Visible; done
 
  signal-event email-update
 
  signal-event email-update
 +
{{Note box|Please note that admin and other system accounts can not be hidden from external network this way.
 +
 +
Also note that Pseudonyms can be set to internal only using the server-manager.}}
    
===I can't receive mail at: user@mail.domain.tld===
 
===I can't receive mail at: user@mail.domain.tld===
Line 849: Line 895:  
This is logged is in /var/log/messages.
 
This is logged is in /var/log/messages.
   −
===How do I enable smtp authentication for users on the internal network===
+
===Allow SMTP relay of mail without encryption/authentication===
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
+
 
  cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
+
Change the configuration of the system from the default, so that it no longer requires encryption/authentication before allowing relaying of mail.
cp /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/05auth_cvm_unix_local .
+
 
 +
* For most case, you really want to allow few specific clients on your LAN or trusted networks, this is done by setting a coma separated list of ip this way (replace IP1, IP2, IP3 by valid ips).
 +
  config set qpsmtpd UnauthenticatedRelayClients IP1,IP2,IP3
 
  signal-event email-update
 
  signal-event email-update
(note the "." at the end of the 3rd line)<br>
  −
Authentication for the local network will now follow the setting of config::qpsmtpd::Authentication
     −
ie do
+
* In some case you would have a whole dedicated network with appliances needing to send email without auth, this is done this way
  config setprop qpsmtpd Authentication enabled
+
  db networks setprop {$network} RelayRequiresAuth disabled
 
  signal-event email-update
 
  signal-event email-update
   −
===How do I disable SMTP relay for unauthenticated LAN clients===
+
* In case you needs are not fulfilled because you need to accommodate a list of remote IP or a sub network of a larger trusted network, you can create a custom template. Here for reference the accepted formats:
http://forums.contribs.org/index.php?topic=38797.msg176490#msg176490
  −
* Enable smtp authentication as shown above
  −
* Disable un-authenticated smtp relay for the local network(s)using:
   
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients
  echo "# SMTP Relay from local network denied by custom template" >\
+
# a subnetwork by only using a prefix of full ip
  /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80relayFromLocalNetwork
+
  echo "10.10.0.">>  /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom
 +
# an external ip
 +
echo "99.10.1.23" >> /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom
 +
  # an external network you control
 +
echo "164.163.12.1/30" >> /etc/e-smith/templates-custom/var/service/qpsmtpd/config/relayclients/80custom
 
  signal-event email-update
 
  signal-event email-update
   −
* Configure your email clients to use smtps with authentication:<br>
+
* Disable smtp authentication on all local interfaces as shown in [[Bugzilla: 6522]]
- change outgoing smtp port to 465 and select SSL<br>
  −
- enable Authentication against the outgoing mail server
  −
 
  −
===Allow SMTP relay of mail without encryption/authentication===
  −
 
  −
Change the configuration of the system from the default, so that it no longer requires encryption/authentication before allowing relaying of mail.
  −
 
  −
Disable smtp authentication as shown in [[Bugzilla: 6522]]
      
  config setprop qpsmtpd RelayRequiresAuth disabled
 
  config setprop qpsmtpd RelayRequiresAuth disabled
Line 953: Line 992:     
eg a disclaimer is added to internal to external messages but not internal to internal messages.
 
eg a disclaimer is added to internal to external messages but not internal to internal messages.
  −
There are also various switches that can be applied
  −
  −
(see http://bugs.contribs.org/show_bug.cgi?id=2648).
  −
      
To disable the disclaimer function for all domains on your sme server
 
To disable the disclaimer function for all domains on your sme server
Line 1,011: Line 1,045:  
harassment).  
 
harassment).  
    +
====Prior SME9.2 : qpsmtpd check_badmailfromto plugin====
 
To control mail from external locations to internal locations do
 
To control mail from external locations to internal locations do
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins
  nano -w /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto
+
  echo "check_badmailfromto" > /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto
 +
ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto
 +
signal-event email-update
 +
 
 +
To control mail sent from internal locations to internal locations, in addition to the above also do
 +
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
 +
ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto
 +
signal-event email-update
   −
Type in the following followed by Enter
  −
check_badmailfromto
  −
Then save the file and exit
  −
Ctrl o
  −
Ctrl x
     −
Then do
+
====Since SME9.2 : qpsmtpd badmailfromto plugin====
  ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto
+
remove previous templates, if you are updating
 +
rm /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto \
 +
/etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31check_badmailfromto \
 +
/etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto
 +
 
 +
To control mail from external locations to internal locations do
 +
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0
 +
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins
 +
echo "badmailfromto" > /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto
 +
  ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/31badmailfromto
 
  signal-event email-update
 
  signal-event email-update
    
To control mail sent from internal locations to internal locations, in addition to the above also do
 
To control mail sent from internal locations to internal locations, in addition to the above also do
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
 
  mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local
  ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31check_badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31check_badmailfromto
+
  ln -s /etc/e-smith/templates-custom/var/service/qpsmtpd/config/plugins/31badmailfromto /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/31badmailfromto
 
  signal-event email-update
 
  signal-event email-update
 +
 +
====For Qmail====
 
   
 
   
 
Create and configure the badmailfromto custom template fragment
 
Create and configure the badmailfromto custom template fragment
Line 1,091: Line 1,139:     
  db accounts setprop username EveryoneEmail no
 
  db accounts setprop username EveryoneEmail no
  signal-event user-modify
+
  signal-event user-modify username
/etc/init.d/qmail restart
  −
 
      
===How do I remove an email address from any regular group===
 
===How do I remove an email address from any regular group===
Line 1,109: Line 1,155:     
This behaviour is only available as per e-smith-qmail-2.4.0-7.sme see bug #9540
 
This behaviour is only available as per e-smith-qmail-2.4.0-7.sme see bug #9540
 +
 +
===Change the number of logs retained for qpsmtpd and/or sqpsmtpd===
 +
The normal retention is 5 logs for both qpsmptd and sqpsmtpd. This may or may not fit all installations. This information is pulled from bugzilla.
 +
 +
Check your config to see if any change has been made to the default log retention rules. Note there are different rules for qpsmtpd and sqpsmtpd. You have to make changes to both as you require.
 +
config show qpsmtpd
 +
If the KeepLogFiles property isn't listed, the default rules apply. Determine how many logs you would like to keep and apply that to the following example. In the command below, 15 is used to keep 15 qpsmtpd logs.
 +
db configuration setprop qpsmtpd KeepLogFiles 15
 +
Restart multilog with the following.
 +
sv t /service/qpsmtpd/log
 +
Check that your setting saved.
 +
ps aux | grep qpsmtpd | grep multi
 +
Look for the line that ends with /var/log/qpsmtpd and verify the number after n equals your KeepLogFiles property from above.
    
==DKIM Setup - qpsmtpd version<0.96==
 
==DKIM Setup - qpsmtpd version<0.96==
Line 1,153: Line 1,212:  
If you want to customize the signing you can add parameters to the line in /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign. Parameters and value are separated by a space only.
 
If you want to customize the signing you can add parameters to the line in /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/local/69dkim_sign. Parameters and value are separated by a space only.
   −
# keys : "dk" or "domainkeys" for domainkey signature only, "dkim" for DKIM signature only, default "both" (n.b. above template example is dkim ONLY)
+
#keys : "dk" or "domainkeys" for domainkey signature only, "dkim" for DKIM signature only, default "both" (n.b. above template example is dkim ONLY)
# dk_method : for domainkey method , default "nofws"
+
#dk_method : for domainkey method , default "nofws"
# selector : the selector you want, default "default"
+
#selector : the selector you want, default "default"
# algorithm : algorithm for DKIM signing, default "rsa-sha1"
+
#algorithm : algorithm for DKIM signing, default "rsa-sha1"
# dkim_method : for DKIM, default "relaxed"
+
#dkim_method : for DKIM, default "relaxed"
    
NB: key files can not be defined in parameters, they need to be in /var/service/qpsmtpd/config/dkimkeys/{SENDER_DOMAIN}.private
 
NB: key files can not be defined in parameters, they need to be in /var/service/qpsmtpd/config/dkimkeys/{SENDER_DOMAIN}.private
Line 1,167: Line 1,226:  
==DKIM Setup - qpsmtpd version >= 0.96==
 
==DKIM Setup - qpsmtpd version >= 0.96==
   −
Version 0.96 and above supports DKIM natively without the need for extra plugins.
+
La version 0.96 et supérieure prend en charge DKIM de manière native sans avoir besoin de plugins supplémentaires.
   −
All you have to do is to enable the DKIM signing and promulgate the DNS TXT entries to support it.
+
Tout ce que vous avez à faire est d'activer la signature DKIM et de créer les entrées DNS TXT pour la prendre en charge.
   −
Enable the signing:
+
Activez la signature :
 
  db configuration setprop qpsmtpd DKIMSigning enabled
 
  db configuration setprop qpsmtpd DKIMSigning enabled
 
  signal-event email-update
 
  signal-event email-update
   −
and then run:
+
et ensuite exécutez :
  qpsmtpd-print-dns <domain name>
+
  qpsmtpd-print-dns <nom_de_domaine>
 +
 
 +
pour voir la ou les entrée(s) DNS nécessaire(s).
   −
to show the DNS entry(s) required.
+
Ensuite, vous devez mettre à jour votre DNS.
   −
Then you have to update your DNS.
+
{{Tip box|type=Astuce : |msg=vous pouvez vérifier que vos paramètres sont corrects en envoyant un courriel à check-auth@verifier.port25.com, un service gratuit dont le but est de vérifier si votre domaine ne contredit pas les politiques de messagerie. Veuillez vérifier attentivement la réponse. Voir [[bugzilla:4558#c6]].}}
   −
{{Tip box|msg=You can verify that your settings are correct by sending an email to [mailto:check-auth@verifier.port25.com check-auth@verifier.port25.com], a free service the purpose of which is to verify if your domain does not contradict mail policies. Please check the answer carefully. See [[bugzilla:4558#c6]] }}
+
Voir aussi [[bugzilla:9694]] et https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation .
 +
 
 +
Plus de détails sur les entrées DNS à créer sont disponibles [https://wiki.contribs.org/Email/fr#Inbound_DKIM_.2F_SPF_.2F_DMARC ici.]
 +
 
 +
La vérification DKIM entrante est également activée par défaut.
 +
 
 +
Si vous rencontrez un problème lors de l'utilisation du champ DKIM fourni ci-dessus avec votre fournisseur/registraire DNS, veuillez d'abord le contacter pour vous assurer que le problème n'est pas lié à la manière dont vous essayez de saisir les informations. S'il est probable que vous ayez des erreurs « champ invalide » ou « champ trop long » et que votre fournisseur ne soit pas en mesure de vous aider ou de mettre à jour son interface, vous pouvez générer une clé DKIM plus courte (de 1024 au lieu du 2048 bits par défaut) de cette façon :
 +
 
 +
cd /home/e-smith/dkim_keys/default
 +
mv private private.long
 +
mv public public.long
 +
openssl genrsa -out private 1024
 +
openssl rsa -in private -pubout -out public
 +
chown qpsmtpd:qpsmtpd private
 +
chown root:qpsmtpd public
 +
chmod 0400 private
 +
signal-event email-update
 +
qpsmtpd-print-dns
   −
also see [[bugzilla:9694]] and https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation
+
===Signature DKIM sortante / Politique SPF / DMARC pour plusieurs domaines ===
 +
La clé DKIM par défaut est créée dans /home/e-smith/dkim_keys/default. Pour activer la signature DKIM pour tous les domaines que vous gérez :
 +
db configuration setprop qpsmtpd DKIMSigning enabled
 +
signal-event email-update
   −
More details are available [https://wiki.contribs.org/Email#Inbound_DKIM_.2F_SPF_.2F_DMARC here]
+
Si vous voulez désactiver la signature DKIM pour un domaine, vous pouvez utilser :
 +
db domains setprop domain.com DKIMSigning disabled
 +
signal-event email-update
   −
Incoming DKIM checking is also enabled out of the box.
+
Le comportement par défaut consiste à utiliser la même paire de clés pour tous vos domaines. Mais vous pouvez créer d'autres paires de clés pour un domaine spécifique si vous le souhaitez. Par exemple, si vous souhaitez utiliser une paire de clés spécifique pour le domaine domain.net :
 +
cd /home/e-smith/dkim_keys
 +
mkdir domain.net
 +
cd domain.net
 +
echo default > selector
 +
openssl genrsa -out private 2048
 +
openssl rsa -in private -out public -pubout
 +
chown qpsmtpd:qpsmtpd private
 +
chmod 400 private
 +
signal-event email-update
 +
 
 +
Maintenant, les courriels utilisant une adresse d'expédition de domain.net sender seront signés par cette nouvelle clé, à la place de celle par défaut.
    
==Domain Keys==
 
==Domain Keys==
Line 1,254: Line 1,348:  
   contribs
 
   contribs
 
         org
 
         org
 +
===Dovecot Idle_Notify===
 +
Poor battery consumption issues has been reported with K9-mail on recent Android systems. It is apparent one way of helping this is to modify the imap_idle_notify setting. The default is in Dovecot, and therefore on SME is 2 minutes.
 +
 +
K9 has an idle refresh of 24 mins but it seems with Dovecot defaults at 2 mins it causes lots of wake ups and battery drain.
 +
 +
This is configurable via a config db property.
 +
 +
Default on install
 +
# config show dovecot
 +
  dovecot=service
 +
    Quotas=enabled
 +
    status=enabled
 +
 +
Set dovecot Idle_Notify to 20 minutes
 +
 +
# config setprop dovecot Idle_Notify 20
 +
# config show dovecot
 +
  dovecot=service
 +
    Idle_Notify=20
 +
    Quotas=enabled
 +
    status=enabled
 +
 +
Expand template to update *.conf (can also issue a full reconfigure/reboot)
 +
 +
# expand-template /etc/dovecot/dovecot.conf
 +
# dovecot -a |grep imap_idle_notify_interval
 +
  imap_idle_notify_interval = 20 mins
    
==qpsmtpd==
 
==qpsmtpd==
Line 1,276: Line 1,397:     
The default configuration of each plugin is indicated in the 'Default Status' column.
 
The default configuration of each plugin is indicated in the 'Default Status' column.
{| width="100%" border="1" cellpadding="5" cellspacing="0"
+
{| width="100%" cellspacing="0" cellpadding="5" border="1"
 
!Plugin
 
!Plugin
 
!Purpose
 
!Purpose
Line 1,290: Line 1,411:  
|-
 
|-
 
|logging/logterse
 
|logging/logterse
|Allow greater logging detail using smaller log files.  Optionally supports [[Email_Statistics#qplogsumm.pl|qplogsumm.pl]] to compile qpsmtpd statistics.  
+
|Allow greater logging detail using smaller log files.  Optionally supports [[Email_Statistics#qplogsumm.pl|qplogsumm.pl]] to compile qpsmtpd statistics.
 
|enabled
 
|enabled
 
|-
 
|-
Line 1,377: Line 1,498:  
|'''disabled'''<br>(always disabled for local connections)
 
|'''disabled'''<br>(always disabled for local connections)
 
|-
 
|-
|virus/clamav  
+
|virus/clamav
 
|Scan incoming email with ClamAV
 
|Scan incoming email with ClamAV
 
|enabled
 
|enabled
Line 1,388: Line 1,509:     
===Qpsmtpd for SME versions 9.2 and Later===
 
===Qpsmtpd for SME versions 9.2 and Later===
{{Warning box|Please note that the version of qpsmtpd has been upgraded for SME version 9.2 and later to qpsptpd version 0.96. This change has resulted in a lot of changes to the way it works, the plugins (and their names!) and the corresponding database entries, so this section ONLY applies to SME Version 9.2 and later version, see the previous section for the details.}}
+
{{Warning box|Please note that the version of qpsmtpd has been upgraded for SME version 9.2 and later to qpsmtpd version 0.96. This change has resulted in a lot of changes to the way it works, the plugins (and their names!) and the corresponding database entries, so this section ONLY applies to SME Version 9.2 and later version, see the previous section for the details.}}
    
This section has been taken from the notes prepared by the dev who made the changes, the wiki is [https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation here].  
 
This section has been taken from the notes prepared by the dev who made the changes, the wiki is [https://wikit.firewall-services.com/doku.php/smedev/qpsmtpd_096#documentation here].  
Line 1,394: Line 1,515:  
Here is a list of the plugins in use, and a note of any changes that might have occurred:
 
Here is a list of the plugins in use, and a note of any changes that might have occurred:
   −
  * logterse: no change
+
*logterse: no change
  * tls: no change
+
*tls: no change
  * auth_cvm_unix_local: no change
+
*auth_cvm_unix_local: no change
  * check_earlytalker: **renamed earlytalker**
+
*check_earlytalker: '''renamed earlytalker'''
  * count_unrecognized_commands: no change
+
*count_unrecognized_commands: no change
  * bcc: no change
+
*bcc: no change
  * check_relay: **renamed relay**
+
*check_relay: '''renamed relay'''
  * check_norelay: **merged into the relay plugin**
+
*check_norelay: '''merged into the relay plugin'''
  * require_resolvable_fromhost: **renamed resolvable_fromhost**
+
*require_resolvable_fromhost: '''renamed resolvable_fromhost'''
  * check_basicheaders: **renamed headers**
+
*check_basicheaders: '''renamed headers'''
  * rhsbl: no change
+
*rhsbl: no change
  * dnsbl: no change
+
*dnsbl: no change
  * check_badmailfrom: **renamed badmailfrom**
+
*check_badmailfrom: '''renamed badmailfrom'''
  * check_badrcptto_patterns: **doesn't exist anymore, merged with badrcptto**
+
*check_badrcptto_patterns: '''doesn't exist anymore, merged with badrcptto'''
  * check_badrcptto: **renamed badrcptto**
+
*check_badrcptto: '''renamed badrcptto'''
  * check_spamhelo: **renamed helo**
+
*check_spamhelo: '''renamed helo'''
  * check_smtp_forward: no change
+
*check_smtp_forward: no change
  * check_goodrcptto: no change
+
*check_goodrcptto: no change
  * rcpt_ok: no change
+
*rcpt_ok: no change
  * pattern_filter: no change
+
*pattern_filter: no change
  * tnef2mime: no change
+
*tnef2mime: no change
  * spamassassin: no change
+
*spamassassin: no change
  * clamav: no change
+
*clamav: no change
  * qmail-queue: no change
+
*qmail-queue: no change
    
Here is a section for each of the new plugins which are installed by default. The ones that have not changed are documented [https://wiki.contribs.org/Email#Default_Plugin_Configuration above].
 
Here is a section for each of the new plugins which are installed by default. The ones that have not changed are documented [https://wiki.contribs.org/Email#Default_Plugin_Configuration above].
   −
==== Karma ====
+
====Karma====
    
The karma plugin tracks sender history. For each inbound email, various plugins can raise, or lower the "naughtiness" of the connection (eg, if SPF check passes, if the message is spammy etc...). For each host sending us email, the total number of connections, and the number of good and bad connections is recorded in a database. If a host as more bad than good connections in its history, emails will be rejected for 1 day. 3 settings are available for this plugin:
 
The karma plugin tracks sender history. For each inbound email, various plugins can raise, or lower the "naughtiness" of the connection (eg, if SPF check passes, if the message is spammy etc...). For each host sending us email, the total number of connections, and the number of good and bad connections is recorded in a database. If a host as more bad than good connections in its history, emails will be rejected for 1 day. 3 settings are available for this plugin:
   −
  * Karma (enabled|disabled): Default value is disabled. Change to enabled to use the plugin
+
*Karma (enabled|disabled): Default value is disabled. Change to enabled to use the plugin<br />
  * KarmaNegative (integer): Default value is 2. It's the delta between good and bad connection to consider the host naughty enough to block it for 1 day. Eg, with a default value of two, a host can be considered naughty if it sent you 8 good emails and 10 bad ones
+
*KarmaNegative (integer): Default value is 2.<br /> It's the delta between good and bad connection to consider the host naughty enough to block it for 1 day.<br /> Eg, with a default value of two, a host can be considered naughty if it sent you 8 good emails and 10 bad ones<br />
  * KarmaStrikes (integer): Default value is 3. This is the threshold for a single email to be considered good or bad. Eg, with the default value of 3, an email needs at least 3 bad karmas (reaches -3) for the connection to be considered bad. On the other side, 3 good karmas are needed for the connection to be considered good. Between the two, the connection is considered neutral and won't be used in the history count
+
*KarmaStrikes (integer): Default value is 3. This is the threshold for a single email to be considered good or bad. <br />Eg, with the default value of 3, an email needs at least 3 bad karmas (reaches -3) for the connection to be considered bad.<br />On the other side, 3 good karmas are needed for the connection to be considered good. Between the two, the connection is considered neutral<br />and won't be used in the history count
    
Example:
 
Example:
<code bash>
+
db configuration setprop qpsmtpd Karma enabled KarmaNegative 3
db configuration setprop qpsmtpd Karma enabled KarmaNegative 3
+
signal-event email-update
signal-event email-update
  −
</code>
     −
==== URIBL ====
+
 
 +
====URIBL====
    
The URIBL plugin works a bit like RHSBL, except that it checks domain names found in the body of the email. For each URI identified, the corresponding domain name can be submitted to a BL list (through DNS queries). Two settings are available:
 
The URIBL plugin works a bit like RHSBL, except that it checks domain names found in the body of the email. For each URI identified, the corresponding domain name can be submitted to a BL list (through DNS queries). Two settings are available:
   −
  * URIBL (enabled|disabled): Default is disabled. Set this to enabled to use the plugin
+
*URIBL (enabled|disabled): Default is disabled. Set this to enabled to use the plugin
  * UBLList: (Comma separated list addresses): Default value is **multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net**. This can be the same as RBLList. You can also set bitmask to use for combined lists (in the default value, the bitmask is 8-16-64-128)
+
*UBLList: (Comma separated list addresses): Default value is '''multi.surbl.org:8-16-64-128,black.uribl.com,rhsbl.sorbs.net'''.<br />This can be the same as RBLList. You can also set bitmask to use for combined lists (in the default value, the bitmask is 8-16-64-128)
 +
 
 +
 
    
Example:
 
Example:
<code bash>
+
db configuration setprop qpsmtpd URIBL enabled UBLList multi.surbl.org,black.uribl.com
db configuration setprop qpsmtpd URIBL enabled UBLList multi.surbl.org,black.uribl.com
+
signal-event email-update
signal-event email-update
+
 
</code>
     −
==== Helo ====
+
====Helo====
    
Previously, the helo plugin was just checking for some known bad helo hostnames used by spammers (aol.com and yahoo.com). Now, it can check much more than that. This plugin is always enabled and has a single setting:
 
Previously, the helo plugin was just checking for some known bad helo hostnames used by spammers (aol.com and yahoo.com). Now, it can check much more than that. This plugin is always enabled and has a single setting:
   −
  * HeloPolicy: (lenient|rfc|strict). The default value is **lenient**. See https://github.com/smtpd/qpsmtpd/blob/master/plugins/helo for a description of the various tests done at each level
+
*HeloPolicy: (lenient|rfc|strict). The default value is '''lenient'''.
 +
 
 +
See https://github.com/smtpd/qpsmtpd/blob/master/plugins/helo for a description of the various tests done at each level
    
Example:
 
Example:
 +
db configuration setprop qpsmtpd HeloPolicy rfc
 +
signal-event email-update
 +
 +
====Inbound DKIM / SPF / DMARC====
   −
<code bash>
+
DMARC is a policy on top of DKIM and SPF. By default, SPF and DKIM are now checked on every inbound emails, but no reject is attempted. The dmarc plugin can decide to reject the email (depending on the sender policy). dkim and spf plugins are always enabled. dmarc has two settings:
db configuration setprop qpsmtpd HeloPolicy rfc
  −
signal-event email-update
  −
</code>
     −
==== Inbound DKIM / SPF / DMARC ====
+
*DMARCReject (enabled|disabled): Default value is disabled.<br />If set to enabled, the dmarc plugin can decide to reject an email (if the policy of the sender is to reject on alignment failure)<br />
 +
*DMARCReporting (enabled|disabled): Default value is enabled.<br />If set to enabled, enable reporting (which is the '''r''' in dma'''r'''c). Reporting is a very important part of the DMARC standard.<br />When enabled, you'll record information about email you receive from domains which have published a DMARC policy in a local<br />SQLite database (/var/lib/qpsmtpd/dmarc/reports.sqlite).<br />Then, once a day, you send the aggregate reports to the domain owner so they have feedback.<br />You can set this to disabled if you want to disable this feature<br />
 +
*SPFRejectPolicy (0|1|2|3|4): Default value is 0. Set the policy to apply in case of SPF failure when the sender hasn't published a DMARC policy.<br />Note: this is only used when no DMARC policy is published by the sender.<br />If there's a DMARC policy, even a "p=none" one (meaning no reject), then the email won't be rejected, even on failed SPF tests.
   −
DMARC is a policy on top of DKIM and SPF. By default, SPF and DKIM are now checked on every inbound emails, but no reject is attempted. The dmarc plugin can decide to reject the email (depending on the sender policy). dkim and spf plugins are always enabled. dmarc has two settings:
+
:*0: do not reject anything
 +
:*1: reject when SPF says fail
 +
:*2: reject when SPF says softfail
 +
:*3: reject when SPF says neutral
 +
:*4: reject when an error occurred (like a syntax error in SPF entry) or if no SPF entry is published
   −
  * DMARCReject (enabled|disabled): Default value is disabled. If set to enabled, the dmarc plugin can decide to reject an email (if the policy of the sender is to reject on alignment failure)
+
*Inbound DKIM checks are only used by DMARC. No reject solely based on DKIM is supported
  * DMARCReporting (enabled|disabled): Default value is enabled. If set to enabled, enable reporting (which is the **r** in dma**r**c). Reporting is a very important part of the DMARC standard. When enabled, you'll record information about email you receive from domains which have published a DMARC policy in a local SQLite database (/var/lib/qpsmtpd/dmarc/reports.sqlite). Then, once a day, you send the aggregate reports to the domain owner so they have feedback. You can set this to disabled if you want to disable this feature
  −
  * SPFRejectPolicy (0|1|2|3|4): Default value is 0. Set the policy to apply in case of SPF failure when the sender hasn't published a DMARC policy. Note: this is only used when no DMARC policy is published by the sender. If there's a DMARC policy, even a "p=none" one (meaning no reject), then the email won't be rejected, even on failed SPF tests.
  −
    * 0: do not reject anything
  −
    * 1: reject when SPF says fail
  −
    * 2: reject when SPF says softfail
  −
    * 3: reject when SPF says neutral
  −
    * 4: reject when an error occurred (like a syntax error in SPF entry) or if no SPF entry is published
  −
  * Inbound DKIM checks are only used by DMARC. No reject solely based on DKIM is supported
      
Example:
 
Example:
<code bash>
+
db configuration setprop qpsmtpd DMARCReject disabled SPFRejectPolicy 2
db configuration setprop qpsmtpd DMARCReject disabled SPFRejectPolicy 2
+
signal-event email-update
signal-event email-update
+
====Outbound DKIM signing / SPF / DMARC policy====
</code>
  −
==== Outbound DKIM signing / SPF / DMARC policy ====
      
Everything is now ready for you to sign your outbound emails, and publish your public key, as well as your SPF and DMARC policy. A default DKIM key is created in /home/e-smith/dkim_keys/default. To enable DKIM signing for all the domain you manage:
 
Everything is now ready for you to sign your outbound emails, and publish your public key, as well as your SPF and DMARC policy. A default DKIM key is created in /home/e-smith/dkim_keys/default. To enable DKIM signing for all the domain you manage:
 
+
db configuration setprop qpsmtpd DKIMSigning enabled
<code bash>
+
signal-event email-update
db configuration setprop qpsmtpd DKIMSigning enabled
  −
signal-event email-update
  −
</code>
      
If you want to disable dkim signing for a domain, you can use:
 
If you want to disable dkim signing for a domain, you can use:
<code bash>
+
db domains setprop domain.com DKIMSigning disabled
db domains setprop domain.com DKIMSigning disabled
+
signal-event email-update
signal-event email-update
  −
</code>
      
The default behavior is to use the same key pair for all your domains. But you can create other key pairs for specific domain if you want. For example, if you want to use a specific key pair for the domain.net domain:
 
The default behavior is to use the same key pair for all your domains. But you can create other key pairs for specific domain if you want. For example, if you want to use a specific key pair for the domain.net domain:
 +
cd /home/e-smith/dkim_keys
 +
mkdir domain.net
 +
cd domain.net
 +
echo default > selector
 +
openssl genrsa -out private 2048
 +
openssl rsa -in private -out public -pubout
 +
chown qpsmtpd:qpsmtpd private
 +
chmod 400 private
 +
signal-event email-update
   −
<code bash>
+
Now, the emails using a domain.net sender address will be signed by this new key instead of the default one.
cd /home/e-smith/dkim_keys
  −
mkdir domain.net
  −
cd domain.net
  −
echo default > selector
  −
openssl genrsa -out private 2048
  −
openssl rsa -in private -out public -pubout
  −
chown qpsmtpd:qpsmtpd private
  −
chmod 400 private
  −
signal-event email-update
  −
</code>
     −
Now, the emails using a domain.net sender address will be signed by this new key instead of the default one.
+
====Publier vos entrées DNS====
 +
 
 +
La signature de vos courriels sortants n'est qu'une partie du processus. Vous devez maintenant publier certaines entrées DNS afin que chacun puisse vérifier si le courriel qu'il reçoit correspond à votre politique. Cette partie n'est pas à faire sur votre serveur Koozali SME, mais sur votre fournisseur public de DNS. Un script vous aide en créant des exemples d'entrées DNS déjà formatées pour un fichier de zone de type bind. Pour l'utiliser :
 +
qpsmtpd-print-dns <nom_de_domaine>
 +
 
 +
S'il est omis, le nom de domaine principal est inclus.
 +
 
 +
Exemple de retour de la commande
 +
Voici des exemples d'entrées DNS que vous devriez ajouter dans votre DNS public.
 +
L'entrée DKIM peut être copiée telle quelle, mais d'autres devront probablement être ajustées à votre besoin. Par exemple, vous devez soit modifier l'adresse courriel de signalement pour DMARC (ou créez le pseudonyme nécessaire).
 +
 +
default._domainkey IN TXT "v=DKIM1; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/Qq3Ntpx2QNdRxGKMeKc2r9ULvyYW633IbLivHznN9JvjJIbS54PGIEk3sSxvZSdpTRAvYlxn/nRi329VmcDK0vJYb2ut2rnZ3VO3r5srm+XEvTNPxij5eU4gqw+5ayySDjqzAMEMc5V7lUMpZ/YiqnscA075XiMF7iEq8Quv1y0LokmgwtxzOXEZap34WXlKyhYzH+D""fabF6SUllmA0ovODNvudzvEOanPlViQ7q7d+Mc3b7X/fzgJfh5P9f5U+iSmzgyGctSb6GX8sqsDMNVEsRZpSE3jd2Z33RDWyW21PGOKB/ZrLiliKfdJbd3Wo7AN7bWsZpQsei2Hsv1niQIDAQAB"
 +
@ IN SPF "v=spf1 mx a -all"
 +
@ IN TXT "v=spf1 mx a -all"
 +
_dmarc IN TXT "v=DMARC1; p=none; adkim=s; aspf=r; rua=mailto:dmarc-feedback@domain.net; pct=100"
 +
 
 +
Tout ce que vous avez à faire maintenant est de publier ces enregistrements, mais notez qu'il y a un point à prendre en compte lors de la publication de l'enregistrement DNS default._domainkey, tel que produit par la commande ''qpsmtpd-print-dns'' : si l'enregistrement DNS inclut '';t=y'' alors selon la spécification DKIM ([http://dkim.org/specs/rfc4871-dkimbase.html#keys RFC4781 section 3.6.1]) cela signifie que votre ''"... domaine teste DKIM. Les vérificateurs NE DOIVENT PAS traiter les messages des signataires en mode test différemment des courriels non signés, même si la signature n'est pas vérifiée. Les vérificateurs PEUVENT souhaiter suivre les résultats du mode test pour aider le signataire."''
   −
==== Publishing your DNS entries ====
+
D'un autre côté, si aucun '';t=y'' n'est inclus, cela signifie que vous avez l'intention d'utiliser DKIM en mode production. Il peut être judicieux de publier d'abord l'enregistrement DNS DKIM en mode test ('';t=y'' inclus), de vérifier comment ça se passe et si tout va bien, de supprimer la partie '';t=y''.
   −
Signing your outbound emails is just part of the process. You now need to publish some DNS entries so everyone can check if the email they receive matches your policy. This part is not to be done on your SME Server, but on your public DNS provider. A script helps you by creating some sample DNS entries already formatted for a bind-like zone file. To use it:
+
====Testing====
 +
You can install spfquery:
   −
<code bash>
+
yum --enablerepo=epel install libspf2 libspf2-progs
qpsmtpd-print-dns <domain name>
  −
</code>
  −
If omitted, the primary domain name is assumed.
     −
Example output:
+
Usage (try -help for help):
<code>
  −
Here are sample DNS entries you should add in your public DNS
  −
The DKIM entry can be copied as is, but others will probably need to be adjusted
  −
to your need. For example, you should either change the reporting email adress
  −
for DMARC (or create the needed pseudonym)
      +
spfquery -ip=11.22.33.44 -sender=user@aol.com -helo=spammer.tld
   −
default._domainkey IN TXT "v=DKIM1;p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAs/Qq3Ntpx2QNdRxGKMeKc2r9ULvyYW633IbLivHznN9JvjJIbS54PGIEk3sSxvZSdpTRAvYlxn/nRi329VmcDK0vJYb2ut2rnZ3VO3r5srm+XEvTNPxij5eU4gqw+5ayySDjqzAMEMc5V7lUMpZ/YiqnscA075XiMF7iEq8Quv1y0LokmgwtxzOXEZap34WXlKyhYzH+D""fabF6SUllmA0ovODNvudzvEOanPlViQ7q7d+Mc3b7X/fzgJfh5P9f5U+iSmzgyGctSb6GX8sqsDMNVEsRZpSE3jd2Z33RDWyW21PGOKB/ZrLiliKfdJbd3Wo7AN7bWsZpQsei2Hsv1niQIDAQAB"
+
Check record via dig
@ IN SPF "v=spf1 mx a -all"
  −
@ IN TXT "v=spf1 mx a -all"
  −
_dmarc IN TXT "v=DMARC1; p=none; adkim=s; aspf=r; rua=mailto:dmarc-feedback@domain.net; pct=100"
  −
</code>
     −
All you have to do now is publish those records
+
dig -t TXT +short somedomain.co.uk
   −
==== Load ====
+
====Load====
 
The loadcheck plugin can temporarily deny inbound emails if your server is overloaded. This plugin is always enabled and has a single setting:
 
The loadcheck plugin can temporarily deny inbound emails if your server is overloaded. This plugin is always enabled and has a single setting:
   −
  * MaxLoad (int number): Default is 7. If your load is above this value, emails from the outside will be deferred.
+
*MaxLoad (int number): Default is 7. If your load is above this value, emails from the outside will be deferred.
    
===Other QPSMTPD Plugins===
 
===Other QPSMTPD Plugins===
 
The following qpsmtpd plugins will work on a SME server, but are either not included or are not configured by default.
 
The following qpsmtpd plugins will work on a SME server, but are either not included or are not configured by default.
{| width="100%" border="1" cellpadding="5" cellspacing="0"
+
{| width="100%" cellspacing="0" cellpadding="5" border="1"
 
!Plugin
 
!Plugin
 
!Purpose
 
!Purpose
Line 1,584: Line 1,704:  
  signal-event email-update
 
  signal-event email-update
   −
== Secondary/Backup Mail Server Considerations ==
+
==Secondary/Backup Mail Server Considerations==
    
Many people misunderstand the issues of using a secondary or backup  
 
Many people misunderstand the issues of using a secondary or backup  
Line 1,608: Line 1,728:  
===='''Without''' a backup MX====
 
===='''Without''' a backup MX====
   −
* The sending mail server cannot connect to your server.
+
*The sending mail server cannot connect to your server.
* The sending mail server MUST queue the mail and try again later.
+
*The sending mail server MUST queue the mail and try again later.
* The mail stays on the sender's server.
+
*The mail stays on the sender's server.
* The sender's server resends the mail at a later date.
+
*The sender's server resends the mail at a later date.
   −
''The requirement to re-queue is a fundamental part of the SMTP protocol -  
+
''The requirement to re-queue is a fundamental part of the SMTP protocol - ''
 
it is not optional. So, if your server is '''offline''' due to a link or ISP  
 
it is not optional. So, if your server is '''offline''' due to a link or ISP  
outage, '''the mail just stays at the sender's server until you are once  
+
outage, '''the mail just stays at the sender's server until you are once '''
again reachable'''.
+
again reachable'''.'''
    
===='''With''' a backup MX====
 
===='''With''' a backup MX====
   −
* The sending mail server cannot contact your server.
+
*The sending mail server cannot contact your server.
* The sending mail server sends the mail to your secondary MX.
+
*The sending mail server sends the mail to your secondary MX.
* The secondary MX queues the mail until your link/server is up.
+
*The secondary MX queues the mail until your link/server is up.
* The mail is queued on an '''untrusted''' third-party mail server (''think about confidential mail between your company and some business partner'').
+
*The mail is queued on an '''untrusted''' third-party mail server (''think about confidential mail between your company and some business partner'').
* The sending mail server's administrator ''thinks'' it has been delivered, according to their logs.
+
*The sending mail server's administrator ''thinks'' it has been delivered, according to their logs.
* You have no, or little, visibility over the queued mail.
+
*You have no, or little, visibility over the queued mail.
* When your link comes up, the secondary MX sends the mail on to your server.
+
*When your link comes up, the secondary MX sends the mail on to your server.
* You have added more hops, more systems and more delay to the process.
+
*You have added more hops, more systems and more delay to the process.
    
If you think that a backup MX will protect against broken mail servers  
 
If you think that a backup MX will protect against broken mail servers  
Line 1,658: Line 1,778:  
So:
 
So:
   −
* If you trust the secondary MX, you <u>will</u> accept a lot of SPAM when the link comes up.
+
*If you trust the secondary MX, you <u>will</u> accept a lot of SPAM when the link comes up.
* If you don't trust it, you will cause a lot of SPAM backscatter as the mail has been accepted at the secondary MX and then later bounced by you.
+
*If you don't trust it, you will cause a lot of SPAM backscatter as the mail has been accepted at the secondary MX and then later bounced by you.
* Stopping backscatter is why SME Server rejects invalid addresses during the initial SMTP transaction.
+
*Stopping backscatter is why SME Server rejects invalid addresses during the initial SMTP transaction.
    
The SPAM backscatter can only be stopped if the secondary MX has a full list
 
The SPAM backscatter can only be stopped if the secondary MX has a full list
Line 1,667: Line 1,787:  
But:
 
But:
   −
* You need to be able to configure this secondary MX with such user/domain lists
+
*You need to be able to configure this secondary MX with such user/domain lists
* You need to maintain these secondary configurations when users are added/deleted from your primary server configuration
+
*You need to maintain these secondary configurations when users are added/deleted from your primary server configuration
* You need to test (regularly) if the secondary is successfully accepting/rejecting mail as required.
+
*You need to test (regularly) if the secondary is successfully accepting/rejecting mail as required.
    
Quite a few sites have lost lots of mail through misconfigured backup MX servers. Unfortunately, the time when you find  
 
Quite a few sites have lost lots of mail through misconfigured backup MX servers. Unfortunately, the time when you find  
Line 1,676: Line 1,796:  
Then you realise that this mail could have queued at the sender's site if there hadn't been a broken secondary MX bouncing the mail for you.
 
Then you realise that this mail could have queued at the sender's site if there hadn't been a broken secondary MX bouncing the mail for you.
   −
* If you bounce mail at your server, you have logs to show what's wrong.  
+
*If you bounce mail at your server, you have logs to show what's wrong.
* If your secondary MX bounces your mail, you usually have no way to determine what happened other than via reports from the original senders that your mail bounced.
+
*If your secondary MX bounces your mail, you usually have no way to determine what happened other than via reports from the original senders that your mail bounced.
    
===Summary===
 
===Summary===
Line 1,689: Line 1,809:  
If you still want to consider setting up a seconday MX, ensure that:
 
If you still want to consider setting up a seconday MX, ensure that:
   −
* you have fully control of the configuration of each of the email gateways for your domain
+
*you have fully control of the configuration of each of the email gateways for your domain
* each gateway can make decisions on whether to accept/reject mail for the users at the domain
+
*each gateway can make decisions on whether to accept/reject mail for the users at the domain
    
==Mail server on dynamic IP==
 
==Mail server on dynamic IP==
Line 1,713: Line 1,833:  
Whether this issue is really a problem to end users, depends on how much you "value" your mail. For a home user having their own mail server, it is probably not a great problem if some messages should happen to go astray, but for all other classes of users, you should really avoid running a mail server on a dynamic IP, without implementing a suitable queueing workaround as suggested. Some ISPs change the IP very infrequently eg yearly, so in those cases it is also not a significant problem. Many/most ISP's will issue a new IP every time a connection is lost & re-established, so these situations are more problematic.
 
Whether this issue is really a problem to end users, depends on how much you "value" your mail. For a home user having their own mail server, it is probably not a great problem if some messages should happen to go astray, but for all other classes of users, you should really avoid running a mail server on a dynamic IP, without implementing a suitable queueing workaround as suggested. Some ISPs change the IP very infrequently eg yearly, so in those cases it is also not a significant problem. Many/most ISP's will issue a new IP every time a connection is lost & re-established, so these situations are more problematic.
    +
==How to re-apply procmail rules==
 +
 +
If you have a folder of email that needs to have the procmail rules applied, then the trick is to be logged in as the email user, and then position your self in the home directory, and then this works:
 +
su <username> -s /bin/bash
 +
cd ~
 +
for m in <fullpath to maildirectory>/cur/*; do echo $m; procmail < $m && rm $m; done
      −
<noinclude>[[Category:Mail]][[Category:Howto]]</noinclude>
+
<noinclude>
 +
[[Category:Mail]]
 +
[[Category:Howto]]
 +
</noinclude>
3,054

edits

Navigation menu