postal icon indicating copy to clipboard operation
postal copied to clipboard

Want to Add X-Originating-IP in Header

Open rccess opened this issue 5 years ago • 5 comments

Hello @willpower232

I want to add X-Originating-IP in header which is server sending IP

I tried to add in client.rb with the following pattern with 4 options , none working

headers << "X-Originating-IP: #{self.ip_address}" headers << "X-Originating-IP: #{@ip_address}" headers << "X-Originating-IP: #{self.server.ip_address}" headers << "X-Originating-IP: #{server.ip_address}"

Please do advise on the same

rccess avatar Jul 26 '21 07:07 rccess

Assuming you're talking about lib/postal/fast_server/client.rb, you could try adding this to the request hash.

"HTTP_X_ORIGINATING_IP" => remote_ip

adamcooke avatar Jul 26 '21 11:07 adamcooke

i need to add in this

postal/lib/postal/message_db/message.rb

https://github.com/postalhq/postal/blob/1d22ca0f85b58b04aedde9071d9fc5ecd44af4de/lib/postal/message_db/message.rb#L409

Need to add here

Please do advise on the same

rccess avatar Jul 26 '21 11:07 rccess

I'm not sure what you want is possible because I don't think the actual sending process would be able to add a header to the message it has been asked to send.

willpower232 avatar Jul 26 '21 12:07 willpower232

image

i want to try this to track the email comes from which ip

rccess avatar Jul 26 '21 12:07 rccess

@willpower232 @catphish Would like to have an update on this !

rccess avatar Jul 26 '21 15:07 rccess