Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sendmail issues



Howdy all, this is liable to be a tanker, so if you don't know about
sendmail you might want to pass up the reading of this here messagy.

About a week ago, I gnabbed a copy of php for my win2k box so that I
could build some pages against some existing asp code without having
to switch back and forth between my mac and pc.
While building the new php site, from the old asp code, I came across
the php:mail() function for some stuff I had going on using
SMTPsvgMailer ( ASPmail ), and found with great joy that php had a
mail() function built right in. I was shooting mail to myself through
the website in no time at all and loving life as I knew it.

Once the site was remanufactured in it's entirety, I copied the
resulting php code with assets over to my mac, where I have Apache
running on port 80 so that my client could come view their website in
all it's glory at the root of my server, which we'll refer to as
www.me.com

Everything was working great, until the client tried to 'subscribe' to
the site newsletter, which uses the php mail function. The form
returned just fine, stating that indeed a true value had been returned
to the php:mail() call so the email should have been in the air. This
however, was not the case.

My problem results from the fact that out of the box, php mail works on
windows, but not under osx. From further investigation I tracked down
some hard facts about sendmail and php and how everything has to be set
up for it to work, because windows php uses some other client-side
method with your existing internet host information or some such.

I then proceeded to Oreilly's terminal article on setting up sendmail,
but I have since been very confused about several points of terminology
when discussing the mail server.

In an effort to unwind the series of problems that I've been having,
I've posted to unix-porting, along with various newsgroups with some
fair results. More quantity than anything. One respondant on the unix
list referred me to this list for a possible answer to my problem. So I
suppose that I should start with the most obvious points, my needs.

My internet service provider will not allow me to send mail directly
from my box to other servers so I need to use SMART-HOST or something
akin to this in my .mc file Several people have recommended the
masquerading pages at sendmail.org however, these aren't making a whole
lot of sense to me. In essence, I need sendmail to use
smtp.mindspring.com instead of attempting to send the mail itself. What
i'm getting now is some sort of borked attempt at the sendmail app
trying to send directly to the target host, which is failing. So this
is point 1 of what i'm trying to figure out, not entirely the most
pressing issue, but none-the-less important.

Number 2 is a permissions problem.

Previously, when I first completed the Oreilly tutorial on setting up
sendmail, I would attempt to do

%mail email@hidden
Subject: Test
Test
(Ctrl+D)

and get the resulting errors:
collect: Cannot write ./dfg817W7pZ003173 (bfcommit, uid=501, gid=25):
Permission denied
queueup: cannot create queue temp file ./tfg817W7pZ003173, uid=501:
Permission denied

In an effort to get around this problem, I opened up access to
/var/spool/*queue to a+rwx

This resulted in me being able to perform the above mail command, but
nothing was ever delivered. Instead I would get back some cruft in my
local mailbox with what looked like standard undeliverables.

tail -f /var/log/mail.log would then contain stuff like:

Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181:
to=email@hidden, ctladdr=tingham (501/20), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=30044, relay=mx06.mindspring.com.
[207.69.200.239], dsn=5.0.0, stat=Service unavailable

Further examination of /var/spool/*queue revealed that mqueue had it's
permissions set to:

drwx-----T

to which I had to chmod 700 to get the T knocked off, because the
SECURITY file for sendmail lists mqueue as being user rwx.

Now, when I perform the %mail function listed above I get output
similar to

Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181:
to=email@hidden, ctladdr=tingham (501/20), delay=00:00:01,
xdelay=00:00:01, mailer=esmtp, pri=30044, relay=mx06.mindspring.com.
[207.69.200.239], dsn=5.0.0, stat=Service unavailable
Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181: forward
/Users/tingham/.forward.coalmarch+: Group writable directory
Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181: forward
/Users/tingham/.forward+: Group writable directory
Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181: forward
/Users/tingham/.forward.coalmarch: Group writable directory
Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181: forward
/Users/tingham/.forward: Group writable directory
Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMVmF004181:
g81MMWmE004183: DSN: Service unavailable
Sep 1 18:22:32 coalmarch sendmail[4183]: g81MMWmE004183: to=tingham,
delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31076, dsn=2.0.0,
stat=Sent

The overwhelmingly confusing point being that I see "stat=Sent" and
think that the message has been delivered. This however as you can
imagine is not the case, and now I am afraid that I am so lost that I
cannot find points where I might be able to detail a single point of
the process I've been through to anyone that might know how to set up
sendmail from scratch.

I beg of you, if you've gotten sendmail running under osx jaguar,
please clue me in as to what I'm doing wrong. Also if you know how to
make it work with UBE blocking ISP's I'd surely and sorely like to know
what the secret to masquerading is.

thanks so much for your time and consideration

Thomas

------------------------------------------------------------------------
------
Thomas Ingham (aim-inghamtom) (msn-ingham_thomas)
Web Developer - Coalmarch Productions
http://www.coalmarch.com
919-522-8027
_______________________________________________
darwin-userlevel mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-userlevel
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.