So I have setup an Ubuntu server and want to use postfix in order to sendmail via php.The server host: example.comWhen the server sends an email to anything@example.com, I get an error. If sending to any other address (someone@anotherdomain.com), it works fine.alias_database = hash:/etc/aliasesalias_maps = hash:/etc/aliasesappend_dot_mydomain = nobiff = noconfig_directory = /etc/postfixinet_interfaces = localhostinet_protocols = allmailbox_size_limit = 0mydestination = example.com, localhost.localdomain, , localhostmyhostname = example.commynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128myorigin = /etc/mailnamereadme_directory = norecipient_delimiter = +relayhost =smtp_tls_session_cache_database = btree:${data_directory}/smtp_scachesmtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destinationsmtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pemsmtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.keysmtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scachesmtpd_use_tls = yesWhen I send mail via php to example.com addresses I get the following error:exception 'Zend\Mail\Protocol\Exception\RuntimeException' with message '5.1.1 <support@example.com>: Recipient address rejected: User unknown in local recipient tableWhen I send mail via php to AnyOtherDomain.com there is NO ERROR:The actual mail for example.com is handled by a third party server. All SPF / DKIM records are in place so sending works fine so long as it is to third party domains.Obviously this is a setting, which one I am still working to figure out.EDIT:Digging into the mail logs I note this:Apr  6 13:37:57 somename postfix/local[25416]: 3625CE2EB7: to=<support@example.com>, relay=local, delay=0.03, delays=0.02/0.01/0/0.01, dsn=5.1.1, status=undeliverable (unknown user: support)Apr  6 13:42:29 xxxxx postfix/smtpd[25501]: connect from localhost[127.0.0.1]Apr  6 13:42:29 xxxxx postfix/smtpd[25501]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <support@example.com>: Recipient address rejected: User unknown in local recipient table; from=<no-reply@example.com> to=<support@example.com> proto=ESMTP helo=<localhost>Apr  6 13:42:29 xxxxx postfix/smtpd[25501]: disconnect from localhost[127.0.0.1]So I believe the server is trying to send to a user rather than an email address...
Postfix can not send from Mydomain - only to third party domains
postfix;sendmail