"Relay access denied" when I relay emails from a local mailserver to the main one

Discussion in 'Server Operation' started by voltron81, Dec 5, 2009.

  1. voltron81

    voltron81 New Member

    Hi to everybody.
    When I try to relay emails from a local mailserver to the main mailserver, I have a "Relay access denied" issue...

    I've created the local mailserver using this howto: http://www.howtoforge.org/virtual_users_and_domains_with_postfix_debian_etch and adding as relayhost the main mailserver.

    In the main mailserver, created with perfect server ISPConfig 3, I've this parameters of postfix:
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    and of couse mynetworks is [::1]/128
    So I guess I need a sasl authenticated, or maybe I've to write some value in the database mail_access.

    The local mailserver is not on a static Ip, so I can not just allow to use an IP (and in this case there will be more than one local mailserver, in different locations, that want to relay emails to the main mailserver.

    Any suggestion?
    Do I need to setup a SASL authentication between the local mailserver and the main mailserver? In this case, how to do it?

  2. topdog

    topdog Active Member

  3. sjau

    sjau Local Meanie Moderator

  4. voltron81

    voltron81 New Member

    Ok thanks guys, i think I've solved.
    Basically I've added in the main.cf this lines:
    smtp_sasl_auth_enable = yes
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_type = cyrus
    smtp_sasl_security_options = noanonymous
    The strange thing is that in the sasl_passwd I've write the account details of just an email, like this:
    [mail.domain.com]   [email protected]:password
    And now I can relay also the emails of the other emails of the same domain (like [email protected], [email protected], etc...)

    Is it normal?

  5. topdog

    topdog Active Member

    Of course that is normal, that is what "relaying" means, "transmitting mail which is not destined for the host running the mta"

Share This Page