HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   My php scripts don't send e-mail html forms. (http://www.howtoforge.com/forums/showthread.php?t=7995)

CombatGod 7th November 2006 07:33

My php scripts don't send e-mail html forms.
 
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.

till 7th November 2006 12:17

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

CombatGod 7th November 2006 16:38

Where is this log file?

edge 7th November 2006 17:07

try this small PHP test file.
Make sure your change the recipient@example.com to an email address that is not on your system!

Code:

<?php
$to = "recipient@example.com";
$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")

CombatGod 7th November 2006 19:30

Here is an excerpt from my mail.log file.

Code:

Nov  2 07:36:19 feraserver postfix/cleanup[5092]: DE0C157806B: message-id=<20061102133618.DE0C157806B@feraserver.dynalias.com>
Nov  2 07:36:19 feraserver postfix/local[5095]: DE0C157806B: to=<combatgod@feraserver.dynalias.com>, orig_to=<root>, relay=local, delay=1, status=sent (delivered to maildir)
Nov  3 07:37:13 feraserver postfix/cleanup[21501]: 4CF7D57806B: message-id=<20061103133713.4CF7D57806B@feraserver.dynalias.com>
Nov  3 07:37:13 feraserver postfix/local[21504]: 4CF7D57806B: to=<combatgod@feraserver.dynalias.com>, orig_to=<root>, relay=local, delay=0, status=sent (delivered to maildir)
Nov  4 07:38:23 feraserver postfix/cleanup[32100]: 4FE8857806B: message-id=<20061104133823.4FE8857806B@feraserver.dynalias.com>
Nov  4 07:38:23 feraserver postfix/local[32102]: 4FE8857806B: to=<combatgod@feraserver.dynalias.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=<20061105133611.5775A57806B@feraserver.dynalias.com>
Nov  5 07:36:11 feraserver postfix/local[768]: 5775A57806B: to=<combatgod@feraserver.dynalias.com>, orig_to=<root>, relay=local, delay=0, status=sent (delivered to maildir)
Nov  6 07:44:38 feraserver postfix/cleanup[10255]: D10E057806B: message-id=<20061106134438.D10E057806B@feraserver.dynalias.com>
Nov  6 07:44:39 feraserver postfix/local[10257]: D10E057806B: to=<combatgod@feraserver.dynalias.com>, 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=<20061107050152.9C8F957806B@feraserver.dynalias.com>
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=<computer@feratechinc.com>, 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=<20061107050308.F3B13578072@feraserver.dynalias.com>
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=<robert@feratechinc.com>, 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=<20061107050624.645AF578079@feraserver.dynalias.com>
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=<stolorz@gmail.com>, 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=<20061107050944.5DA51578082@feraserver.dynalias.com>
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=<stolorz@gmail.com>, 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=<20061107052117.9758D578087@feraserver.dynalias.com>
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=<robert@feratechinc.com>, 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=<20061107052323.96E80578089@feraserver.dynalias.com>
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=<robert@feratechinc.com>, 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


till 8th November 2006 11:16

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?


All times are GMT +2. The time now is 03:30.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.