0

I want to send an email to a external server using the public IP address of the email server.

e.g. Send email to [email protected] to the following IP 200.2.4.1

(If is not possible, can I send an email to user@[200.2.4.1]?)

4
  • Have you tried email to [email protected] without any brackets or braces?
    – svetlana
    May 18, 2021 at 4:48
  • @svetlana The correct syntax would be with the square brackets, but this addressing form is no longer supported. Any sane email client will do an MX lookup; the OP will probably want to look into hacking the DNS response to direct the client to the desired destination, rather than hope for an email client with this very specialized and basically broken functionality.
    – tripleee
    Jan 13, 2022 at 6:12
  • @tripleee Just curious, when you wrote "no longer supported", to what were you referring? Jan 25, 2022 at 8:32
  • Good question; RFC5322 still contains the concept of domain literals, but my impression is that this is no longer generally supported by MTAs. Perhaps I should just delete that comment until I can research it properly.
    – tripleee
    Jan 25, 2022 at 8:42

1 Answer 1

1

You can send email direct to an IP address... maybe. There is nothing needed client side, success depends on how the server is configured.

For example on my mail server, the domain in the destination (an IP in your use case) is checked against the contents of a mysql db table, and if it is in that table the mail is accepted and added to the queue for delivery processing.

A very basic set up though for a mail server would NOT run such a check and instead simply accept the message and apply its delivery rules.

So definitely maybe.

As to doing something like modifying your hosts file to give a name to your IP address or to point a "real" name to some other IP address, while that works with web browsers, game consoles, etc. it doesn't work with email. The sending mail server uses DNS to look up a MX Record for the destination domain/IP, not your local computer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.