Question: Logging EHLO Response in DB
imukai opened this issue · comments
My app connects to a bank of a couple dozen load-balanced SMTP servers. Their response to EHLO contains info about which server is handling the request.
ProtoLogger does a good job of saving that whole conversation to a file but I am interested in capturing just the EHLO response to save into a DB.
Is there an event I can hook into and obtain that response without parsing the file that Proto creates?
Thank you for maintaining this thing all these years.
There currently isn't anything that you can hook into. I wasn't anticipating anyone ever needing that.
I've been thinking this over for the past few days. I question the usefulness of having an event or some other mechanism for reporting the EHLO response seeing as how it doesn't seem to have any value outside of your specific use-case.
For now, my recommendation is to implement your own IProtocolLogger and scan for an "EHLO" command in the LogClient() method implementation and then extract the response in the following call(s) to LogServer().