Postfix "Relay access denied"

Discussion in 'Installation/Configuration' started by redjam13, Feb 9, 2011.

  1. redjam13

    redjam13 New Member

    Hi all,

    I've got a problem here. I am trying to setup email on a new server using Postfix. Can send emails to local users but anything else fails with the error "Relay access denied".

    Attached more detailed info below - can provide more if this would help. Any help would be great :)


    From logs:

    postfix/smtpd[22171]: warning: ::1: address not listed for hostname localhost

    postfix/smtpd[22141]: connect from unknown[::1]

    postfix/smtpd[22141]: NOQUEUE: reject: RCPT from unknown[::1]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<>

    postfix/smtpd[22141]: lost connection after RCPT from unknown[::1]

    postfix/smtpd[22141]: disconnect from unknown[::1]

    Contents of /etc/postfix/

    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    append_dot_mydomain = no
    readme_directory = no
    # TLS parameters
    smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
    smtpd_tls_key_file = /etc/ssl/private/smtpd.key
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    mydestination =,, localhost.localdomain, localhost
    relayhost =
    mynetworks =,
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    myorigin = /etc/mailname
    inet_protocols = all
    home_mailbox = Maildir/
    mailbox_command =
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtp_tls_security_level = may
    smtpd_tls_security_level = may
    smtpd_tls_auth_only = no
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    myhostname =
  2. redjam13

    redjam13 New Member

    Fixed by replacing

    "mynetworks =,"


    "mynetworks_style = subnet"


Share This Page