mail() don't work, The Perfect Setup Ubuntu 6.10

Discussion in 'HOWTO-Related Questions' started by antoinel12, Nov 22, 2006.

  1. antoinel12

    antoinel12 New Member

    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...
     
  2. till

    till Super Moderator

    Which messages do you get in the mail.log when you send mail?
     
  3. antoinel12

    antoinel12 New Member

    where is that file?
     
  4. antoinel12

    antoinel12 New Member

    Ok, I've got it, I'll past you in a next post what is in my log...
     
  5. antoinel12

    antoinel12 New Member

    This is what I see in pico...
     
  6. falko

    falko Super Moderator

    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?
     
  7. antoinel12

    antoinel12 New Member

    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=<20061124034503.976341781E6@serveur.antoinel12.is-a-geek.net>
    Nov 23 22:45:03 serveur postfix/qmgr[9049]: 976341781E6: from=<root@serveur.antoinel12.is-a-geek.net>, size=563, nrcpt=1 (queue active)
    Nov 23 22:45:03 serveur postfix/local[28703]: 976341781E6: to=<administrateur@serveur.antoinel12.is-a-geek.net>, 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=<20061124035003.A60A51781E6@serveur.antoinel12.is-a-geek.net>
    Nov 23 22:50:03 serveur postfix/qmgr[9049]: A60A51781E6: from=<root@serveur.antoinel12.is-a-geek.net>, size=563, nrcpt=1 (queue active)
    Nov 23 22:50:03 serveur postfix/local[28770]: A60A51781E6: to=<administrateur@serveur.antoinel12.is-a-geek.net>, 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=<eb13eb060e1edb803012076505465010@stats.antoinel12.is-a-geek.net>
    Nov 23 22:52:59 serveur postfix/qmgr[9049]: 33567178207: from=<phpmyvisites@gmail.com>, 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=<5178b8c337016ec8309b090b7d2140ea@stats.antoinel12.is-a-geek.net>
    Nov 23 22:52:59 serveur postfix/qmgr[9049]: 4A647178208: from=<phpmyvisites@gmail.com>, 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=<150f3f82e471eea662690079b8c16cd9@stats.antoinel12.is-a-geek.net>
    Nov 23 22:52:59 serveur postfix/qmgr[9049]: 5CF10178209: from=<phpmyvisites@gmail.com>, 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=<8e95c88589c7b66b20d6914df9bc8f72@stats.antoinel12.is-a-geek.net>
    Nov 23 22:52:59 serveur postfix/qmgr[9049]: 6E19017820A: from=<phpmyvisites@gmail.com>, 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=<478cde5786d120c83e19154c942c8296@stats.antoinel12.is-a-geek.net>
    Nov 23 22:52:59 serveur postfix/qmgr[9049]: 828A717820B: from=<phpmyvisites@gmail.com>, 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
     
  8. falko

    falko Super Moderator

  9. antoinel12

    antoinel12 New Member

    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)
     
  10. falko

    falko Super Moderator

    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.
     
  11. antoinel12

    antoinel12 New Member

    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...
     
  12. falko

    falko Super Moderator

    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.
     

Share This Page