LAMP not sending email.
Hi All,
My LAMP not sending email to my domain.name email. example: xxx@example.com i setup php.ini sendmail_path = /usr/sbin/sendmail -t -i i have php script to send email for testing and it works in gmail account but in mydomain cannot. Thanks. |
You should check your mail logs for any error messages.
Quote:
|
HI GUYS,
I found the answer in this site: SOURCE: http://serverfault.com/questions/653.../128450#128450 ******************************************* What I did to disable local delivery. I'll be using the example.com domain. Requirements: example.com A entry pointing to IP address assigned to one of the eth interfaces. /etc/hosts defining example.com assigned to the very same IP address as above example.com MX records pointing to Google servers (ASPMX.L.GOOGLE.COM, etc) default sendmail installation (mine was on Ubuntu) Steps: vim /etc/mail/sendmail.mc at the end: define(`MAIL_HUB', `example.com.')dnl define(`LOCAL_RELAY', `example.com.')dnl and then: sendmailconfig (or /etc/mail/make depending on your distro) service sendmail restart testing: echo -e "To: user@example.com\nSubject: Test\nTest\n" | sendmail -bm -t -v echo -e "To: user\nSubject: Test\nTest\n" | sendmail -bm -t -v You should see it connecting to the google server and then you should see your mail being delivered to your Google inbox. |
THE SAME PROBLEM AS MINE CAME FROM THIS SOURCE: http://stackoverflow.com/questions/7...1-user-unknown
When sending emails to ordinary domains like @google.com or @hotmail.com, my code works properly. But, when I try to send an email to the domain that I own (let's say example.com), which server is set up I'm getting error code 67 from mail command. I'm using mail() function of PHP but I've also tried "mail -stest kubilayeksioglu@example.com" and it returns the same error, so it should not be related with the code itself. Here's a portion of mail that I receive in /var/mail/root Final-Recipient: RFC822; kubilayeksioglu@example.com Action: failed Status: 5.1.1 Remote-MTA: DNS; [127.0.0.1] Diagnostic-Code: SMTP; 550 5.1.1 ... User unknown Last-Attempt-Date: Wed, 21 Sep 2011 17:43:59 GMT I guess I should also add that, our domain example.com is using Google Apps. Can anyone give me an idea about how can I fix that? ---------- Post added 09-28-12 at 04:04 AM ---------- Thanks to all. |
All times are GMT -5. The time now is 03:58 PM. |