By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,406 Members | 1,470 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,406 IT Pros & Developers. It's quick & easy.

PHP + SENDMAIL = mail()

P: n/a
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....
Thanks
Jul 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
This is the ERROR THAT I GET:
Failed delivery status
Final recipient ad**********@redcatmedia.net
Reason for failure 501 5.1.8 <ap****@localhost.localdomain>...
Domain of sender address ap****@localhost.localdomain does not exist
Reporting mail server localhost.localdomain

What and where do I have to configure ?
Jul 17 '05 #2

P: n/a
Angelos wrote:
This is the ERROR THAT I GET:
Failed delivery status
Final recipient ad**********@redcatmedia.net
Reason for failure 501 5.1.8 <ap****@localhost.localdomain>...
Domain of sender address ap****@localhost.localdomain does not exist
Reporting mail server localhost.localdomain

What and where do I have to configure ?


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.
js*******@attglobal.net
==================
Jul 17 '05 #3

P: n/a
> 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?

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 sendmail.mc ... Ihaven't configured anything
there... so if you thing that I have to edit something , pls tell me by
example.

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, 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')
FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl MASQUERADE_AS(`mydomain.com')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(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

Now... what could my domain be in a server at home ?
How do i specify it ?
Jul 17 '05 #4

P: n/a
Angelos wrote:
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?


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 sendmail.mc ... Ihaven't configured anything
there... so if you thing that I have to edit something , pls tell me by
example.

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, 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')
FEATURE(`accept_unresolvable_domains')dnl
dnl FEATURE(`relay_based_on_MX')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
dnl MASQUERADE_AS(`mydomain.com')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(mydomainalias.com)dnl
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl

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


Angelos,

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 me@example.com, it ensures the mail is coming from
the mail host registered to example.com.

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.
js*******@attglobal.net
==================
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.