Hello, I recently installed my server. It run fine except for the mail sending. My PHP scripts can't send mail with the function mail(). In phpMyVisites I can see that the function is activated on the server but not seems to work...
Please run Code: tail -f /var/log/mail.log , and at the same time send an email with PHP's mail() function. What happens in the tail output?
Thanks, here is what I see : Code: Nov 23 22:45:03 serveur postfix/pickup[28231]: 976341781E6: uid=0 from=<root> Nov 23 22:45:03 serveur postfix/cleanup[28701]: 976341781E6: message-id=<[email protected]> Nov 23 22:45:03 serveur postfix/qmgr[9049]: 976341781E6: from=<[email protected]>, size=563, nrcpt=1 (queue active) Nov 23 22:45:03 serveur postfix/local[28703]: 976341781E6: to=<[email protected]>, orig_to=<root>, relay=local, delay=1.1, delays=1/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) Nov 23 22:45:03 serveur postfix/qmgr[9049]: 976341781E6: removed Nov 23 22:50:03 serveur postfix/pickup[28231]: A60A51781E6: uid=0 from=<root> Nov 23 22:50:03 serveur postfix/cleanup[28768]: A60A51781E6: message-id=<[email protected]> Nov 23 22:50:03 serveur postfix/qmgr[9049]: A60A51781E6: from=<[email protected]>, size=563, nrcpt=1 (queue active) Nov 23 22:50:03 serveur postfix/local[28770]: A60A51781E6: to=<[email protected]>, orig_to=<root>, relay=local, delay=1.1, delays=1.1/0.02/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) Nov 23 22:50:03 serveur postfix/qmgr[9049]: A60A51781E6: removed Nov 23 22:52:59 serveur postfix/smtpd[28829]: connect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: 33567178207: client=localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/cleanup[28832]: 33567178207: message-id=<[email protected]> Nov 23 22:52:59 serveur postfix/qmgr[9049]: 33567178207: from=<[email protected]>, size=13901, nrcpt=1 (queue active) Nov 23 22:52:59 serveur postfix/smtpd[28829]: disconnect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: connect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: 4A647178208: client=localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/cleanup[28832]: 4A647178208: message-id=<[email protected]> Nov 23 22:52:59 serveur postfix/qmgr[9049]: 4A647178208: from=<[email protected]>, size=9834, nrcpt=1 (queue active) Nov 23 22:52:59 serveur postfix/smtpd[28829]: disconnect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: connect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: 5CF10178209: client=localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/cleanup[28832]: 5CF10178209: message-id=<[email protected]> Nov 23 22:52:59 serveur postfix/qmgr[9049]: 5CF10178209: from=<[email protected]>, size=9842, nrcpt=1 (queue active) Nov 23 22:52:59 serveur postfix/smtpd[28829]: disconnect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: connect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: 6E19017820A: client=localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/cleanup[28832]: 6E19017820A: message-id=<[email protected]> Nov 23 22:52:59 serveur postfix/qmgr[9049]: 6E19017820A: from=<[email protected]>, size=13915, nrcpt=1 (queue active) Nov 23 22:52:59 serveur postfix/smtpd[28829]: disconnect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: connect from localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/smtpd[28829]: 828A717820B: client=localhost.localdomain[127.0.0.1] Nov 23 22:52:59 serveur postfix/cleanup[28832]: 828A717820B: message-id=<[email protected]> Nov 23 22:52:59 serveur postfix/qmgr[9049]: 828A717820B: from=<[email protected]>, size=9842, nrcpt=1 (queue active) Nov 23 22:52:59 serveur postfix/smtpd[28829]: disconnect from localhost.localdomain[127.0.0.1] Nov 23 22:53:29 serveur postfix/smtp[28833]: connect to gmail-smtp-in.l.google.com[64.233.167.114]: Connection timed out (port 25) Nov 23 22:53:29 serveur postfix/smtp[28834]: connect to gmail-smtp-in.l.google.com[64.233.163.27]: Connection timed out (port 25) Nov 23 22:53:29 serveur postfix/smtp[28835]: connect to gmail-smtp-in.l.google.com[64.233.167.114]: Connection timed out (port 25) Nov 23 22:53:29 serveur postfix/smtp[28836]: connect to gmail-smtp-in.l.google.com[64.233.163.114]: Connection timed out (port 25) Nov 23 22:53:29 serveur postfix/smtp[28837]: connect to gmail-smtp-in.l.google.com[64.233.167.114]: Connection timed out (port 25) Nov 23 22:53:59 serveur postfix/smtp[28833]: connect to gmail-smtp-in.l.google.com[64.233.167.27]: Connection timed out (port 25) Nov 23 22:53:59 serveur postfix/smtp[28834]: connect to gmail-smtp-in.l.google.com[64.233.163.114]: Connection timed out (port 25) Nov 23 22:53:59 serveur postfix/smtp[28835]: connect to gmail-smtp-in.l.google.com[64.233.167.27]: Connection timed out (port 25) Nov 23 22:53:59 serveur postfix/smtp[28836]: connect to gmail-smtp-in.l.google.com[64.233.163.27]: Connection timed out (port 25) Nov 23 22:53:59 serveur postfix/smtp[28837]: connect to gmail-smtp-in.l.google.com[64.233.167.27]: Connection timed out (port 25) Nov 23 22:54:29 serveur postfix/smtp[28833]: connect to alt2.gmail-smtp-in.l.google.com[64.233.183.114]: Connection timed out (port 25) Nov 23 22:54:29 serveur postfix/smtp[28834]: connect to alt1.gmail-smtp-in.l.google.com[64.233.185.114]: Connection timed out (port 25) Nov 23 22:54:29 serveur postfix/smtp[28835]: connect to alt2.gmail-smtp-in.l.google.com[66.249.93.114]: Connection timed out (port 25) Nov 23 22:54:29 serveur postfix/smtp[28836]: connect to alt2.gmail-smtp-in.l.google.com[64.233.183.114]: Connection timed out (port 25) Nov 23 22:54:29 serveur postfix/smtp[28837]: connect to alt1.gmail-smtp-in.l.google.com[66.249.83.114]: Connection timed out (port 25) I don't understand all these connections too google mail... I tried with the send stats to user's email function
Are you trying to send to an gmail account? Please check if you are blacklisted: http://www.mxtoolbox.com/blacklists.aspx Also make sure your ISP doesn't block port 25.
RESULT: serveur.antoinel12.is-a-geek.net Banner: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Do I need to configure something in my domain name acount (Dyndns)
You're on lots of blacklists, and besides I can't connect to your mail server. Make sure Postfix is running and that your firewall doesn't block port 25.
What I do to not be on a blacklist? I did nothing bad, I've just installed my server since 2 week. Like you said, it looklike to have a problem to access postfix. The port forwarding for port 25 is activated in my router and in the firewall of ISPconfig. Postfix is running... I don't know what to do, I folowed the Perfect Setup guide...
First, I guess your server is on a dynamic IP address. Most dynamic IP addresses are blacklisted by default because they are abused by lots of spammers. There's nothing you can do about it. If you still want to send mails with your server, you should relay through another mail server: http://www.howtoforge.com/forums/showthread.php?t=72&highlight=relayhost Also, you should ask your ISP if they block port 25.