Maybe I didn't state my problem clearly enough... I apologize. Let's try
again.

On my network, I have a mail server (192.168.1.6). My machine is playing the
role of the web server (Ubuntu 10.04). The (current) production web server
is running PHP under Windows using IIS.

On the Windows machine, all I needed to do for PHP to start sending mail was
edit the php.ini file under the [mail function] heading and add SMTP =
192.168.1.6 and it started working like a champ.

Sadly, this is one instance where linux has caused me more grief...
Initially, I tried the mail() function without installing anything and it
kept throwing errors. So, I installed postfix and edited the php.ini file to
set sendmail_path = "/usr/sbin/sendmail -t -i". Now my php script claims the
messages are being sent, but nothing is coming through. I tried sending a
message through the CLI and, according to mailq, all messages sent. Nothing
has come through. The log files show no errors.

On Wed, Sep 21, 2011 at 5:20 PM, Steve Litt <[email protected]>wrote:

> Hi Paul,
>
> If you're anything like me you'll conclude that setting up any full-
> blown SMTP server requires extreme ninja admin chops. That's why I use
> nullmailer -- a mere mortal can set it up. It won't pass email from
> server to server, but it sure allows your computer's native mail
> command to work.
>
> See this:
>
> http://www.troubleshooters.com/linux/nullmailer.htm
>
> Good luck.
>
> SteveT
>
> On Wednesday, September 21, 2011 04:28:29 PM Paul Spicer wrote:
> > It wasn't letting me send any mail. I just broke down and installed
> > postfix, but now I can't figure out how to configure it to send
> > mail through a remote SMTP server. Or locally, for that matter...
> >
> > This is one instance where it "just works" under Windows... (Just
> > add the SMTP server address to the php.ini)
> >
> > On Wed, Sep 21, 2011 at 4:15 PM, Mike Rathburn <[email protected]>
> wrote:
> > > PHP will send out via sendmail by default on Linux.  No action
> > > required. You have to actually turn it off in php.ini if you
> > > don't want to use sendmail.  Look for the 'sendmail_path'
> > > directive in php.ini.
> > >
> > > > -----Original Message-----
> > > > From: Paul Spicer [mailto:[email protected]]
> > > > Sent: Wednesday, September 21, 2011 3:46 PM
> > > > To: list
> > > > Subject: Legit question this time (mail and PHP)
> > > >
> > > > I'm trying to get PHP's mail() command to work, but alas, no
> > > > luck so far. All solutions I've found require me to set my box
> > > > up as an SMTP server
> > >
> > > (using
> > >
> > > > postfix). We already have one mail server on this network! How
> > > > can I convince PHP to send email WITHOUT having to add 'mail
> > > > server' to this
> > >
> > > box's
> > >
> > > > job requirements?
> > >
> > > -----------------------------------------------------------------
> > > ---- Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
> > > RSS Feed
> > > http://www.mail-archive.com/[email protected]/maillist.xml
> > > Unsubscribe  [email protected]
>
>
> ---------------------------------------------------------------------
> Archive      http://marc.info/?l=jaxlug-list&r=1&w=2
> RSS Feed     http://www.mail-archive.com/[email protected]/maillist.xml
> Unsubscribe  [email protected]
>
>

Reply via email to