Base64 encode bounce

Some filter spam (as mailinblack.com) are sending back a base64’s encode messaqe to any campaign, waiting an action.

My problem is th fact that when i process bounce, phplist canno’t process it,
When i go to “unidentified bounce” i see the message but canno’t read it.

and Can’t read it anymore in the webmail.

DVo you know what I mean?

You would want to look at the header of returned email…

I have had luck reading the bounce mailbox with a client such as Thunderbird, and ‘view source’, and it decodes the message. Copy the unsubscribe url to a web browser, and it will unsubscribe the user.

Thanks,

But I was hoping phplist got a feature to decode directly message from interface.

I’ll try to develop something.
Because i don’t to leave filter’s message without answer.

and it’s not convenient to have to leave all bounce the message box .
then find encode’s message just to click on link.

@amsa phplist does try to handle base64 encoded bounces,see file admin/processbounces.php

switch ($transfer_encoding) {
    case 'quoted-printable':
        $decoded_body = @imap_qprint($body);
        break;
    case 'base64':
        $decoded_body = @imap_base64($body);
        break;

You might want to try debugging that to see why it is not working in your case.

Thanks a lot,

So I check
and did

	if (preg_match('/Content-Transfer-Encoding: ([\w-]+)/i', $bounce['header'], $regs)) {
		$transfer_encoding = strtolower($regs[1]);
	} elseif (preg_match('/Content-Type: multipart\/mixed;\s+boundary="([^"]+)"/im', $bounce['header'], $regs)) {

		//# @TODO, this needs more work, but probably easier to find a class that can
		//# split is all into itś parts
		//print "BOUNDARY: " . $regs[1];
		$multi_part_boundary = $regs[1];
		$parts = explode($multi_part_boundary, $bounce['data']);
		//var_dump($parts);
		if (preg_match('/Content-Transfer-Encoding: ([\w-]+)/i', $bounce['data'], $regs)) {
			//     var_dump($regs);
			$transfer_encoding = strtolower($regs[1]);
		}
	}

	switch ($transfer_encoding) {
	case 'quoted-printable':
		$bounceBody = nl2br(htmlspecialchars(imap_qprint($bounce['data'])));
		break;
	case 'base64':

		$bounceBody = imap_qprint($bounce['data']);
		$pos = strpos($bounceBody, "Content-Disposition: inline") + 31;
		$bounceBody = base64_decode(substr($bounceBody, $pos, -99)); //
		break;

	case '7bit':
	case '8bit':
	default:
		$bounceBody = nl2br(htmlspecialchars($bounce['data']));
	}
	if (!empty($_SESSION['hidebounceheader'])) {
		$bounce['header'] = '';
	}

	$bouncedetail = sprintf('
  <div class="fleft"><div class="label">' . $GLOBALS['I18N']->get('ID') . '</div><div class="content">%d</div></div>
  <div class="fleft"><div class="label">' . $GLOBALS['I18N']->get('Date') . '</div><div class="content">%s</div></div>
  <div class="fleft"><div class="label">' . $GLOBALS['I18N']->get('Status') . '</div><div class="content">%s</div></div>
  <div class="clear"></div><br />
  <div class="label">' . $GLOBALS['I18N']->get('Comment') . '</div><div class="content">%s</div><br />
  <div class="label">' . $GLOBALS['I18N']->get('Header') . '</div>' . '<div class="content">' . PageLinkAjax('bounce&hideheader=1',
		'Close', '', 'hide') . '%s</div><br />
  <div class="label">' . $GLOBALS['I18N']->get('Body') . '</div><div class="content">%s</div>', $id,
		$bounce['date'], $bounce['status'], $bounce['comment'],
		nl2br(htmlspecialchars($bounce['header'])), $bounceBody);
//   print '<tr><td colspan="2"><p class="submit"><input type="submit" name=change value="Save Changes"></p>';

	$p = new UIPanel(s('Bounce Details'), $bouncedetail);
	echo $p->display();

	// if (USE_ADVANCED_BOUNCEHANDLING) {
	$p = new UIPanel(s('New Rule') . '<a name="newrule"></a>', $newruleform);
	echo $p->display();
	// }
}

with
a change of

} elseif (0 && preg_match('/Content-Type: multipart\/mixed;\s+boundary="([^"]+)"/im', $bounce['header'], $regs)) {
    //# @TODO, this needs more work, but probably easier to find a class that can
    //# split is all into itś parts