Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • send alert via exchange server

    Posted by mejda.abida on August 30, 2022 at 11:06

    hello,

    i want to send emails Alerts from Pandora via exchange server.

    i was used postfix and configure main.cf but doesn’t work, 🙁

    please with exchange server how can i send email alerts ?

    thanks

    Mejda

    mejda.abida replied 1 month ago 2 Members · 3 Replies
  • 3 Replies
  • Francisco M.

    Administrator
    August 30, 2022 at 12:43
    98 Karma points
    Community rank: Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Good morning,

    If you want to use postfix as a relay for sending via an Exchange account you must take into account that Exchange requires TLS encryption. In addition to using a version from 2.9.0 onwards once these checks are done:

    You need to know the default SMTP port configuration:

    Port 587 with TLS encryption

    # To use all our network interfaces

    inet_interfaces = all

    # We indicate our server, information that we have collected from the Exchange Online web site

    relayhost = [xxxxxxxxxxx.outlook.com]:587

    # In the following parameters we say that the server needs authentication and the location of the file with the security credentials

    smtp_sasl_auth_enable = yes

    smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd

    # We say that we do not accept anonymous connections

    smtp_sasl_security_options = noanonymous

    # When using TLS encryption we need to indicate where we have our certificate located

    smtp_tls_CAfile = /etc/postfix/cacert.pem

    # We indicate that we are indeed going to use TLS as encryption system

    smtp_use_tls = yes

    # Let us know which is our domain

    relay_domain = domain.com

    # We also say that when connecting to the server always send an ehlo

    smtp_always_send_ehlo = yes

    # Here comes an important part, we have to use a generic file, where we will indicate the aliases we are going to use for the sending

    smtp_generics_maps = hash:/etc/postfix/generic

    We need to generate the security certificate, we will use the cat command, which will send the output from one text file to another, as follows:

    cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem > /etc/postfix/cacert.pem

    you should place it in a different path always indicating it in the main.cf. For example:

    nano /etc/postfix/sasl/passwd

    We indicate permissions to the file so that only the root user can see it:

    chmod 600 /etc/postfix/sasl/passwd

    Now we use the postmap command, to make the file readable by the Postfix system:

    postmap /etc/postfix/sasl/passwd

    Creation of the generic file.

    First of all, we tell the system that we want to create new aliases:

    newaliases

    Now we create the file:

    nano /etc/postfix/generic

    And edit it:

    [System superuser] [Our Office365 account].

    [email protected] [email protected]

    Exit the editor and generate a readable file:

    postmap /etc/postfix/generic

    Now that we have all the files generated, we can restart the server:

    /etc/init.d/postfix restart

  • Francisco M.

    Administrator
    August 30, 2022 at 12:49
    98 Karma points
    Community rank: Tentacle noob
    • mejda.abida

      Member
      August 31, 2022 at 11:26
      149 Karma points
      Community rank: Tentacle noob
      Like it
      Up
      0
      Down
      Drop it
      ::

      hello,

      thank you very very much 🙂

      it’s working now 🙂