Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending emails without revealing server's ip address

To reduce attacks, we put our servers behind cloudflare's cloud service.

But, our app sends emails (via sendmail and smtp) to users (password reset etc), and those email headers contain the real backend ip addresses. Is there anyway to hide these ip addresses in emails, such as

  1. setup a separate server for smtp which can strip sender ip info?
  2. any existing service available?
  3. any other thoughts?

thanks!

like image 414
QWJ QWJ Avatar asked Dec 11 '13 06:12

QWJ QWJ


People also ask

Can I hide IP address when sending an email?

Can I hide my IP address when sending an email? You can use a VPN or TOR to hide your originating IP address when sending an email to have it display the proxy server's IP instead of your actual home IP address. This won't reveal your IP to the public when sending emails.

How can I send an email without it being traced?

Sending emails through a VPN server is a sure-fire way to anonymity and many VPN providers will have email features that you can benefit from. Instead of sending your emails using your own IP address, the VPN will assign you a different IP address thus meaning that the sender of the email cannot truly be identified.

Can I hide my IP address on Gmail?

Gmail doesn't share IP address and location Gmail doesn't let your information out so easily. In fact, when you send an email, the IP address that you get from the mail headers is not your own, but of a Google server. So, there is nothing to worry about in that aspect.

How do I remove an IP address from an email header?

The IP information is added by the mail server. There is nothing you can do to stop this at the client end when sending your email if you are using a reputable mail server.


2 Answers

The ip address is not in any header, it is the base of your communication. smtp it's over ip (wiki). so you can't "strip" it out.

The solution according to cloudflare is:

Don't host mail or other services on the same server as your web server If your mail server hosted by the same IP as your http server, an attacker could find the IP address from an outgoing email.

Good luck!

like image 180
MeNa Avatar answered Sep 29 '22 09:09

MeNa


Any time your server connects to the outside world via SMTP then the IP will be logged in the headers (it's part of the protocol, and it's how we fight spam).

So the only ways to avoid this (that I can think of) are:

  • Use a third-party mail service such as Postmark (https://postmarkapp.com/)
  • Connect to another server and send mail through that (perhaps over a VPN, using a message queue like RabbitMQ, or some other API)
like image 29
Simon East Avatar answered Sep 29 '22 07:09

Simon East