Use a RelayHost

  • Hi everyone,


    I'm facing a problem when customers sends emails, sometimes the mail is returned for some dark reasons.

    My server is hosted by OVH and I need to use their SMTP server to send the mails.

    I read this post : Separate e-mail server


    So i did a :

    Code
    1. # cd /etc/imscp/listeners.d/
    2. # wget https://raw.githubusercontent.com/i-MSCP/imscp/1.5.x/contrib/Listeners/Postfix/10_postfix_smarthost.pl
    3. # chgrp imscp 10_postfix_smarthost.pl


    I modified the values in th file to use OVH ones

    Saved the file...


    And now ?


    I don't know what to do?

    The main.cf in the postfix directory isn't modified..

    Do I need to restart something ?


    Thanks a lot for any help

  • Hi everyone...

    So I found that I need to run the installer...

    so :

    Code
    1. # locate imscp-autoinstall
    2. # cd /where/the/file/is/located
    3. # perl imscp-autoinstall -dr mta


    But now I got this error :

    Code
    1. relay=ssl0.ovh.net[193.70.18.144]:587, delay=5.6, delays=0.08/0.02/5.5/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server ssl0.ovh.net[193.70.18.144]: no mechanism available

    Here is part of the "main.cf"


    Code
    1. relay_domains = hash:/etc/postfix/imscp/relay_domains
    2. relay_recipient_maps =
    3. relay_transport = relay
    4. relayhost = [ssl0.ovh.net]:587
    5. smtp_sasl_security_options = noanonymous
    6. smtp_sasl_password_maps = hash:/etc/postfix/relay_passwd
    7. smtp_sasl_auth_enable = yes
    8. smtp_sasl_type = cyrus


    Does anyone have an idea ?

    Many Thanks

  • The smarthost listener listen to some events that are trigggered by thei-MSCP installer to install required distribution package (libsasl2-modules) and inject the required Postfix configuration stanza into the Posfix main.cf configuration file. Therefore, you need to rerun the i-MSCP installer to make the changes effective. From your i-MSCP archive, run: perl imscp-autoinstall -danv

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Hi All..

    As I found the solution, I share with the community.

    Note, when you have to use SASL in postfix, be sure to have libsasl2-modules installed on your system.


    Code
    1. # apt-get install libsasl2-modules


    And Voila !!!

    Sorry for the noise.

  • The smarthost listener listen to some events that are trigggered by thei-MSCP installer to install required distribution package (libsasl2-modules) and inject the required Postfix configuration stanza into the Posfix main.cf configuration file. Therefore, you need to rerun the i-MSCP installer to make the changes effective. From your i-MSCP archive, run: perl imscp-autoinstall -danv

    Thanks NuxWin for the command line...

    your one include installaing dependencies? is it right ?


  • Is the libsasl2-modules package installed on your server?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thanks NuxWin for the command line...

    your one include installaing dependencies? is it right ?

    Yes, normally the package is automatically installed but there is maybe a bug somewhere... I'll check on. And sorry, I answered too late each time... You were more fast than me...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Yes, normally the package is automatically installed but there is maybe a bug somewhere... I'll check on. And sorry, I answered too late each time... You were more fast than me...

    You're Welcome.


    I hope that this thread will help community.


    As we say in our contry : A plus tard.


    PS : comment faire pour marquer le thread en résolu ?