Re: Bounce composition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Richard Lynch wrote:

>On Wed, May 2, 2007 2:57 pm, Oliver Block wrote:
>  
>
>>Am Mittwoch, 2. Mai 2007 20:11 schrieb Richard Lynch:
>>    
>>
>>>Does anybody have or know of a good simple PHP script that can take
>>>an
>>>email as an input, and compose a "Bounce" email as output?
>>>
>>>I need something that does just that, without a huge framework or a
>>>zillion other "features"...
>>>      
>>>
>>please try this:
>>
>>$env['from'] = 'ceo@xxxxxxxxx';
>>$env['to'] = 'ceo@xxxxxxxxxxxxx';
>>$env['remail'] = imap_fetchheader($stream, $msgno);
>>    
>>
>
>I don't think that's what a "bounce" looks like, is it?...
>
>I guess I was hoping somebody had worked out the minutiae of composing
>a bounce message in PHP from the input headers.
>
>I don't need help with the IMAP part of it, just the RFCxxxx bit about
>making up a bounce message, without actually having to spend hours
>poring over RFCs, which is not my idea of a Good Time... :-)
>
>Or maybe I'm making a mountain out of a molehill, and that IS what a
>bounced email looks like...
>
>  
>
Hey Richard,

DJB's bounce format is pretty popular:
http://cr.yp.to/proto/qsbmf.txt

Best case would be to give a 400 for temp failure (plz try later) or a
500 for perm error right at the mail server.  Not sure if you can get
your logic in up the stream though before it gets to you.  If you can
you never have to deal with bounce messages and the entire queuing
process that goes along with it, mail server maintenance, etc..

Bounce to the enveloper sender, not the "From" header.  I also believe
bounces are supposed to have an envelope sender of "<>" to avoid bounce
loops... not sure on that though.

Cheers
Travis Doherty

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux