The Letter E Posted July 18, 2013 Share Posted July 18, 2013 Hi everybody, I've been working for hours trying to get the php mail() function working on my centOS box, with no luck I've installed postfix and set up configurations for postfix and sendmail and verified they are running. PHP successfully hands of the message to the servers mail queue for delivery, but I'm getting errors everytime in /var/log/maillog ERROR: Jul 18 00:33:44 localhost sendmail[5779]: r6I744do004573: to=<RECIPIENT_EMAIL>, ctladdr=<apache@localhost.localdomain> (48/48), delay=00:29:40, xdelay=00:00:00, mailer=esmtp, pri=300366, relay=aspmx2.googlemail.com., dsn=4.0.0, stat=Deferred: Connection refused by aspmx2.googlemail.com. Any help is much appreciated. I'd prefer not to reinstall the whole site on a ubuntu build just to avoid solving the current problem. Also, when I run: telnet aspmx2.google.com 25 I also get a connection refused response. I'm not sure if that's helpful... Thank you in advance! E Quote Link to comment https://forums.phpfreaks.com/topic/280271-php-mail-using-sendmail-on-centos-60/ Share on other sites More sharing options...
The Letter E Posted July 18, 2013 Author Share Posted July 18, 2013 So, now I'm just trying to use, postfix, to keep you updated. Here's my new php.ini settings: sendmail_path = /usr/sbin/sendmail.postfix -t -i -f noreply@mysite.com I'm still getting similar errors with postfix: Jul 18 01:14:21 localhost postfix/master[6926]: terminating on signal 15 Jul 18 01:14:22 localhost postfix/postfix-script[7085]: starting the Postfix mail system Jul 18 01:14:22 localhost postfix/master[7086]: daemon started -- version 2.6.6, configuration /etc/postfix Jul 18 01:14:22 localhost postfix/qmgr[7089]: 02CB362D15: from=<noreply@mysite.com>, size=350, nrcpt=1 (queue active) Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to aspmx.l.google.com[173.194.64.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to alt2.aspmx.l.google.com[173.194.74.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to alt1.aspmx.l.google.com[74.125.134.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to aspmx2.googlemail.com[74.125.140.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: connect to aspmx3.googlemail.com[173.194.74.27]:25: Connection refused Jul 18 01:14:22 localhost postfix/smtp[7091]: 02CB362D15: to=<user@emailclient.com>, relay=none, delay=504, delays=503/0.03/0.27/0, dsn=4.4.1, status=deferred (connect to aspmx3.googlemail.com[173.194.74.27]:25: Connection refused) Please let me know if anything here rings a bell Thanks again, E Quote Link to comment https://forums.phpfreaks.com/topic/280271-php-mail-using-sendmail-on-centos-60/#findComment-1441204 Share on other sites More sharing options...
Solution The Letter E Posted July 18, 2013 Author Solution Share Posted July 18, 2013 Well, I fell like a dumb. It seems that my hosting provider, Elastichost, initially blocks all communication from port 25 to keep users from creating spam accounts with their service. In order to get it lifted you have to agree to an anti spam terms of service. Here's their FAQ, in case anyone else is having a similar problem that seems unfixable: http://www.elastichosts.com/question/how-can-i-send-email-from-my-servers-can-you-lift-the-smtp-block/ Good Day E Quote Link to comment https://forums.phpfreaks.com/topic/280271-php-mail-using-sendmail-on-centos-60/#findComment-1441281 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.