PHP + SENDMAIL = mail()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Angelos

    PHP + SENDMAIL = mail()

    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


  • Angelos

    #2
    CONTinued: PHP + SENDMAIL = mail()

    This is the ERROR THAT I GET:
    Failed delivery status
    Final recipient adevletoglou@re dcatmedia.net
    Reason for failure 501 5.1.8 <apache@localho st.localdomain> ...
    Domain of sender address apache@localhos t.localdomain does not exist
    Reporting mail server localhost.local domain



    What and where do I have to configure ?


    Comment

    • Jerry Stuckle

      #3
      Re: CONTinued: PHP + SENDMAIL = mail()

      Angelos wrote:[color=blue]
      > This is the ERROR THAT I GET:
      > Failed delivery status
      > Final recipient adevletoglou@re dcatmedia.net
      > Reason for failure 501 5.1.8 <apache@localho st.localdomain> ...
      > Domain of sender address apache@localhos t.localdomain does not exist
      > Reporting mail server localhost.local domain
      >
      >
      >
      > What and where do I have to configure ?
      >
      >[/color]

      Are you sure it's a PHP.INI issue, or something else? For instance -
      Does the domain localhost.local domain 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.
      jstucklex@attgl obal.net
      =============== ===

      Comment

      • Angelos

        #4
        Re: CONTinued: PHP + SENDMAIL = mail()

        > Are you sure it's a PHP.INI issue, or something else? For instance - Does[color=blue]
        > the domain localhost.local domain actually exist? Is this server local to
        > you or on a webserver someplace? Do you have an MTA running on this host?
        >[/color]
        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.local domain 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=submissio n, 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')d nl
        dnl DAEMON_OPTIONS( `Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
        FEATURE(`accept _unresolvable_d omains')dnl
        dnl FEATURE(`relay_ based_on_MX')dn l
        LOCAL_DOMAIN(`l ocalhost.locald omain')dnl
        dnl MASQUERADE_AS(` mydomain.com')d nl
        dnl FEATURE(masquer ade_envelope)dn l
        dnl FEATURE(masquer ade_entire_doma in)dnl
        dnl MASQUERADE_DOMA IN(localhost)dn l
        dnl MASQUERADE_DOMA IN(localhost.lo caldomain)dnl
        dnl MASQUERADE_DOMA IN(mydomainalia s.com)dnl
        dnl MASQUERADE_DOMA IN(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 ?


        Comment

        • Jerry Stuckle

          #5
          Re: CONTinued: PHP + SENDMAIL = mail()

          Angelos wrote:[color=blue][color=green]
          >>Are you sure it's a PHP.INI issue, or something else? For instance - Does
          >>the domain localhost.local domain actually exist? Is this server local to
          >>you or on a webserver someplace? Do you have an MTA running on this host?
          >>[/color]
          >
          > 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.local domain 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=submissio n, 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')d nl
          > dnl DAEMON_OPTIONS( `Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')
          > FEATURE(`accept _unresolvable_d omains')dnl
          > dnl FEATURE(`relay_ based_on_MX')dn l
          > LOCAL_DOMAIN(`l ocalhost.locald omain')dnl
          > dnl MASQUERADE_AS(` mydomain.com')d nl
          > dnl FEATURE(masquer ade_envelope)dn l
          > dnl FEATURE(masquer ade_entire_doma in)dnl
          > dnl MASQUERADE_DOMA IN(localhost)dn l
          > dnl MASQUERADE_DOMA IN(localhost.lo caldomain)dnl
          > dnl MASQUERADE_DOMA IN(mydomainalia s.com)dnl
          > dnl MASQUERADE_DOMA IN(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 ?
          >
          >[/color]

          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.local domain 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.
          jstucklex@attgl obal.net
          =============== ===

          Comment

          Working...