LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-18-2007, 03:38 PM   #1
eysikal
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Rep: Reputation: 0
Question Linux box (Debian) not sending e-mail


First of all, I know next to nothing about linux/unix. I have a PHP script that runs on this Debian Linux server that doesn't seem to be able to send e-mail.

my script looks something like this:

PHP Code:
<?php
    
if(mail("email@email.com""test""test")){
        echo(
"success")
    } else {
          echo(
"failure");
      }
?>
The script runs and echoes out "success." Yet I do not receive any e-mail. I tested the script on a known-to-work environment, and the e-mail sends just fine.

I've tried specifying the "sendmail" path in PHP.ini, but this didn't seem to make a difference, and I also noticed that I have more than one "sendmail" file on the debian box.

Any idea on how to troubleshoot this?
 
Old 09-18-2007, 05:00 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,820

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
send a mail and look at the end of /var/log/syslog. Also try running a sendmail command yourself.
 
Old 09-18-2007, 05:56 PM   #3
eysikal
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
send a mail and look at the end of /var/log/syslog. Also try running a sendmail command yourself.
Thanks for the idea. I've tried sending a mail and then looking at the log...doesn't appear to be updating as I send one. I do see entries like the following:

Sep 18 06:23:01 tannerlab /USR/SBIN/CRON[4169]: (mail) CMD ( if [ -x /usr/sbin/exim -a -f /etc/exim/exim.conf ]; then /usr/sbin/exim -q ; fi)

I tried a sendmail command, but I'm not familiar enough with the syntax to get it right.

at the prompt I typed:

sendmail myemailaddress@gmail.com

I was then prompted with a blinking cursor that allows me to type anything I wish and hit enter with no apparent result.

Where do I go from here? Sorry, I am a total linux noobie.
 
Old 09-18-2007, 06:02 PM   #4
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,820

Rep: Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610Reputation: 610
well. I meant to type /var/log/mail.log.

After you type things, try a period on a line by itself. Though I haven't actually used sendmail..
 
Old 09-18-2007, 06:07 PM   #5
eysikal
LQ Newbie
 
Registered: Sep 2007
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by AlucardZero View Post
well. I meant to type /var/log/mail.log.

After you type things, try a period on a line by itself. Though I haven't actually used sendmail..
Ok. Well, I checked the mail log and I can find no new entries....hmmm. Any ideas? (Oh yeah, the period by itself worked)
 
Old 09-18-2007, 11:59 PM   #6
Bernard Swiss
LQ Newbie
 
Registered: Sep 2007
Location: Just outside Vancouver, Canada
Distribution: Debian (for now)
Posts: 27

Rep: Reputation: 24
OK, I don't know much about this, (I'm happy enough with Thunderbird, and mutt for when I'm forced to read system-generated messages about failed cron jobs, etc) but some things come to mind.

First of all, I believe that Debian (default) uses exim, rather than sendmail.

Second, how did you configure your mail when installing Debian? There's about 5 different standard options during the install, ranging from no mail handling at all to serving/hosting your own.

You can rerun the email confiuration routine with
# dpkg-reconfigure exim4-config

The debian install manual has a section that covers this.
8.5. Setting Up Your System To Use E-Mail
http://www.debian.org/releases/stabl...h08s05.html.en

Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help sending a 4-port trunk to my linux box BrianK Linux - Networking 3 06-12-2006 10:47 PM
Sending mail in Debian Marq Linux - Software 1 03-13-2006 10:10 PM
Sending mail from linux box alex360 Linux - Newbie 2 07-08-2005 10:56 AM
Sending fax from a remote box via e-mail ricky_ds Linux - Networking 0 11-11-2004 09:23 AM
Sending Linksys logs to Linux box and IP tables xavierh Linux - Wireless Networking 1 03-05-2004 09:09 AM


All times are GMT -5. The time now is 02:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration