1

I installed JAMES and added an user user@localhost.com

I can send mail from user@localhost to user@gmail.com

how can i send a mail from user@gmail.com to user@localhost

i tried it but resulted in an error user@localhost is not recognized

i haven't set any MX records I dont even know how to do it and right now i just used user@localhost with out any mapping ..

  • This question needs more detail. have you setup MX records for localhost.com? Are you using the litteral text LOCALHOST when tring to send a message from Gmail? Please edit your question and provide more deatils. you will get much better repsonses. – Richard West Mar 02 '11 at 14:48

1 Answers1

6

You seem to be lacking some basic knowledge about how e-mail works; installing and configuring a mail server program on your server is not enough, the outside world needs to know how to address and reach it.

In order for your server to receive mail from the Internet, you will need at least a public DNS domain name (like "yourdomain.com"), a public static IP address for your server and a MX record in the DNS zone of your domain stating that the computer at that IP address is the mail server for the domain. Also, your e-mail addresses will be in the format "user@yourdomain.com", so your mail server program will need to be configured accordingly.

"Localhost" is only a private dummy name that refers to the host you are on; you can't use it to identify your server from anywhere else than on the server itself.

Massimo
  • 68,714
  • 56
  • 196
  • 319
  • Can i configure MX records to my localhost ? – Praneel PIDIKITI Mar 02 '11 at 14:56
  • 1
    Yes, but only if you have a published domain name, with a public DNS record that has a complete MX record. MX Records are used by mailservers to know what serer to contact to deliver the email message to. At this point you would not really call your system LOCALHOST. Instead you would refer to this system as whateveryourdomainnameis.com. Every server considers itself LOCALHOST. So when you are asking Gmail to deliver a message to LOCALHOST you are telling it to deliver this message to itself. That does not make sense. – Richard West Mar 02 '11 at 14:59