Reply to Re: Dealing with Bounced Email

Your name:

Reply:


Posted by Gordon Burditt on 07/23/05 01:09

>> >"mail($To,$Subject,$Msg,$header­s, '-f'.$returnaddress);
>> >
>> >where $returnaddress = your email. "
>>
>> this would not help as the action is not automated... try setting up
>> an account that will be monitored by a script:
>> On receving mail, remove sender's adress from database, also search
>> body for e-mail adresses and remove them.
>
>Okay, but, how does one set up a PHP script to monitor bounced email
>coming back to the account I've already set up? That's the part I have
>no idea how to do.
>

There are several approaches:

(1) If you have a system which supports it (e.g. Linux or UNIX using
sendmail, smail, Exim, etc.), you can forward mail received by a
user into a pipe by specifying this in a .forward file in the user's
home directory. The program (which could be written in just about
anything: standalone PHP, Perl, sh, C, or whatever) will be invoked
with the email text (including the headers) on stdin. Details of
what user the program will run as or what the current working
directory will be may vary. Whether or not the admin has turned
this off or not may vary also. It is up to the program to go
through the headers and body to figure out what to do with it.

(2) You could set up a cron job which periodically invokes a program
which polls a mailbox using POP3, IMAP, or just opens the mailbox
file directly. For example, fetchmail can be used to transfer the
mailbox contents to a local file. Then a program could look at
what came in. The host with the program doesn't have to be the same
host as the one with the mailbox, in the case of POP3 or IMAP polling.

Gordon L. Burditt

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация