Sure - I did this with qmail. In your .qmail file or any file that passes the
incoming mail to /dev/stdin you need to pipe it to a php script. It will look
like this:

<?

  $fp = fopen('/dev/stdin','r');
  while(!feof($fp))
  {
    $line = trim(fgets($fp,4096));
    if(ereg("^From:",$line))
    {
      // example of parsing out the From: header
    }
  }

?>

I had email addresses setup like ezmlm - 
ie [EMAIL PROTECTED] or on the other hand
[EMAIL PROTECTED] - then just parse out the
To: address and replace the = with a @ (dashes as well with something else) and
remove the email.

--Joe



On Wed, Jan 10, 2001 at 06:49:16PM -0700, Jason Beebe wrote:
> Hey Everyone,
> 
> I'm working a project for one of the company's websites. they have a subscription 
>mailing list that the user signs up their email address to receies periodical 
>emailings.
> 
> The email addresses are stored in a flat txt file. 1 email per line. I could also 
>convert it to a coma delimited txt file if it would be easier.
> 
> So, they've had problem with people who no longer want to receive emails, and one's 
>that bounce for whatever reason, generally a bad email address.
> 
> What I am trying to find out if who has some information to set up a system where we 
>will send out our emails to the subscribers with our mailing list manager. when i 
>customer respondes with a certain command in the body or subject (like unsubscribe) 
>or if the mail bounces, I'd like it to search out the email address and delete it.
> 
> Now, I know there's lists like majordomo that do something similar. But I'm looking 
>for something a little more straightforward.
> 
> I also know this may be more along the lines of shell scripting, but I thought some 
>of you ingenious people may have already done something similar or have some ideas on 
>where to start. thanks.

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to