My php scripts don't send e-mail html forms.

Discussion in 'Installation/Configuration' started by CombatGod, Nov 7, 2006.

  1. CombatGod

    CombatGod New Member

    Is there a way to check to see if I can send e-mail out from my server. Or a way to set up an external mail server which I could use? I see there is an option to set and external mail server but I do not know how to set it up under co-domains.

    Any help setting up the mail server would be appreciated.

    btw, I'm using a dynamic IP. I know it's not recommended but a fixed IP is currently out of my budget.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the lines that egt added to your mail logfile when you send a email with your form script.
     
  3. CombatGod

    CombatGod New Member

    Where is this log file?
     
  4. edge

    edge Active Member Moderator

    try this small PHP test file.
    Make sure your change the [email protected] to an email address that is not on your system!

    Code:
    <?php
    $to = "[email protected]";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";
    if (mail($to, $subject, $body)) {
      echo("<p>Message successfully sent!</p>");
     } else {
      echo("<p>Message delivery failed...</p>");
     }
    ?>
    
    When you have tested the above PHP script, post the last 10 to 20 lines from your mail.log file (The mail.log file is in: "/var/log")
     
  5. CombatGod

    CombatGod New Member

    Here is an excerpt from my mail.log file.

    Code:
    Nov  2 07:36:19 feraserver postfix/cleanup[5092]: DE0C157806B: message-id=<[email protected]>
    Nov  2 07:36:19 feraserver postfix/local[5095]: DE0C157806B: to=<[email protected]>, orig_to=<root>, relay=local, delay=1, status=sent (delivered to maildir)
    Nov  3 07:37:13 feraserver postfix/cleanup[21501]: 4CF7D57806B: message-id=<[email protected]>
    Nov  3 07:37:13 feraserver postfix/local[21504]: 4CF7D57806B: to=<[email protected]>, orig_to=<root>, relay=local, delay=0, status=sent (delivered to maildir)
    Nov  4 07:38:23 feraserver postfix/cleanup[32100]: 4FE8857806B: message-id=<[email protected]>
    Nov  4 07:38:23 feraserver postfix/local[32102]: 4FE8857806B: to=<[email protected]ias.com>, orig_to=<root>, relay=local, delay=0, status=sent (delivered to maildir)
    Nov  5 07:36:11 feraserver postfix/cleanup[766]: 5775A57806B: message-id=<[email protected]>
    Nov  5 07:36:11 feraserver postfix/local[768]: 5775A57806B: to=<[email protected]>, orig_to=<root>, relay=local, delay=0, status=sent (delivered to maildir)
    Nov  6 07:44:38 feraserver postfix/cleanup[10255]: D10E057806B: message-id=<[email protected]>
    Nov  6 07:44:39 feraserver postfix/local[10257]: D10E057806B: to=<[email protected]>, orig_to=<root>, relay=local, delay=1, status=sent (delivered to maildir)
    Nov  6 23:01:52 feraserver postfix/pickup[22705]: 9C8F957806B: uid=33 from=<www-data>
    Nov  6 23:01:52 feraserver postfix/cleanup[26552]: 9C8F957806B: message-id=<[email protected]>
    Nov  6 23:01:56 feraserver postfix/smtp[26554]: connect to mx01.1and1.com[217.160.226.101]: Connection refused (port 25)
    Nov  6 23:01:59 feraserver postfix/smtp[26554]: connect to mx00.1and1.com[217.160.226.100]: Connection refused (port 25)
    Nov  6 23:01:59 feraserver postfix/smtp[26554]: 9C8F957806B: to=<[email protected]>, relay=none, delay=7, status=deferred (connect to mx00.1and1.com[217.160.226.100]: Connection refused)
    Nov  6 23:03:09 feraserver postfix/pickup[22705]: F3B13578072: uid=33 from=<www-data>
    Nov  6 23:03:09 feraserver postfix/cleanup[26552]: F3B13578072: message-id=<[email protected]>
    Nov  6 23:03:12 feraserver postfix/smtp[26554]: connect to mx01.1and1.com[217.160.226.101]: Connection refused (port 25)
    Nov  6 23:03:15 feraserver postfix/smtp[26554]: connect to mx00.1and1.com[217.160.226.100]: Connection refused (port 25)
    Nov  6 23:03:15 feraserver postfix/smtp[26554]: F3B13578072: to=<[email protected]>, relay=none, delay=7, status=deferred (connect to mx00.1and1.com[217.160.226.100]: Connection refused)
    Nov  6 23:06:24 feraserver postfix/pickup[22705]: 645AF578079: uid=33 from=<www-data>
    Nov  6 23:06:24 feraserver postfix/cleanup[26937]: 645AF578079: message-id=<[email protected]>
    Nov  6 23:06:27 feraserver postfix/smtp[26939]: connect to gmail-smtp-in.l.google.com[64.233.163.27]: Connection refused (port 25)
    Nov  6 23:06:30 feraserver postfix/smtp[26939]: connect to gmail-smtp-in.l.google.com[64.233.163.114]: Connection refused (port 25)
    Nov  6 23:06:33 feraserver postfix/smtp[26939]: connect to alt2.gmail-smtp-in.l.google.com[66.249.93.27]: Connection refused (port 25)
    Nov  6 23:06:36 feraserver postfix/smtp[26939]: connect to alt1.gmail-smtp-in.l.google.com[66.249.83.114]: Connection refused (port 25)
    Nov  6 23:06:39 feraserver postfix/smtp[26939]: connect to alt2.gmail-smtp-in.l.google.com[66.249.93.114]: Connection refused (port 25)
    Nov  6 23:06:42 feraserver postfix/smtp[26939]: connect to alt1.gmail-smtp-in.l.google.com[66.249.83.27]: Connection refused (port 25)
    Nov  6 23:06:45 feraserver postfix/smtp[26939]: connect to gsmtp163.google.com[64.233.163.27]: Connection refused (port 25)
    Nov  6 23:06:48 feraserver postfix/smtp[26939]: connect to gsmtp183.google.com[64.233.183.27]: Connection refused (port 25)
    Nov  6 23:06:48 feraserver postfix/smtp[26939]: 645AF578079: to=<[email protected]>, relay=none, delay=24, status=deferred (connect to gsmtp183.google.com[64.233.183.27]: Connection refused)
    Nov  6 23:09:44 feraserver postfix/pickup[22705]: 5DA51578082: uid=33 from=<www-data>
    Nov  6 23:09:44 feraserver postfix/cleanup[27205]: 5DA51578082: message-id=<[email protected]>
    Nov  6 23:09:47 feraserver postfix/smtp[27207]: connect to gmail-smtp-in.l.google.com[64.233.163.27]: Connection refused (port 25)
    Nov  6 23:09:50 feraserver postfix/smtp[27207]: connect to gmail-smtp-in.l.google.com[64.233.163.114]: Connection refused (port 25)
    Nov  6 23:09:53 feraserver postfix/smtp[27207]: connect to alt1.gmail-smtp-in.l.google.com[66.249.83.27]: Connection refused (port 25)
    Nov  6 23:09:56 feraserver postfix/smtp[27207]: connect to alt1.gmail-smtp-in.l.google.com[66.249.83.114]: Connection refused (port 25)
    Nov  6 23:09:59 feraserver postfix/smtp[27207]: connect to alt2.gmail-smtp-in.l.google.com[66.249.93.27]: Connection refused (port 25)
    Nov  6 23:10:02 feraserver postfix/smtp[27207]: connect to alt2.gmail-smtp-in.l.google.com[66.249.93.114]: Connection refused (port 25)
    Nov  6 23:10:05 feraserver postfix/smtp[27207]: connect to gsmtp183.google.com[64.233.183.27]: Connection refused (port 25)
    Nov  6 23:10:08 feraserver postfix/smtp[27207]: connect to gsmtp163.google.com[64.233.163.27]: Connection refused (port 25)
    Nov  6 23:10:08 feraserver postfix/smtp[27207]: 5DA51578082: to=<[email protected]>, relay=none, delay=24, status=deferred (connect to gsmtp163.google.com[64.233.163.27]: Connection refused)
    Nov  6 23:21:17 feraserver postfix/pickup[22705]: 9758D578087: uid=33 from=<www-data>
    Nov  6 23:21:17 feraserver postfix/cleanup[28086]: 9758D578087: message-id=<[email protected]>
    Nov  6 23:21:20 feraserver postfix/smtp[28088]: connect to mx01.1and1.com[217.160.226.101]: Connection refused (port 25)
    Nov  6 23:21:23 feraserver postfix/smtp[28088]: connect to mx00.1and1.com[217.160.226.100]: Connection refused (port 25)
    Nov  6 23:21:23 feraserver postfix/smtp[28088]: 9758D578087: to=<[email protected]>, relay=none, delay=6, status=deferred (connect to mx00.1and1.com[217.160.226.100]: Connection refused)
    Nov  6 23:23:23 feraserver postfix/pickup[22705]: 96E80578089: uid=33 from=<www-data>
    Nov  6 23:23:23 feraserver postfix/cleanup[28277]: 96E80578089: message-id=<[email protected]>
    Nov  6 23:23:26 feraserver postfix/smtp[28278]: connect to mx00.1and1.com[217.160.226.100]: Connection refused (port 25)
    Nov  6 23:23:29 feraserver postfix/smtp[28278]: connect to mx01.1and1.com[217.160.226.101]: Connection refused (port 25)
    Nov  6 23:23:29 feraserver postfix/smtp[28278]: 96E80578089: to=<[email protected]>, relay=none, delay=6, status=deferred (connect to mx01.1and1.com[217.160.226.101]: Connection refused)
    Nov  6 23:25:22 feraserver postfix/master[24613]: terminating on signal 15
    Nov  6 23:25:24 feraserver postfix/master[28769]: daemon started -- version 2.2.10, configuration /etc/postfix
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Looks like the mail servers of the big providers are rejecting all your mails. Do you host your server behind a dsl or cable uplink with a dynamic IP address?
     

Share This Page