Z-Hub / Z-Push

Home of Z-Push
https://z-push.org
GNU Affero General Public License v3.0
97 stars 47 forks source link

add remote device IP as Received header in outbound email #61

Closed si458 closed 4 months ago

si458 commented 6 months ago

Is your feature request related to a problem? Please describe. if for example a device gets hacked and the attacker uses activesync to send out emails, the only headers you see in an email say Received: from localhost ([10.0.0.123]) by myserver.com with MailEnable ESMTPA; Wed, 8 May 2024 14:49:40 +0100 the IP address listed is the IP address of your z-push server and not who actually sent the email in the first place! so if you had say 10 devices connected to 1 email account and 5 devices on another email account, who sent the email?

Describe the solution you'd like it would be nice to add an extra header Received: with the remote devices IP address when zpush received the SendMail command, that way when you check the email headers, you can see which device sent the email to your zpush before it sends the email to your smtp server

Describe alternatives you've considered the isnt anything currently, apart from having to manually check the timestamps of the Received and then hopefully match them with z-push logs to see what IP/user send the email in the first place

Additional context Add any other context or screenshots about the feature request here.

matidau commented 6 months ago

As far as I know Exchange doesn't offer this, and it could be considered sensitive information to turn on by default.

Would need to put this behind a config flag to turn on.

si458 commented 6 months ago

@matidau that would be perfectly fine by me! Off by default

matidau commented 5 months ago

@si458 I've had a bit more of a look, to my eyes this looks to be Backend dependant, are you using the Imap backend?

si458 commented 5 months ago

@matidau yes I'm using imap as my backend 😀