'Nobody' disallowed from sending email with PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • francescomoi@usa.com

    'Nobody' disallowed from sending email with PHP

    Hi.

    My host decided to disallow mails from 'nobody' ('nobody' is the user
    of PHP+Apache) due to spam problems.

    I use the PHP mail function to send out a confirmation email for new
    users, and it doesn't work. If I access shell with my user+passwd, I
    can execute PHP
    scripts ok and emails are delivered.

    Any similar problem? Thx.

  • Michael Vilain

    #2
    Re: 'Nobody' disallowed from sending email with PHP

    In article <1126740968.562 979.166890@g14g 2000cwa.googleg roups.com>,
    francescomoi@us a.com wrote:
    [color=blue]
    > Hi.
    >
    > My host decided to disallow mails from 'nobody' ('nobody' is the user
    > of PHP+Apache) due to spam problems.
    >
    > I use the PHP mail function to send out a confirmation email for new
    > users, and it doesn't work. If I access shell with my user+passwd, I
    > can execute PHP
    > scripts ok and emails are delivered.
    >
    > Any similar problem? Thx.[/color]

    Switch to perl and call it via CGI. The mail functions you can get from
    CPAN are more robust and you have more control. If you run the script
    using CGIwrap (google for it), you can run as yourself on the ISP's
    shared server. Of course, if your ISP won't setup CGIwrap for you, I'd
    look for another ISP...

    --
    DeeDee, don't press that button! DeeDee! NO! Dee...



    Comment

    • Jason  Garber

      #3
      Re: 'Nobody' disallowed from sending email with PHP

      Proposed solution:

      Create a MySQL table to queue the emails. Then write a PHP script that
      will check the queue, and send any emails in it (and then delete them).

      Add a line to your crontab to call this script every minute, and you
      should be set.

      Comment

      • Smitro

        #4
        Re: 'Nobody' disallowed from sending email with PHP

        Can't you just change the from address and make it your own?

        It's part of the mail() function.

        Comment

        • Gary L. Burnore

          #5
          Re: 'Nobody' disallowed from sending email with PHP

          On Wed, 14 Sep 2005 16:48:20 -0700, Michael Vilain
          <vilain@spamcop .net> wrote:
          [color=blue]
          >In article <1126740968.562 979.166890@g14g 2000cwa.googleg roups.com>,
          > francescomoi@us a.com wrote:
          >[color=green]
          >> Hi.
          >>
          >> My host decided to disallow mails from 'nobody' ('nobody' is the user
          >> of PHP+Apache) due to spam problems.
          >>
          >> I use the PHP mail function to send out a confirmation email for new
          >> users, and it doesn't work. If I access shell with my user+passwd, I
          >> can execute PHP
          >> scripts ok and emails are delivered.
          >>
          >> Any similar problem? Thx.[/color]
          >
          >Switch to perl and call it via CGI.[/color]

          Fortunately, perl wouldn't over-ride the user and group so if it
          doesn't work for php it won't work for perl.
          --
          gburnore@databa six dot com
          ---------------------------------------------------------------------------
          How you look depends on where you go.
          ---------------------------------------------------------------------------
          Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
          | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
          DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
          | ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
          Black Helicopter Repair Svcs Division | Official Proof of Purchase
          =============== =============== =============== =============== ===============
          Want one? GET one! http://signup.databasix.com
          =============== =============== =============== =============== ===============

          Comment

          • Michael Vilain

            #6
            Re: 'Nobody' disallowed from sending email with PHP

            In article <dgae7f$p3f$1@p ookiehead.datab asix.com>,
            Gary L. Burnore <gburnore@datab asix.com> wrote:
            [color=blue]
            > On Wed, 14 Sep 2005 16:48:20 -0700, Michael Vilain
            > <vilain@spamcop .net> wrote:
            >[color=green]
            > >In article <1126740968.562 979.166890@g14g 2000cwa.googleg roups.com>,
            > > francescomoi@us a.com wrote:
            > >[color=darkred]
            > >> Hi.
            > >>
            > >> My host decided to disallow mails from 'nobody' ('nobody' is the user
            > >> of PHP+Apache) due to spam problems.
            > >>
            > >> I use the PHP mail function to send out a confirmation email for new
            > >> users, and it doesn't work. If I access shell with my user+passwd, I
            > >> can execute PHP
            > >> scripts ok and emails are delivered.
            > >>
            > >> Any similar problem? Thx.[/color]
            > >
            > >Switch to perl and call it via CGI.[/color]
            >
            > Fortunately, perl wouldn't over-ride the user and group so if it
            > doesn't work for php it won't work for perl.[/color]

            Actually, if you read the _rest_ of my post where I recommended CGIwrap,
            it does. Check out



            for more details. Now that wasn't hard, was it?

            --
            DeeDee, don't press that button! DeeDee! NO! Dee...



            Comment

            • Gary L. Burnore

              #7
              Re: 'Nobody' disallowed from sending email with PHP

              On Thu, 15 Sep 2005 00:54:31 -0700, Michael Vilain
              <vilain@spamcop .net> wrote:
              [color=blue]
              >In article <dgae7f$p3f$1@p ookiehead.datab asix.com>,
              > Gary L. Burnore <gburnore@datab asix.com> wrote:
              >[color=green]
              >> On Wed, 14 Sep 2005 16:48:20 -0700, Michael Vilain
              >> <vilain@spamcop .net> wrote:
              >>[color=darkred]
              >> >In article <1126740968.562 979.166890@g14g 2000cwa.googleg roups.com>,
              >> > francescomoi@us a.com wrote:
              >> >
              >> >> Hi.
              >> >>
              >> >> My host decided to disallow mails from 'nobody' ('nobody' is the user
              >> >> of PHP+Apache) due to spam problems.
              >> >>
              >> >> I use the PHP mail function to send out a confirmation email for new
              >> >> users, and it doesn't work. If I access shell with my user+passwd, I
              >> >> can execute PHP
              >> >> scripts ok and emails are delivered.
              >> >>
              >> >> Any similar problem? Thx.
              >> >
              >> >Switch to perl and call it via CGI.[/color]
              >>
              >> Fortunately, perl wouldn't over-ride the user and group so if it
              >> doesn't work for php it won't work for perl.[/color]
              >
              >Actually, if you read the _rest_ of my post where I recommended CGIwrap,
              >it does.[/color]

              He's not talking about permissions. He's talking about the ID.
              Someone else gave the correct answer: Use a different ID.
              [color=blue]
              > Check out
              >
              >http://cgiwrap.sourceforge.net/
              >
              >for more details. Now that wasn't hard, was it?[/color]

              Perhaps you misread his post? Naw, that couldn't be, could it?


              --
              gburnore@databa six dot com
              ---------------------------------------------------------------------------
              How you look depends on where you go.
              ---------------------------------------------------------------------------
              Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³ÝÛº ݳ޳ºÝ³Ý³Þ³ºÝ³Ý ÝÛ³
              | ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
              Black Helicopter Repair Svcs Division | Official Proof of Purchase
              =============== =============== =============== =============== ===============
              Want one? GET one! http://signup.databasix.com
              =============== =============== =============== =============== ===============

              Comment

              Working...