haraka / Haraka

A fast, highly extensible, and event driven SMTP server
https://haraka.github.io
MIT License
5.08k stars 661 forks source link

Logging the IP of the MX bouncing an email #552

Closed abhas closed 10 years ago

abhas commented 10 years ago

I'm trying to create a simple plugin that will log bounces separately. While I'm able to get almost all the information I need about the bounce, I am not able to get the IP of the MX that rejected the mail.

One solution that I came up with was to try writing a get_mx hook and storing the MX IP in a connection note. Then if there is a bounce, I can log this IP. Is there any other way to do it?

baudehlo commented 10 years ago

You know, right now it doesn't look like there's any other way of doing this. That's definitely a flaw.

We should add something like: "self.current_try_mx = mx;" into outbound.js around line 893. Would that help?

On Fri, Apr 11, 2014 at 2:26 AM, Abhas Abhinav notifications@github.comwrote:

I'm trying to create a simple plugin that will log bounces separately. While I'm able to get almost all the information I need about the bounce, I am not able to get the IP of the MX that rejected the mail.

One solution that I came up with was to try writing a get_mx hook and storing the MX IP in a connection note. Then if there is a bounce, I can log this IP. Is there any other way to do it?

— Reply to this email directly or view it on GitHubhttps://github.com/baudehlo/Haraka/issues/552 .