Postfix smtp with hosted email

Discussion in 'Installation/Configuration' started by b1ackhawk, Mar 25, 2014.

  1. b1ackhawk

    b1ackhawk New Member

    I've installed Postfix on Ubuntu Server. I'm just using Postfix as an SMTP relay for misc internal items that need SMTP (like scan to email, system alerts, etc). Our email is hosted by Google Apps for business. I seem to have smtp working as a relay for all external domains, but email going to our own addresses on our domain (ie ) do not get delivered. I believe postfix is trying to deliver it locally.
    When I look into postfix log I see that an error NOQUEUE: reject: RCPT from [server] and 550 and Recipient address rejected: User unknown in local recipient table
    What configuration do I need to make in postfix so that it treats internal mail address ( the same as all other mail? Or maybe I'm not approaching it from the wrong angle.

    All help appreciated.
  2. srijan

    srijan New Member HowtoForge Supporter


    Post the error message(s) that you get in the mail log file when the problem occurs. The mail log file is in the folder /var/log/, it is named "mail.log" on Debian/Ubuntu. please paste the also.

  3. b1ackhawk

    b1ackhawk New Member (ive changed specific identifiable info, but kept consistancy):

    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    readme_directory = no

    # TLS parameters
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_sender_restrictions = permit_mynetworks, permit
    local_recipient_maps =

    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.

    myhostname =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination =,,, localhost,,,, na.ourcompany.pri
    relayhost =
    mynetworks = [::ffff:]/104 [::1]/128,,,,,
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all

    error message (again, change some names, but kept them consistant):
    Mar 24 08:18:50 smtpserver postfix/smtpd[20441]: NOQUEUE: reject: RCPT from[]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[]>
  4. b1ackhawk

    b1ackhawk New Member

    I ended up trying removing the entries for "mydestinations" and that seems to have solved my issues. Emails to are shown in the logs as being sent out and are being received.

Share This Page