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 ourcompany.org ) 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 5.1.1.1 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 (ourcompany.org) the same as all other mail? Or maybe I'm not approaching it from the wrong angle. All help appreciated.
Hi 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 main.cf also. Br// Srijan
main.cf (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_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_use_tls=yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_recipient_restrictions=permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination,permit 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 = ourcompany.org alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases myorigin = /etc/mailname mydestination = smtp.mycompany.org, smtpserver.na.mycompany.pri, localhost.na.mycompany.pri, localhost, mycompany.org, oursubsidiary.org, canadiandivision.ca, na.ourcompany.pri relayhost = mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 172.17.10.0/23, 172.27.0.0/16, 172.26.4.0/22, 172.26.8.0/22, 172.26.12.0/22 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 smtpserver.na.mycompany.pri[172.26.4.99]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<[172.26.4.99]>
I ended up trying removing the entries for "mydestinations" and that seems to have solved my issues. Emails to @mycompany.org are shown in the logs as being sent out and are being received.