Friday, July 9, 2010

Re: Processing an Email Bounce back in CakePHP and Postfix

In case someone stuble on this issue, I've already solve this problem.

On postfix configuration (usually located at /etc/postfix/main.cf)
I've add this two line:

notify_classes = resource, software, bounce
2bounce_notice_recipient = sysadmin@example.com

On Jul 5, 9:28 pm, tristan_ph <tristanpera...@gmail.com> wrote:
> Hi,
>
> I'm trying to handle bounced message and send to a responsible System
> Administrator.
>
> I use CakePHP Email Component to send the message. On server side, I
> use postfix to transport the message.
>
> function sendAsEmail($data) {
>   $Email->sendAs = 'html';
>   $Email->from = $user['Sender']['username'] . '...@example.com';
>   $Email->return = Configure::read('App.systemAdminEmail');
>   $Email->bcc = array($data['Message']['recipient_text']);
>   $content = 'Some content';
>   $Email->send($content);
>
> }
>
> As you can see above, I set the $Email->return to sysadmin's email
> which it will send all the bounced message.
>
> On postfix configuration, I tried creating a bounce.cf template and
> set bounce_template_file.http://www.howtoforge.com/configure-custom-postfix-bounce-messages
>
> How do I get the bounced message and send it to System Administrator?
>
> I also post this question tohttp://stackoverflow.com/questions/3139559/processing-an-email-bounce...

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: