Skip to main content

Header mail with ip of mail server

Comments

4 comments

  • cPRex Jurassic Moderator
    Hey there! Just to make sure I'm following along, mail gets sent from the application on the webserver. That application connects to the mail server over SMTP, and then the message is sent from the mailserver. Is that correct? If so, this seems like normal behavior. For example, when I send a message from a mail client I still get the reverse DNS of my local IP in the mail headers, which we can see here, even though that ultimately isn't the machine that sent the message: 2020-11-09 09:42:18 1kc8N8-004doY-8e <= cptest@domain.com H=1-2-3-4.lightspeed.lnngmi.sbcglobal.net ([192.168.0.1]) [1.2.3.4]:58636 P=esmtpsa X=TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no A=dovecot_plain:cptest@domain.com S=744 id=6f2efff1-4b44-214f-7e49-a795fc3b1982@domain.com T="test1" for rex.hatt@cpanel.net
    0
  • wonder_wonder
    Hey there! Just to make sure I'm following along, mail gets sent from the application on the webserver. That application connects to the mail server over SMTP, and then the message is sent from the mailserver. Is that correct?

    Its correct. In webserver, are a website, this website send mail to users (notifications...) with smtp, this smtp is configured to connect with other server (mail server) and then, this, send mail. And webserver are configured for remote mail, and mailserver like local mail. In the header appears the hostname of mailserver, ok, but the ip of the webserver. [quote]If so, this seems like normal behavior. For example, when I send a message from a mail client I still get the reverse DNS of my local IP in the mail headers, which we can see here, even though that ultimately isn't the machine that sent the message: 2020-11-09 09:42:18 1kc8N8-004doY-8e <= cptest@domain.com H=1-2-3-4.lightspeed.lnngmi.sbcglobal.net ([192.168.0.1]) [1.2.3.4]:58636 P=esmtpsa X=TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128 CV=no A=dovecot_plain:cptest@domain.com S=744 id=6f2efff1-4b44-214f-7e49-a795fc3b1982@domain.com T="test1" for rex.hatt@cpanel.net

    That's right, so I'm afraid the only solution is to go to Amazon SES (for example). The idea was to separate the two servers so that the exposed IP would be the one for the mail and in case of attack, they would not knock down the webserver. Thanks and regards!
    0
  • cPRex Jurassic Moderator
    Thanks for confirming all that. It sounds like what you're seeing is just "working as intended" for the mail system. You could think about it this way too - what if you could fully hide the origin IP. How much more spam would that produce?
    0
  • wonder_wonder
    Yes, I understand it, the reason for the "hiding" of the ip, although I really do not want to hide it, I want the ip of the mail server to appear, is to avoid what happened to me 10 days ago, a ddos attack and the service down. If they attack the IP of the mail server, "I don't care", the web is maintained and the IP of the webserver, being behind cloudflare, is not so "public", the one of the mail server is public. In this case, I think all I'm left with is Amazon SES. Thanks for your attention and help !!!
    0

Please sign in to leave a comment.