i-MSCP - Postfix 2.10.x - SASL Authentication

  • Hello


    For those that are using i-MSCP on a distribution, which provide Postfix 2.10.x or newest (such as Ubuntu raring users), you must add the following SMTP restriction in the /etc/postfix/main.cf:


    Code
    1. smtpd_relay_restrictions=


    and then, restart postfix


    Code
    1. # service postfix restart


    Without this SMTP restriction set to an empty value, SASL authentication will not work correctly.


    Refs:
    http://www.postfix.org/SASL_README.html#server_sasl_authz for more information.
    http://www.postfix.org/postcon…#smtpd_relay_restrictions



    Note1: A compatibility plugin will be provided soon for users of the 1.1.0-rc2.3 release
    Note2: This issue will be fixed in 1.1.0-rc3 release.


    Thank you for using i-MSCP

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

    Edited once, last by Nuxwin ().

  • Re ;


    Below, you can find a plugin which provide a fix for the issue described above. You must use this plugin only if your Postfix version is 2.10.x or newest (eg, Users of Ubuntu Raring and later). This plugin is only for users of i-MSCP version 1.1.0-rc2.3 or the current git master.


    Howto install


    • Download the plugin file and upload it into the /etc/imscp/hooks.d directory
    • Rename the plugin file to 20_postfix_relay_access_fix.pl
    • Run the imscp-setup script (perl /var/www/imscp/engine/setup/imscp-setup -d)


    That all.


    20_postfix_relay_access_fix.txt



    Thank you for using i-MSCP.

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

    Edited once, last by Nuxwin ().

  • Hey,


    using the option without any value results in the following error-msgs:


    postfix/smtpd[4509]: fatal: in parameter smtpd_relay_restrictions or smtpd_recipient_restrictions, specify at least one working instance of: reject_unauth_destination, defer_unauth_destination, reject, defer, defer_if_permit or check_relay_domains


    The postfix-doc lists the following values, which work so far with my postfix >2.10


    Edited once, last by patx ().


  • Re ;


    Code
    1. For backwards compatibility, sites that migrate from Postfix versions before 2.10 can set smtpd_relay_restrictions to the empty value, and use smtpd_recipient_restrictions exactly as before.


    http://www.postfix.org/postcon…#smtpd_relay_restrictions


    This works for me on my raring dev box.


    Result of postconf smtpd_recipient_restrictions please.


    Thank you for using i-MSCP

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

    Edited once, last by Nuxwin ().

  • postconf smtpd_recipient_restrictions
    smtpd_recipient_restrictions =


    postconf smtpd_relay_restrictions
    smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination


    So i think we are both right - there must be some of these values either in the one or the other option :D


    PS: Did you forget me? :/ I solved the SSL-mail-problem by myself :) But with a bit of confusing details...

    Edited once, last by patx ().


  • Re ;


    I've not forgot you. I'm so busy... I'll come soon. ;)


    Well, normally default smtpd_recipient_restrictions set by i-MSCP are as follow:

    Code
    1. smtpd_recipient_restrictions = reject_non_fqdn_recipient,
    2. reject_unknown_recipient_domain,
    3. permit_mynetworks,
    4. permit_sasl_authenticated,
    5. reject_unauth_destination,
    6. reject_unlisted_recipient,
    7. check_policy_service inet:127.0.0.1:12525,
    8. check_policy_service inet:127.0.0.1:{PORT_POSTGREY},
    9. permit


    Where {PORT_POSTGREY} is replaced by the postgrey port.


    So I think you modified something. ;)


    Thank you for using i-MSCP.

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

    Edited once, last by Nuxwin ().

  • Indeed, i commented out a lot - so this is the problem :D


  • Indeed, i commented out a lot - so this is the problem :D


    Re;


    Well, I'll add a checks for such case. Many beginners removes those parameters without knowing what they are doing...


    Thank you for using i-MSCP.

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

    Edited once, last by Nuxwin ().

  • Edit: Issue fixed in last Git Master. See https://github.com/i-MSCP/imsc…6daa0fb5d27da3106c73d382d


    Note: For those that were used the plugin provided above with Git Master, you must remove it before update.


    Thank you for using i-MSCP

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