Results 1 to 9 of 9

Thread: Relay access denied

  1. #1
    Join Date
    Aug 2011
    Beans
    5

    Relay access denied

    Hi guys,

    I know there are a lot of threads about this issue but I still can't find a solution.
    I'm using Postfix 2.9.6 and everything workes fine except the sending of mails with outlook. I always get the message that the relay access is denied.
    I generally do not allow relay to prevent spam through my server.
    How do I have to set up postfix to allow relay for outlook users?

    I tried
    Code:
    smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    but just got an error message that this is an unused parameter.

    Can please somebody assist? Please let me know if you need more information about my configuration.

    Thanks in advanced

  2. #2
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    1,885
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Relay access denied

    Are your clients that are using outlook on your local area network? And did you add that network to the "mynetworks" directive in main.cf? Example:
    Code:
    doug@doug-64:~/config/etc/postfix$ grep -n mynet *
    main.cf:3:# smythies.com 2012.07.05 add LAN to mynetworks
    main.cf:42:mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.111.0/24
    main.cf.original:36:mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  3. #3
    Join Date
    Aug 2011
    Beans
    5

    Re: Relay access denied

    The clients are not in the lan. I want to make it possible that where ever you are you can send mail. So i can't just add some ISPs to the relay list. I'm wondering how google or other online mail provider solve this issue.

  4. #4
    Join Date
    May 2007
    Location
    NY's first capital
    Beans
    2,547
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Relay access denied

    Quote Originally Posted by TheChef1993 View Post
    The clients are not in the lan. I want to make it possible that where ever you are you can send mail. So i can't just add some ISPs to the relay list. I'm wondering how google or other online mail provider solve this issue.
    Code:
    permit_sasl_authenticated
    To eliminate the need to add outside network ranges, if your sasl auth is working properly these clients will be allowed
    to connect from outside the LAN.
    Nothing is ever easy, but if it is difficult you must be doing it wrong.

  5. #5
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Relay access denied

    <aside>
    Most of the examples I've seen have the permit_sasl_authenticated and permit_mynetworks on Postfix's smtpd_sender_restrictions option.
    Are you using Postfix 2.10 or later by any chance?
    </aside>
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  6. #6
    Join Date
    Aug 2011
    Beans
    5

    Re: Relay access denied

    Thanks for the help so far. I'm using permit_sasl_authenicated already on Postfix 2.9.6.

    What recipient permissions would you recommend in general?

  7. #7
    Join Date
    Jun 2007
    Location
    Porirua, New Zealand
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Relay access denied

    As near as I can make out from the Postfix web site, smtpd_relay_restrictions was introduced for postfix version 2.10, so it might need a bit of re-working to get an equivalent for 2.9.6.

    Here's an example of an alternative from the Spamcop website, which should help get you started:
    Code:
    smtpd_recipient_restrictions =
        reject_invalid_hostname, 
        reject_non_fqdn_sender, 
        reject_non_fqdn_recipient, 
        reject_unknown_sender_domain, 
        reject_unknown_recipient_domain, 
        reject_unauth_pipelining, 
        permit_mynetworks, 
        reject_unauth_destination, 
        reject_rbl_client bl.spamcop.net 
        permit
    Forum DOs and DON'Ts
    Never assume that information you find using a search engine is up-to-date.

  8. #8
    Join Date
    Aug 2011
    Beans
    5

    Re: Relay access denied

    Thank you very much for your help. It is working know.
    Code:
    permit_sasl_authenticated


    that was the missing piece in the puzzle

  9. #9
    Join Date
    Aug 2011
    Beans
    5

    Re: Relay access denied

    I mean in the sender restrictions it was missing and after I added it it works.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •