Home › Forums › OS X Server and Client Discussion › Mail › Sending mail from PHP on OS X Server 10.2
- This topic has 5 replies, 3 voices, and was last updated 21 years, 5 months ago by
stevebrowne.
-
AuthorPosts
-
May 25, 2003 at 5:17 pm #355686
Anonymous
ParticipantI am configuring a Mac OS X Server and transitioning from several OS 9 servers on our T1. I am trying to use Open Source solutions that are based on PHP and MySQL. I just installed a rather nice list management solution called PHPList, but I am not able to send mail from it so far. I believe it wants to send mail locally. I have Apple’s mail server off and all our mail continues to go through an EIMS 3.1.4 server running on Mac OS 9.1. Do I need to enable Sendmail on OS X? Do I have to make any changes to the php.ini file?
Thanks for any help!
June 27, 2003 at 7:01 pm #355996Anonymous
ParticipantHi,
I’m pursuing this, too.
I outlined the way I’m thinking of approaching this here: [url]https://www.afp548.com/eBBS/viewtopic.php?t=691[/url]
If you try any of this, post your results!
August 24, 2003 at 3:29 am #356303l008com
ParticipantI did the same thing for the same reason. No need to modify anything that talks to sendmail. And it sorta works. Now my PHPs can send emails out to the world. But local emails go to /var/mail, and I’m running AppleMailServer, and it doesn’t pick up the mail in that folder. I am still using AMS for SMTP along with POP, I just want postfix to deliver mail from PHP. The strange thing is that, with sendmail, I couldn’t send mail out to the world, but I got local mail no problem, now its the opposite. But I’m told that both programs work the same, when you recieve an email, it just dumps it into /var/mail. So how come postfix’s emails are ignore and sendmail’s somehow made it into AMS? When you tell AMS to use an external SMTP server, it will pick up all the mail in the /var/mail directory. I’m so close but I can’t figure out what holding me back? I wanna still use AMS for non php mail because I’m a Mac user and I’ll take a GUI over a command line anyday.
November 5, 2003 at 9:48 am #356740stevebrowne
ParticipantResponse is for 10.2.3+ Jaguar Server
I will be testing a SIMILAR configuration out over the next week.
I believe that mail will work (in BOTH DIRECTIONS!) if you tell Apple MailServer (Squirrelmail) to store mail in “alternate location” (rather than the default contiguous database), and use the Unix default directory, then the MailServer can be made to work with Postfix and other local Unix mail daemons and apps (in addition to POP, SMTP and IMAP email clients) which should therefore include PHP.
Note that CLI sendmail works too (without being daemonised) using the standard default Apple MailServer configs. I must check whether this transaction is a file-based or SMTP:25.
Use
[b:eee4bb4c55]Server Settings | Internet | MailService | Configure Mail Service
and select “Use Alternate Alternate Mail Location”[/b:eee4bb4c55]As I remember, the default mail storage should be /var/mail (it’s been a while and this must be checked).
WARNING: Clear ALL mail on your Server BEFORE, and temporarily disable POP, IMAP and SMTP, while making this change, otherwise there may be duplication of accounts and messages including a loss of POP sync for read/unread mail stored on the server.
I am slightly surprised no official response has been made to your request and suggest that it may be considered a case of “RTFM” (I am refereing to the OS X Server Admin Guide).
November 5, 2003 at 9:56 am #356741l008com
ParticipantI ended up having both postfix and AMS relay through my ISP’s mail server because thanks to the scum bag cable companies, emails I were sending were disappearing, especially to AOL people. I tried using just postfix for a while, but I need SMTP Authentication so I can send mail from my server from outside of my house. And setting up SMTP Auth in anything other than OS X Server is a major major production. But relaying through my ISP means that all mail goes out then comes back in, so everything gets sorted right, and I can send mail to aol users, all my great scripts can send emails, and everything works great. So great, I’m afraid to upgrade to 10.3 because I don’t wanna mess anything up. I have a lot of email accounts.
November 5, 2003 at 12:44 pm #356745stevebrowne
Participant😮 [b:1dc14543e5]You don’t risk losing ANY accounts! [/b:1dc14543e5]Sorry, didn’t intend to mislead…
Fundamentally, you risk duplicating messages that are stored on the Server by POP Clients, as well as losing any mail transactions that are active at the time of reconfiguration – that is why I mentioned the precaution. Same thing can happen when you rebuild Apple MailServer Database.
[i:1dc14543e5][b:1dc14543e5]Worst case is users that use POP and store mail on server have to download a new mailbox full of mail the’ve already got…[/b:1dc14543e5][/i:1dc14543e5]
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed