[K12OSN] Using a remote mail server and letting apache have access to it

Les Mikesell les at futuresource.com
Fri Nov 3 03:41:42 UTC 2006


On Thu, 2006-11-02 at 18:04, jones yeates wrote:
> Hi,
> 
> I apologize if this is the wrong place to be asking this.  I've been
> searching on the web for answers and I can't seem to find any.  A
> friend told me about this list serve and thought I'd give it a try.
> 
> I had php,mysql and apache running on a Windows box last year and I
> have just changed it to a Linux box this year.  Everything works
> except for my abiity to send mail that I have generated through my php
> script.  
> 
> I do not want my Linux server to act as a mail server.  There is one
> in my school board and I would like to just send mail through there. 
> I noticed that in Linux I have to send it to a program that will
> re-route the message appropriately.  I was also able to have a
> different domain name appear in the e-mail's subject section, so that
> the kids could not track it back to my server. 
> 
> So basically what I would like is:
> - send e-mails through php/apache
> - not have the server's domain name appear in the "from" part of the
> e-mail or even in the subject
> - have a different domain name appear in the e-mail message 
> - just relay all messages to the school board's mail server
> - I don't want to use the mail server feature on my server other than
> to forward e-mails to the school board's mail server
> 
> I have installed Fedora Core 5 
> - php 5.1.4
> - mysql 5.0.22
> - apache 2.2.2
> - sendmail
> 
> I have entered:  define('confTRUSTED_USERS','apache'); into the
> sendmail.mc file and tried to do a make -C /etc/mail and it doesn't
> seem to work.  If it is working there is a huge delay (for days). 
> 
> I can get mail or mailx to send messages but not through apache.
> 
> Does anyone know how to set this up?

If you set:
define(`SMART_HOST',`your.forwarding.server')
in sendmail.mc it will forward outbound messages through
the designated server, and
MASQUERADE_AS(`host.domain')
will rewrite the headers on outbound mail to the
specified name.

You should be able to see the messages logged in
/var/log/maillog - if the web app is handing them to
sendmail.

-- 
  Les Mikesell
   les at futuresource.com





More information about the K12OSN mailing list