diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-22.10/administration/postfix.md b/i18n/fr/docusaurus-plugin-content-docs/version-22.10/administration/postfix.md
index 7d06c98ee446..6e1f382cf804 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/version-22.10/administration/postfix.md
+++ b/i18n/fr/docusaurus-plugin-content-docs/version-22.10/administration/postfix.md
@@ -3,10 +3,15 @@ id: postfix
title: Configurer l'envoi d'emails
---
-Pour que votre Centreon puisse envoyer des emails de notification, un serveur smtp local doit être configuré. Si votre système d'exploitation est RHEL, CentOS ou Oracle Linux, Postfix est déjà installé.
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+Pour que votre Centreon puisse envoyer des emails de notification, un serveur SMTP local doit être configuré.
Cette page donne un exemple de configuration. Consultez la [documentation officielle Postfix](https://www.postfix.org/BASIC_CONFIGURATION_README.html) pour plus d'informations.
+Sur certaines distributions, Postfix peut déjà être installé.
+
Les commandes de notifications sont exécutées par le collecteur qui supervise la ressource : il est nécessaire de configurer le relais mail sur tous les collecteurs.
Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifications.
@@ -15,31 +20,68 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
1. Dans le terminal de votre serveur, entrez la commande suivante :
- ```
- yum -y install mailx cyrus-sasl-plain
- ```
+
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install s-nail cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+apt install postfix bsd-mailx libsasl2-modules
+```
+
+
+
2. Redémarrez Postfix :
- ```
+ ```shell
systemctl restart postfix
```
3. Configurez Postfix pour qu'il s'exécute au démarrage :
- ```
+ ```shell
systemctl enable postfix
```
3. Éditez le fichier suivant :
- ```
+ ```shell
vi /etc/postfix/main.cf
```
4. Ajoutez les informations suivantes :
- ```
+
+
+
+ ```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
smtp_use_tls = yes
@@ -55,7 +97,7 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
Dans l'exemple suivant, Centreon utilisera un compte Gmail pour envoyer les notifications :
- ```
+ ```shell
myhostname = centreon-central
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
@@ -66,23 +108,36 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
## Étape 2 : Configurer les identifiants du compte qui enverra les emails
1. Créez un fichier `/etc/postfix/sasl_passwd` :
- ```
+ ```shell
touch /etc/postfix/sasl_passwd
```
2. Ajoutez la ligne suivante, en remplaçant `identifiant:motdepasse` par les informations de connexion du compte qui enverra les emails de notification :
- ```
+ ```shell
[smtp.fai.com]:port identifiant:motdepasse
```
Exemple:
- ```
+ ```shell
[smtp.gmail.com]:587 username@gmail.com:XXXXXXXX
```
@@ -90,20 +145,20 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
3. Dans le terminal, entrez la commande suivante :
- ```
+ ```shell
postmap /etc/postfix/sasl_passwd
```
4. Pour plus de sécurité, changez les permissions sur le fichier `sasl_passwd` :
- ```
+ ```shell
chown root:postfix /etc/postfix/sasl_passwd*
chmod 640 /etc/postfix/sasl_passwd*
```
3. Rechargez Postfix pour prendre en compte les modifications:
- ```
+ ```shell
systemctl reload postfix
```
@@ -111,21 +166,38 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
- Pour envoyer un email de test, utilisez la commande suivante :
- ```
+ ```shell
echo "Test" | mail -s "Test" utilisateur@fai.com
```
Remplacez `utilisateur@fai.com` par une véritable adresse email : le destinataire devrait recevoir l'email de test.
-- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant :
+- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant (s'il existe) :
+
+
+
+ ```shell
+ tail -f /var/log/maillog
```
+
+
+
+ ```shell
tail -f /var/log/maillog
```
+
+
+
+ ```shell
+ tail -f /var/log/mail.log
+ ```
+
+
- Pour vérifier si votre service Postfix tourne, entrez:
- ```
+ ```shell
systemctl status postfix
```
@@ -135,5 +207,4 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
## Configuration spécifique à Gmail
-Si vous souhaitez envoyer des emails en utilisant un compte Gmail, vous devrez activer l'option **Accès pour les applications moins sécurisées** sur celui-ci : voir la page [Autoriser les applications moins sécurisées à accéder à votre compte](https://support.google.com/accounts/answer/6010255).
-
+Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr&sjid=15941614565763159471-EU).
diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.04/administration/postfix.md b/i18n/fr/docusaurus-plugin-content-docs/version-23.04/administration/postfix.md
index 4e3b0f9605f8..6e1f382cf804 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/version-23.04/administration/postfix.md
+++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.04/administration/postfix.md
@@ -6,11 +6,11 @@ title: Configurer l'envoi d'emails
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Pour que votre Centreon puisse envoyer des emails de notification, un serveur smtp local doit être configuré.
+Pour que votre Centreon puisse envoyer des emails de notification, un serveur SMTP local doit être configuré.
Cette page donne un exemple de configuration. Consultez la [documentation officielle Postfix](https://www.postfix.org/BASIC_CONFIGURATION_README.html) pour plus d'informations.
-Si votre système d'exploitation est RHEL ou Oracle Linux, Postfix est déjà installé.
+Sur certaines distributions, Postfix peut déjà être installé.
Les commandes de notifications sont exécutées par le collecteur qui supervise la ressource : il est nécessaire de configurer le relais mail sur tous les collecteurs.
@@ -52,7 +52,7 @@ dnf install s-nail cyrus-sasl-plain
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
4. Ajoutez les informations suivantes :
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,19 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
## Étape 2 : Configurer les identifiants du compte qui enverra les emails
1. Créez un fichier `/etc/postfix/sasl_passwd` :
@@ -127,7 +143,7 @@ apt install postfix bsd-mailx
3. Enregistrez le fichier.
-3. Dans le terminal, entrez la commande suivante :
+3. Dans le terminal, entrez la commande suivante :
```shell
postmap /etc/postfix/sasl_passwd
@@ -156,7 +172,7 @@ apt install postfix bsd-mailx
Remplacez `utilisateur@fai.com` par une véritable adresse email : le destinataire devrait recevoir l'email de test.
-- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant :
+- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant (s'il existe) :
@@ -191,4 +207,4 @@ apt install postfix bsd-mailx
## Configuration spécifique à Gmail
-Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr).
+Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr&sjid=15941614565763159471-EU).
diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/postfix.md b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/postfix.md
index 4e3b0f9605f8..6e1f382cf804 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/postfix.md
+++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/postfix.md
@@ -6,11 +6,11 @@ title: Configurer l'envoi d'emails
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Pour que votre Centreon puisse envoyer des emails de notification, un serveur smtp local doit être configuré.
+Pour que votre Centreon puisse envoyer des emails de notification, un serveur SMTP local doit être configuré.
Cette page donne un exemple de configuration. Consultez la [documentation officielle Postfix](https://www.postfix.org/BASIC_CONFIGURATION_README.html) pour plus d'informations.
-Si votre système d'exploitation est RHEL ou Oracle Linux, Postfix est déjà installé.
+Sur certaines distributions, Postfix peut déjà être installé.
Les commandes de notifications sont exécutées par le collecteur qui supervise la ressource : il est nécessaire de configurer le relais mail sur tous les collecteurs.
@@ -52,7 +52,7 @@ dnf install s-nail cyrus-sasl-plain
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
4. Ajoutez les informations suivantes :
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,19 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
## Étape 2 : Configurer les identifiants du compte qui enverra les emails
1. Créez un fichier `/etc/postfix/sasl_passwd` :
@@ -127,7 +143,7 @@ apt install postfix bsd-mailx
3. Enregistrez le fichier.
-3. Dans le terminal, entrez la commande suivante :
+3. Dans le terminal, entrez la commande suivante :
```shell
postmap /etc/postfix/sasl_passwd
@@ -156,7 +172,7 @@ apt install postfix bsd-mailx
Remplacez `utilisateur@fai.com` par une véritable adresse email : le destinataire devrait recevoir l'email de test.
-- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant :
+- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant (s'il existe) :
@@ -191,4 +207,4 @@ apt install postfix bsd-mailx
## Configuration spécifique à Gmail
-Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr).
+Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr&sjid=15941614565763159471-EU).
diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/postfix.md b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/postfix.md
index 4e3b0f9605f8..6e1f382cf804 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/postfix.md
+++ b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/postfix.md
@@ -6,11 +6,11 @@ title: Configurer l'envoi d'emails
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Pour que votre Centreon puisse envoyer des emails de notification, un serveur smtp local doit être configuré.
+Pour que votre Centreon puisse envoyer des emails de notification, un serveur SMTP local doit être configuré.
Cette page donne un exemple de configuration. Consultez la [documentation officielle Postfix](https://www.postfix.org/BASIC_CONFIGURATION_README.html) pour plus d'informations.
-Si votre système d'exploitation est RHEL ou Oracle Linux, Postfix est déjà installé.
+Sur certaines distributions, Postfix peut déjà être installé.
Les commandes de notifications sont exécutées par le collecteur qui supervise la ressource : il est nécessaire de configurer le relais mail sur tous les collecteurs.
@@ -52,7 +52,7 @@ dnf install s-nail cyrus-sasl-plain
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
4. Ajoutez les informations suivantes :
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,19 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
## Étape 2 : Configurer les identifiants du compte qui enverra les emails
1. Créez un fichier `/etc/postfix/sasl_passwd` :
@@ -127,7 +143,7 @@ apt install postfix bsd-mailx
3. Enregistrez le fichier.
-3. Dans le terminal, entrez la commande suivante :
+3. Dans le terminal, entrez la commande suivante :
```shell
postmap /etc/postfix/sasl_passwd
@@ -156,7 +172,7 @@ apt install postfix bsd-mailx
Remplacez `utilisateur@fai.com` par une véritable adresse email : le destinataire devrait recevoir l'email de test.
-- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant :
+- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant (s'il existe) :
@@ -191,4 +207,4 @@ apt install postfix bsd-mailx
## Configuration spécifique à Gmail
-Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr).
+Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr&sjid=15941614565763159471-EU).
diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-24.10/administration/postfix.md b/i18n/fr/docusaurus-plugin-content-docs/version-24.10/administration/postfix.md
index 71662add0760..6e1f382cf804 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/version-24.10/administration/postfix.md
+++ b/i18n/fr/docusaurus-plugin-content-docs/version-24.10/administration/postfix.md
@@ -6,11 +6,11 @@ title: Configurer l'envoi d'emails
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Pour que votre Centreon puisse envoyer des emails de notification, un serveur smtp local doit être configuré.
+Pour que votre Centreon puisse envoyer des emails de notification, un serveur SMTP local doit être configuré.
Cette page donne un exemple de configuration. Consultez la [documentation officielle Postfix](https://www.postfix.org/BASIC_CONFIGURATION_README.html) pour plus d'informations.
-Si votre système d'exploitation est RHEL ou Oracle Linux, Postfix est déjà installé.
+Sur certaines distributions, Postfix peut déjà être installé.
Les commandes de notifications sont exécutées par le collecteur qui supervise la ressource : il est nécessaire de configurer le relais mail sur tous les collecteurs.
@@ -49,10 +49,10 @@ dnf install s-nail cyrus-sasl-plain
```
-
+
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
4. Ajoutez les informations suivantes :
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,19 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
## Étape 2 : Configurer les identifiants du compte qui enverra les emails
1. Créez un fichier `/etc/postfix/sasl_passwd` :
@@ -127,7 +143,7 @@ apt install postfix bsd-mailx
3. Enregistrez le fichier.
-3. Dans le terminal, entrez la commande suivante :
+3. Dans le terminal, entrez la commande suivante :
```shell
postmap /etc/postfix/sasl_passwd
@@ -156,7 +172,7 @@ apt install postfix bsd-mailx
Remplacez `utilisateur@fai.com` par une véritable adresse email : le destinataire devrait recevoir l'email de test.
-- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant :
+- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant (s'il existe) :
@@ -179,7 +195,6 @@ apt install postfix bsd-mailx
-
- Pour vérifier si votre service Postfix tourne, entrez:
```shell
@@ -192,4 +207,4 @@ apt install postfix bsd-mailx
## Configuration spécifique à Gmail
-Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr).
+Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr&sjid=15941614565763159471-EU).
diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-25.10/administration/postfix.md b/i18n/fr/docusaurus-plugin-content-docs/version-25.10/administration/postfix.md
index 094d07253a8d..6e1f382cf804 100644
--- a/i18n/fr/docusaurus-plugin-content-docs/version-25.10/administration/postfix.md
+++ b/i18n/fr/docusaurus-plugin-content-docs/version-25.10/administration/postfix.md
@@ -6,10 +6,12 @@ title: Configurer l'envoi d'emails
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-Pour que votre Centreon puisse envoyer des emails de notification, un serveur smtp local doit être configuré. Si votre système d'exploitation est RHEL ou Oracle Linux, Postfix est déjà installé.
+Pour que votre Centreon puisse envoyer des emails de notification, un serveur SMTP local doit être configuré.
Cette page donne un exemple de configuration. Consultez la [documentation officielle Postfix](https://www.postfix.org/BASIC_CONFIGURATION_README.html) pour plus d'informations.
+Sur certaines distributions, Postfix peut déjà être installé.
+
Les commandes de notifications sont exécutées par le collecteur qui supervise la ressource : il est nécessaire de configurer le relais mail sur tous les collecteurs.
Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifications.
@@ -19,24 +21,38 @@ Nous vous recommandons d'utiliser un compte mail dédié à l'envoi des notifica
1. Dans le terminal de votre serveur, entrez la commande suivante :
-
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
``` shell
dnf install mailx cyrus-sasl-plain
```
-
+
``` shell
dnf install s-nail cyrus-sasl-plain
```
-
+
``` shell
-apt install mailx cyrus-sasl-plain
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -62,6 +78,9 @@ apt install mailx cyrus-sasl-plain
4. Ajoutez les informations suivantes :
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -89,6 +108,19 @@ apt install mailx cyrus-sasl-plain
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
## Étape 2 : Configurer les identifiants du compte qui enverra les emails
1. Créez un fichier `/etc/postfix/sasl_passwd` :
@@ -140,11 +172,28 @@ apt install mailx cyrus-sasl-plain
Remplacez `utilisateur@fai.com` par une véritable adresse email : le destinataire devrait recevoir l'email de test.
-- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant :
+- Si le destinataire n'a pas reçu l'email, vérifiez le fichier de log suivant (s'il existe) :
+
+
+
+
+ ```shell
+ tail -f /var/log/maillog
+ ```
+
+
```shell
tail -f /var/log/maillog
```
+
+
+
+ ```shell
+ tail -f /var/log/mail.log
+ ```
+
+
- Pour vérifier si votre service Postfix tourne, entrez:
@@ -158,4 +207,4 @@ apt install mailx cyrus-sasl-plain
## Configuration spécifique à Gmail
-Si vous souhaitez envoyer des emails en utilisant un compte Gmail, vous devrez activer l'option **Accès pour les applications moins sécurisées** sur celui-ci : voir la page [Autoriser les applications moins sécurisées à accéder à votre compte](https://support.google.com/accounts/answer/6010255).
+Pour utiliser Postfix avec Gmail, vous devez utiliser un [mot de passe d'application](https://support.google.com/mail/answer/185833?hl=fr&sjid=15941614565763159471-EU).
diff --git a/versioned_docs/version-22.10/administration/postfix.md b/versioned_docs/version-22.10/administration/postfix.md
index 88dc7f946098..76de43c03a1d 100644
--- a/versioned_docs/version-22.10/administration/postfix.md
+++ b/versioned_docs/version-22.10/administration/postfix.md
@@ -3,11 +3,16 @@ id: postfix
title: Configuring your Centreon to send emails
---
-For your Centreon to be able to send notification emails, you need to configure a local smtp server. If your operating system is RHEL, CentOS or Oracle Linux, Postfix is already installed.
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
+For your Centreon to be able to send notification emails, you need to configure a local SMTP server.
This page gives you an example of a possible configuration. Refer to the [official Postfix documentation](https://www.postfix.org/BASIC_CONFIGURATION_README.html) for more information.
-Notifications commands are executed by the poller that monitors the resource: you need to configure the mail relay on all pollers.
+On some distributions, Postfix may already be installed.
+
+Notification commands are executed by the poller that monitors the resource, so you need to configure the mail relay on all pollers.
We recommend that you use a dedicated email account to send notifications.
@@ -15,31 +20,68 @@ We recommend that you use a dedicated email account to send notifications.
1. In your server's terminal, enter the following command:
- ```
- yum -y install mailx cyrus-sasl-plain
- ```
+
+
-2. Restart Postfix:
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
- ```
+
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install s-nail cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+apt install postfix bsd-mailx libsasl2-modules
+```
+
+
+
+
+2. Restart Postfix:
+
+ ```shell
systemctl restart postfix
```
3. Configure Postfix to run at startup:
- ```
+ ```shell
systemctl enable postfix
```
4. Edit the following file:
- ```
+ ```shell
vi /etc/postfix/main.cf
```
5. Add the following information:
- ```
+
+
+
+ ```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
smtp_use_tls = yes
@@ -55,7 +97,7 @@ We recommend that you use a dedicated email account to send notifications.
In the following example, Centreon will use a Gmail account to send notifications:
- ```
+ ```shell
myhostname = centreon-central
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
@@ -66,44 +108,60 @@ We recommend that you use a dedicated email account to send notifications.
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+6. Restart Postfix:
+
+ ```shell
+ systemctl restart postfix
+ ```
+
## Step 2: Configuring the credentials of the account that will send emails
1. Create a `/etc/postfix/sasl_passwd` file:
- ```
+ ```shell
touch /etc/postfix/sasl_passwd
```
-2. Add the following line (replace `username:password` by the credentials of the account that will send the notification emails):
+2. Add the following line (replace `username:password` with the credentials of the account that will send the notification emails):
- ```
+ ```shell
[smtp.isp.com]:port username:password
```
Example:
- ```
+ ```shell
[smtp.gmail.com]:587 username@gmail.com:XXXXXXXX
```
3. Save the file.
-3. In the terminal, enter the following command:
+4. In the terminal, enter the following command:
- ```
+ ```shell
postmap /etc/postfix/sasl_passwd
```
-4. For security reasons, change the permissions on the file:
+5. For security reasons, change the permissions on the file:
- ```
+ ```shell
chown root:postfix /etc/postfix/sasl_passwd*
chmod 640 /etc/postfix/sasl_passwd*
```
-3. Reload Postfix so that chenges are taken into account:
+6. Reload Postfix so that changes are taken into account:
- ```
+ ```shell
systemctl reload postfix
```
@@ -111,21 +169,38 @@ We recommend that you use a dedicated email account to send notifications.
- To send a test email, enter the following command:
- ```
+ ```shell
echo "Test" | mail -s "Test" user@isp.com
```
- Replace `user@isp.com` by a real email address: the recipient should receive the test email.
+ Replace `user@isp.com` with a real email address. The recipient should receive the test email.
+
+- If the user has not received the message, check the following log file (if it exists):
-- If the user hasn't received the message, check the following log file:
+
+
+ ```shell
+ tail -f /var/log/maillog
```
+
+
+
+ ```shell
tail -f /var/log/maillog
```
+
+
+
+ ```shell
+ tail -f /var/log/mail.log
+ ```
+
+
- To check that your Postfix service is running, enter:
- ```
+ ```shell
systemctl status postfix
```
@@ -135,4 +210,4 @@ We recommend that you use a dedicated email account to send notifications.
## Gmail configuration
-If you want to send emails through a Gmail account, you will need to turn on the **Allow less secure apps** option on this account. See [Less secure apps & your Google Account](https://support.google.com/accounts/answer/6010255).
+To use postfix with Gmail, you need to use an [app password](https://support.google.com/mail/answer/185833?hl=en).
diff --git a/versioned_docs/version-23.04/administration/postfix.md b/versioned_docs/version-23.04/administration/postfix.md
index ad73ef25ae58..76de43c03a1d 100644
--- a/versioned_docs/version-23.04/administration/postfix.md
+++ b/versioned_docs/version-23.04/administration/postfix.md
@@ -10,7 +10,7 @@ For your Centreon to be able to send notification emails, you need to configure
This page gives you an example of a possible configuration. Refer to the [official Postfix documentation](https://www.postfix.org/BASIC_CONFIGURATION_README.html) for more information.
-If your operating system is RHEL or Oracle Linux, Postfix is already installed.
+On some distributions, Postfix may already be installed.
Notification commands are executed by the poller that monitors the resource, so you need to configure the mail relay on all pollers.
@@ -52,7 +52,7 @@ dnf install s-nail cyrus-sasl-plain
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
5. Add the following information:
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,22 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+6. Restart Postfix:
+
+ ```shell
+ systemctl restart postfix
+ ```
+
## Step 2: Configuring the credentials of the account that will send emails
1. Create a `/etc/postfix/sasl_passwd` file:
@@ -156,7 +175,7 @@ apt install postfix bsd-mailx
Replace `user@isp.com` with a real email address. The recipient should receive the test email.
-- If the user has not received the message, check the following log file:
+- If the user has not received the message, check the following log file (if it exists):
@@ -179,7 +198,6 @@ apt install postfix bsd-mailx
-
- To check that your Postfix service is running, enter:
```shell
diff --git a/versioned_docs/version-23.10/administration/postfix.md b/versioned_docs/version-23.10/administration/postfix.md
index f03a65693c51..76de43c03a1d 100644
--- a/versioned_docs/version-23.10/administration/postfix.md
+++ b/versioned_docs/version-23.10/administration/postfix.md
@@ -10,7 +10,7 @@ For your Centreon to be able to send notification emails, you need to configure
This page gives you an example of a possible configuration. Refer to the [official Postfix documentation](https://www.postfix.org/BASIC_CONFIGURATION_README.html) for more information.
-If your operating system is RHEL or Oracle Linux, Postfix is already installed.
+On some distributions, Postfix may already be installed.
Notification commands are executed by the poller that monitors the resource, so you need to configure the mail relay on all pollers.
@@ -52,7 +52,7 @@ dnf install s-nail cyrus-sasl-plain
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
5. Add the following information:
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,22 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+6. Restart Postfix:
+
+ ```shell
+ systemctl restart postfix
+ ```
+
## Step 2: Configuring the credentials of the account that will send emails
1. Create a `/etc/postfix/sasl_passwd` file:
@@ -156,7 +175,7 @@ apt install postfix bsd-mailx
Replace `user@isp.com` with a real email address. The recipient should receive the test email.
-- If the user has not received the message, check the following log file:
+- If the user has not received the message, check the following log file (if it exists):
diff --git a/versioned_docs/version-24.04/administration/postfix.md b/versioned_docs/version-24.04/administration/postfix.md
index ad73ef25ae58..409f953c74ce 100644
--- a/versioned_docs/version-24.04/administration/postfix.md
+++ b/versioned_docs/version-24.04/administration/postfix.md
@@ -10,7 +10,7 @@ For your Centreon to be able to send notification emails, you need to configure
This page gives you an example of a possible configuration. Refer to the [official Postfix documentation](https://www.postfix.org/BASIC_CONFIGURATION_README.html) for more information.
-If your operating system is RHEL or Oracle Linux, Postfix is already installed.
+On some distributions, Postfix may already be installed.
Notification commands are executed by the poller that monitors the resource, so you need to configure the mail relay on all pollers.
@@ -52,7 +52,7 @@ dnf install s-nail cyrus-sasl-plain
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
5. Add the following information:
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,25 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+
+
+
+6. Restart Postfix:
+
+ ```shell
+ systemctl restart postfix
+ ```
+
## Step 2: Configuring the credentials of the account that will send emails
1. Create a `/etc/postfix/sasl_passwd` file:
@@ -156,7 +178,7 @@ apt install postfix bsd-mailx
Replace `user@isp.com` with a real email address. The recipient should receive the test email.
-- If the user has not received the message, check the following log file:
+- If the user has not received the message, check the following log file (if it exists):
@@ -179,7 +201,6 @@ apt install postfix bsd-mailx
-
- To check that your Postfix service is running, enter:
```shell
diff --git a/versioned_docs/version-24.10/administration/postfix.md b/versioned_docs/version-24.10/administration/postfix.md
index 8646465a3b10..76de43c03a1d 100644
--- a/versioned_docs/version-24.10/administration/postfix.md
+++ b/versioned_docs/version-24.10/administration/postfix.md
@@ -10,7 +10,7 @@ For your Centreon to be able to send notification emails, you need to configure
This page gives you an example of a possible configuration. Refer to the [official Postfix documentation](https://www.postfix.org/BASIC_CONFIGURATION_README.html) for more information.
-If your operating system is RHEL or Oracle Linux, Postfix is already installed.
+On some distributions, Postfix may already be installed.
Notification commands are executed by the poller that monitors the resource, so you need to configure the mail relay on all pollers.
@@ -49,10 +49,10 @@ dnf install s-nail cyrus-sasl-plain
```
-
+
``` shell
-apt install postfix bsd-mailx
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -78,6 +78,9 @@ apt install postfix bsd-mailx
5. Add the following information:
+
+
+
```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
@@ -105,6 +108,22 @@ apt install postfix bsd-mailx
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+6. Restart Postfix:
+
+ ```shell
+ systemctl restart postfix
+ ```
+
## Step 2: Configuring the credentials of the account that will send emails
1. Create a `/etc/postfix/sasl_passwd` file:
@@ -156,7 +175,7 @@ apt install postfix bsd-mailx
Replace `user@isp.com` with a real email address. The recipient should receive the test email.
-- If the user has not received the message, check the following log file:
+- If the user has not received the message, check the following log file (if it exists):
diff --git a/versioned_docs/version-25.10/administration/postfix.md b/versioned_docs/version-25.10/administration/postfix.md
index 96dc73241102..76de43c03a1d 100644
--- a/versioned_docs/version-25.10/administration/postfix.md
+++ b/versioned_docs/version-25.10/administration/postfix.md
@@ -6,10 +6,12 @@ title: Configuring your Centreon to send emails
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
-For your Centreon to be able to send notification emails, you need to configure a local SMTP server. If your operating system is RHEL or Oracle Linux, Postfix is already installed.
+For your Centreon to be able to send notification emails, you need to configure a local SMTP server.
This page gives you an example of a possible configuration. Refer to the [official Postfix documentation](https://www.postfix.org/BASIC_CONFIGURATION_README.html) for more information.
+On some distributions, Postfix may already be installed.
+
Notification commands are executed by the poller that monitors the resource, so you need to configure the mail relay on all pollers.
We recommend that you use a dedicated email account to send notifications.
@@ -19,24 +21,38 @@ We recommend that you use a dedicated email account to send notifications.
1. In your server's terminal, enter the following command:
-
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
+
+``` shell
+dnf install postfix mailx cyrus-sasl-plain
+```
+
+
+
``` shell
dnf install mailx cyrus-sasl-plain
```
-
+
``` shell
dnf install s-nail cyrus-sasl-plain
```
-
+
``` shell
-apt install mailx cyrus-sasl-plain
+apt install postfix bsd-mailx libsasl2-modules
```
@@ -44,25 +60,28 @@ apt install mailx cyrus-sasl-plain
2. Restart Postfix:
- ```
+ ```shell
systemctl restart postfix
```
3. Configure Postfix to run at startup:
- ```
+ ```shell
systemctl enable postfix
```
4. Edit the following file:
- ```
+ ```shell
vi /etc/postfix/main.cf
```
5. Add the following information:
- ```
+
+
+
+ ```shell
myhostname = hostname
relayhost = [smtp.isp.com]:port
smtp_use_tls = yes
@@ -78,7 +97,7 @@ apt install mailx cyrus-sasl-plain
In the following example, Centreon will use a Gmail account to send notifications:
- ```
+ ```shell
myhostname = centreon-central
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
@@ -89,44 +108,60 @@ apt install mailx cyrus-sasl-plain
smtp_sasl_tls_security_options = noanonymous
```
+
+
+
+ ```shell
+ myhostname = centreon-central
+ relayhost = [smtp.gmail.com]:587
+ smtp_use_tls = no
+ smtp_sasl_auth_enable = no
+ ```
+
+6. Restart Postfix:
+
+ ```shell
+ systemctl restart postfix
+ ```
+
## Step 2: Configuring the credentials of the account that will send emails
1. Create a `/etc/postfix/sasl_passwd` file:
- ```
+ ```shell
touch /etc/postfix/sasl_passwd
```
2. Add the following line (replace `username:password` with the credentials of the account that will send the notification emails):
- ```
+ ```shell
[smtp.isp.com]:port username:password
```
Example:
- ```
+ ```shell
[smtp.gmail.com]:587 username@gmail.com:XXXXXXXX
```
3. Save the file.
-3. In the terminal, enter the following command:
+4. In the terminal, enter the following command:
- ```
+ ```shell
postmap /etc/postfix/sasl_passwd
```
-4. For security reasons, change the permissions on the file:
+5. For security reasons, change the permissions on the file:
- ```
+ ```shell
chown root:postfix /etc/postfix/sasl_passwd*
chmod 640 /etc/postfix/sasl_passwd*
```
-3. Reload Postfix so that changes are taken into account:
+6. Reload Postfix so that changes are taken into account:
- ```
+ ```shell
systemctl reload postfix
```
@@ -134,21 +169,38 @@ apt install mailx cyrus-sasl-plain
- To send a test email, enter the following command:
- ```
+ ```shell
echo "Test" | mail -s "Test" user@isp.com
```
Replace `user@isp.com` with a real email address. The recipient should receive the test email.
-- If the user has not received the message, check the following log file:
+- If the user has not received the message, check the following log file (if it exists):
+
+
+
+ ```shell
+ tail -f /var/log/maillog
```
+
+
+
+ ```shell
tail -f /var/log/maillog
```
+
+
+
+ ```shell
+ tail -f /var/log/mail.log
+ ```
+
+
- To check that your Postfix service is running, enter:
- ```
+ ```shell
systemctl status postfix
```
@@ -158,4 +210,4 @@ apt install mailx cyrus-sasl-plain
## Gmail configuration
-If you want to send emails through a Gmail account, you will need to turn on the **Allow less secure apps** option on this account. See [Less secure apps & your Google Account](https://support.google.com/accounts/answer/6010255).
+To use postfix with Gmail, you need to use an [app password](https://support.google.com/mail/answer/185833?hl=en).