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 02-25-2009, 08:02 AM   #31
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by jstephens84 View Post
after re reading a couple of post back, I am confused as to why you are using the win32 section in your php when you need to comment those out

[mail function]
; For Win32 only.
;SMTP = localhost
;smtp_port = 25
// Comment both of those and use the sendmail_path

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = sendmail -t -i

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
had not noticed that -- thanks -- have corrected and will try before attempting reinstall
 
Old 02-25-2009, 08:16 AM   #32
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
just noticed that it is giving the error anytime I run php from the command line -- I hope I've not buggered up my system too much

root@pcbsd# php -r mailtest.php
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
PHP Parse error: syntax error, unexpected $end in Command line code on line 1
You have new mail.
 
Old 02-25-2009, 08:50 AM   #33
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by leicaphotos View Post
just noticed that it is giving the error anytime I run php from the command line -- I hope I've not buggered up my system too much

root@pcbsd# php -r mailtest.php
PHP Warning: Module 'mysql' already loaded in Unknown on line 0
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
PHP Parse error: syntax error, unexpected $end in Command line code on line 1
You have new mail.
fixed that error -- was calling mysql and zlib twice -- removed the extra from extensions.ini

still not sending mail
 
Old 02-25-2009, 11:17 AM   #34
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
do you know what mail system you have installed? Are you using postfix or sendmail? shouldn't matter too much just may require an extra parameter or two.
 
Old 02-25-2009, 12:31 PM   #35
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jstephens84 View Post
do you know what mail system you have installed? Are you using postfix or sendmail? shouldn't matter too much just may require an extra parameter or two.
I believe it's sendmail -- I want to thank you again for being so persistent in helping me - I do appreciate it.
 
Old 02-25-2009, 12:58 PM   #36
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by leicaphotos View Post
I believe it's sendmail -- I want to thank you again for being so persistent in helping me - I do appreciate it.
No problem. So lets try a couple of things.
1. Reboot the server and try the script again.
2. if that doesn't help lets see if maybe outbound communication is blocked. ISP's love to block port 25.
Code:
telnet smtp.gmail.com 25
EHLO
you should get some information back. If you don't get anything or the connection is blocked then we know that is why the mail is not going out and it is not a script problem.

3. lets try sending an email from sendmail
Code:
printf "Subject: Test" | sendmail -f your@domain.com your@domain.com
if that works then we should look at your script
 
Old 02-25-2009, 01:07 PM   #37
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jstephens84 View Post
No problem. So lets try a couple of things.
1. Reboot the server and try the script again.
2. if that doesn't help lets see if maybe outbound communication is blocked. ISP's love to block port 25.
Code:
telnet smtp.gmail.com 25
EHLO
you should get some information back. If you don't get anything or the connection is blocked then we know that is why the mail is not going out and it is not a script problem.

3. lets try sending an email from sendmail
Code:
printf "Subject: Test" | sendmail -f your@domain.com your@domain.com
if that works then we should look at your script
telnet to smtp.google.com just stalls

script works -- I've used this script for years

Code:
printf "Subject: Test" | sendmail -f leicaphotos@gmail.com blake@cookbooks.com
just returns me to prompt with no message, no mail sent
 
Old 02-25-2009, 01:17 PM   #38
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
ok, then that might be the problem. You are sending out on port 25 and they are blocking port 25. Try contacting your ISP and see if they are blocking port 25.
 
Old 02-25-2009, 01:23 PM   #39
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
we're handling our own servers -- any blocking of 25 would be from the guy who sits next to me - we've got t3's running into the building

could it be blocked locally on the box?
 
Old 02-25-2009, 01:39 PM   #40
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
ok that is a different story. I thought this was a residential services. That was my fault. So let me do some digging around. I will post back when I find something.
 
Old 02-26-2009, 12:47 PM   #41
3rods
Member
 
Registered: Mar 2008
Posts: 70

Rep: Reputation: 16
Thumbs down Try 587

It could be blocked locally if you installed a firewall (usually not installed by default), but most likely it is blocked by a policy. Try 587 instead, it is the preferred mail transfer port these days.

http://www.pcmag.com/article2/0,2817,1838667,00.asp

Please see if you can telnet to smtp.gmail.com on 587, it should look like this:
Code:
[USER@HOST ~]$ telnet smtp.gmail.com 587
Trying 74.125.47.109...
Connected to smtp.gmail.com.
Escape character is '^]'.
220 mx.google.com ESMTP 6sm15612599ywc.50
^]


You should review the responses from the other posters. Checking to see if port 25 was open was suggested numerous times by posters (myself included) and now, a page and a half later, your finally checked and port 25 is closed.

What exactly is your setup anyway? Are you still trying to relay mail through cookbooks.com or are you trying to host your own mail servers? Is cookbooks.com a Microsoft server? What exactly makes you think that port 25 is not closed by a router or the ISP?
 
Old 03-02-2009, 09:09 AM   #42
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
getting closer - the following is an excerpt of my mail log

Mar 2 00:00:00 pcbsd newsyslog[39301]: logfile turned over
Mar 2 00:01:24 pcbsd sm-mta[7139]: n1RLCSOr037505: to=<kranee21@hotmail.com>, ctladdr=<www@localhost.localdomain> (80/80), delay=2+08:48:56, xdelay=00:30:27, mailer=esmtp, pri=5880898, relay=mx4.hotmail.com. [65.54.244.232], dsn=4.0.0, stat=Deferred: Operation timed out with mx4.hotmail.com.
Mar 2 00:01:25 pcbsd sm-mta[26465]: n1SMaeLj046206: to=<w2hc2s@gmail.com>, ctladdr=<www@localhost.localdomain> (80/80), delay=1+07:24:44, xdelay=00:06:21, mailer=esmtp, pri=5610902, relay=alt4.gmail-smtp-in.l.google.com. [209.85.218.58], dsn=4.0.0, stat=Deferred: Operation timed out with alt4.gmail-smtp-in.l.google.com.


everything is timing out
 
Old 03-02-2009, 09:34 AM   #43
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
I wonder why it is trying to relay everything out. Ok lets try this. go to /sbin (I think) and to an
Code:
ls -al sendmail
See if it points anywhere or is sendmail the actuall binary. On mine I believe sendmail is a symbolic link that points to postfix. I have seen times where it will point to exim also and then of course it might also be that it might be the sendmail binary.

also 3rods, after discussing with leicaphotos I found that they are using a t1 so their ISP is not blocking them this time. However that is a good work around (well pretty much the only work around) if you are using a residential service.
 
Old 03-02-2009, 09:43 AM   #44
leicaphotos
Member
 
Registered: Oct 2008
Posts: 68

Original Poster
Rep: Reputation: 15
no such file or directory within /sbin
 
Old 03-02-2009, 09:51 AM   #45
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
shoot that is right I forgot the box is a bsd based box. try doing a
Code:
find / -name "sendmail"
then navigate to the bin directory. might be /usr/sbin or /usr/local/bin can't remember if there is a /usr/local/sbin or not but if there is then it might be in there.
 
  


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
PHP Mail Not Working RAH104 Linux - Server 3 07-24-2008 09:49 AM
php mail() not working but mailx works twlilinux Linux - Server 6 07-03-2008 09:16 PM
PHP mail() function not working with Exim Madone_SL_5.5 Programming 6 12-03-2006 09:05 PM
php mail() not working sajith Programming 2 11-30-2006 10:54 AM
php mail() function not working as it should on my box juancha Linux - Newbie 14 02-16-2006 12:43 PM


All times are GMT -5. The time now is 12:38 PM.

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