Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I did follow all the links given in this post, nothing worked out. Please explain me why PHP mail() does give so much problem? what exactly happening and why it will not work?

I am using Mac OS X Lion ( 10.7.3 ).

I did all changes whatever is necessary like:

setting MAILSERVER=-YES- in my /etc/hostconfig
Setting sendmail_path = /usr/sbin/sendmail -t -i  in php.ini
Setting myhostname variable in /etc/postfix/main.cf 
Setting hostname/User/Pass in submit.cred

So please give me solution other than changing those files.

Problems I am facing are:

  1. As soon as I start postfix , I will get warning messages
sudo postfix start
postfix/postfix-script: warning: not owned by root: /etc/postfix/main.cf
postfix/postfix-script: warning: not owned by root: /etc/postfix/submit.cred
postfix/postfix-script: warning: not owned by _postfix:     /Library/Server/Mail/Data/mta/./master.lock
postfix/postfix-script: warning: group or other writable: /Library/Server/Mail/Data/mta
postfix/postfix-script: starting the Postfix mail system
  1. In mail.log , I will get the following output
postfix/smtp[470]: 211B318690B: to=<test@example.com>, relay=none, delay=86583, delays=86521/0.05/62/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[2607:f8b0:4002:c02::1a]:25: No route to host)
postfix/smtp[473]: connect to test@example.com : Operation timed out
postfix/smtp[473]: to=<test@example.com>, relay=none, delay=169837, delays=169717/0.04/120/0, dsn=4.4.1, status=deferred (connect to example.com: Operation timed out) 

When I ping to alt2.gmail-smtp-in.l.google.com, it will say

Request timeout for icmp_seq 0
36 bytes from IPADD: Communication prohibited by filter
( Note - IPADD means some ip address is given there )
share|improve this question

migrated from stackoverflow.com Oct 12 '12 at 8:03

This question came from our site for professional and enthusiast programmers.

1  
you've got a firewall preventing pings from reaching google, the postfix warnings are clear enough... it's not configured properly, you've got communications issues, etc... and this question is offtopic for this site, since it's server configuration problems, not actual programming issues. – Marc B Oct 12 '12 at 4:31
    
Is your ISP filtering outbound port 25? – jordanm Oct 12 '12 at 4:32
    
Ask your ISP what server you should send outbound mail to, and configure your server to relay to your ISP's server. Otherwise, you're going to have to administer a real Internet mail server, and that's a pretty huge undertaking. – David Schwartz May 3 '15 at 10:40

We just did that yesterday by simply following this description. It configures your mac to deliver eMails to googlemail.

All the Links you were following simply activate the Mailserver, but if it is not configured properly, your Mail-Provider will not accept the email as it will be regarded as spam. So be careful! You might convert your mac into a spam-machine!

Oh, and the warnings are simple warnings, so you should fix them, but you might also ignore them.

share|improve this answer
    
In addition to the answer given by @heiglandreas , make sure you chown the respective files as the warning messages tell you so. "Not owned by root" – Rowan Kaag Jul 31 '14 at 13:06

You must log in to answer this question.

protected by JakeGould Oct 9 '15 at 15:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .