RE: PHP mail() - someone must know.. ( msg # 1.: Posted Oct 12, 03 8:30 pm ) Jim Mooney Level 3 Joined: Sep, 2001 Posts: 732 There can be a couple of problems but you need to look at the sendmail logs to find out why the mail is not going through. /var/log/mail.log If you want to watch as the page fails..... you can tail tail -f /var/log/mail.log then in the web browser go to your web form and watch the errors get reported. I got it figured out. I found a nice php script that actually does SMTP auth when it sends just like an email client and that fixed everything. http://macnode.com/smtp.class-1.0.5.tar.gz This has worked GREAT for me and solved all my problems. RE: Sendmail Problems ( msg # 2.: Posted Nov 28, 02 9:13 pm ) Jyri Palm Joined: Nov, 2002 Posts: 18 It sounds like your script is trying to send mail to your mailserver at "localhost" (127.0.0.1) where the mail server is not running. I found that when I set up Apple Mail Server, for example, I used 127.0.0.1. When I tried to send mail from outside to user@myserver.mydomain, my mail client failed. When I went and did it manually, Apple Mail Server was kind enough to tell me that the user had no account at that address, but did at 127.0.0.1. So I was able to go in and change the localhost address to the machine IP. Here is something you can try in a Terminal window. Type: netstat -an This shows all the ports that are listening. The mail port is 25. You may see your ip.25 and there may be no 127.0.0.1.25 accepting mail at localhost. I don't know how to fix that if that is the case. You may want to make the script send to the hostname or something. Another way to trouble shoot is to connect manually to a mail server. If you try this you will probably have connection refused confirming the above suspicion: telnet 127.0.0.1 25 If you get a connection try these, pressing return after each line: HELO mydomain.com MAIL FROM: someone@somewhere.com RCPT TO: localuser@yoursomain.com QUIT There are other commands and the message body, but this can give you an idea of what is really going on. RE: Sendmail Problems ( msg # 2.1: Posted Nov 29, 02 1:49 pm ) Craig Forest Joined: Nov, 2002 Posts: 5 Thanks for your reply, it was helpful in finding the problem but I'm not sure how to solve the problem now. I tried what you suggested by typing netstat -an into the terminal window. I also tried typing telnet 127.0.0.1 25 and had connection refused. It shows no port 25 listening. I'm not sure what I should do from this point. RE: Sendmail Problems ( msg # 2.1.1: Posted Dec 1, 02 7:14 am ) Kristoffer Level 2 Joined: Aug, 2002 Posts: 489 Sthlm, Sweden If you telnet 127.0.0.1 25 you should see something similiar to this: 220 "hostname here" ESMTP Sendmail 8.12.2/8.12.2; Sun, 1 Dec 2002 14:10:23 +0100 (CET) If this don't work, one of 2 things are possible. 1. Sendmail is not running 2. Port 25 is blocked. Check firewall settings, try to port scan and see if port 25 is open. sendmail files are stored in /etc/mail Sendmail is closed relay by default in /etc/mail you should have a file called relay-domains if not, create it, and add 127.0.0.1 in there and all other IP's you want to give access to use your mail server. RE: Sendmail Problems ( msg # 2.1.1.1: Posted Dec 11, 02 2:19 am ) Thomas Koons Level 4 Joined: Aug, 2000 Posts: 899 One thing that might interest you is that if you turn on Apples Mail Server then you can send mail using sendmail in your cgi scripts. This is how I do it. sendmail is not enabled yet telling my cgi scripts to use sendmail does work! I think when Apples Mail server is active then any mail sent to sendmail is redirected to Apple Mail and it then sends the messages. I didn't have to make any changes in the mail settings for this to work but for security you should goto host settings/incoming and then enable relay for hosts in list only and add 127.0.0.1 to the list so only your server can send mail. Its working for me and if I want to disable sendmail use all I have to do is turn off the Apple mail server. No config files and terminal use needed. Tom RE: Sendmail Problems ( msg # 2.1.1.1.1: Posted Oct 15, 03 3:57 pm ) MacWorks Level 2 Joined: Aug, 2000 Posts: 92 Twin Cities Okay, I've followed a number of the suggestions/tutorials to get sendmail up and running. However, I really would like to use the easier route Ð Apple Mail Server which I have had up and running for months. The problem now is that I have taken steps to make sendmail work, but now I need to know how to rollback and let Apple Mail take over. Any suggestions?