PHP + SENDMAIL = mail()

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

What are the steps to configure PHP and sendmail on a linux BOX
(Specifically Fedora Core 2 or 3) in order to make mail() function to work ?

I haven't done any changes ... my configuration files are as they came with
Fedora Core Distro
Any relating links, tutorials would be usefull....

CONTinued: PHP + SENDMAIL = mail()

This is the ERROR THAT I GET:
      Failed delivery status
            Final recipient
Domain of sender address apache@localhost.localdomain does not exist
            Reporting mail server localhost.localdomain

What and where do I have to configure ?

Re: CONTinued: PHP + SENDMAIL = mail()

Angelos wrote:
Quoted text here. Click to load it

Are you sure it's a PHP.INI issue, or something else?  For instance -
Does the domain localhost.localdomain actually exist? Is this server
local to you or on a webserver someplace?  Do you have an MTA running on
this host?

All kinds of possibilities here.  Without more information, it's
impossible to tell.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: CONTinued: PHP + SENDMAIL = mail()

Quoted text here. Click to load it
Jerry thanks for your reply,
Actually I am not sure what I have to do...
Server is a linux box in my LAN...
I do not know what you mean when you ask if the localhost.localdomain exists
and I don't know what is MTA or if I have to have it running ...
Below are some lines from ... Ihaven't configured anything
there... so if you thing that I have to edit something , pls tell me by

DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
dnl FEATURE(`relay_based_on_MX')dnl
dnl MASQUERADE_AS(`')dnl
dnl FEATURE(masquerade_envelope)dnl
dnl FEATURE(masquerade_entire_domain)dnl
dnl MASQUERADE_DOMAIN(localhost)dnl
dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl

Now... what could my domain be in a server at home ?
How do i specify it ?

Re: CONTinued: PHP + SENDMAIL = mail()

Angelos wrote:
Quoted text here. Click to load it


First of all, an MTA is a Mail Transfer Agent.  That's what's
responsible for sending email across the internet.  Some common ones are
sendmail, exim and (for windows) ArgoSoft Mail Server.

localhost.localdomain isn't a valid domain name.  Many MTAs are
configured to reject invalid FROM: addresses as a SPAM prevention
measure.  So it's very possible that the remote domain is rejecting the
mail because of the invalid FROM: address.

Also, to send the mail with the mail() command, you need access to an
MTA.  This may be on your local system or it may be the MTA on your ISP
which you normally use to send mail.

Note: the latter is probably better, because many MTAs are also
configured to do a "reverse domain lookup" - they check to ensure you
are sending email from the domain you're using.  For instance, if you
say the mail is from, it ensures the mail is coming from
the mail host registered to

In either case, the php.ini file must be configured to use your MTA.
Each one is different.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline