2

I have Amazon EC2 (windows) instance which hosts Tomcat & Apache James mail server.

James works fine on EC2 locally (I have created a domain and updated etc/hosts file to mimic domain. Using thunderbird client on same machine, I was able to send messages between accounts on same domain).

Now I am trying to map james to real domain. I have registered a domain with goDaddy say mycompany.com

  1. created one A record on Route 53: mailserver.mycompany.com points to EC2 instance IP
  2. created MX entry on Route 53: mailserver.mycompany.com 0(priority) mailserver.mycompany.com
  3. Pointed all Mail related DNS Zone file entries in GoDaddy to mailserver.mycompany.com

Now I am confused on while adding domain to James, what should be the host name & domain name I use?

should host name be localhost (or) mycompany.com? should James domain name be mycomapny.com (or) mailserver.mycompany.com?

Any help would be appreciated. Thanks for your time & help.

kosa
  • 23
  • 7
  • 3
    Note that many IP addresses used by EC2 instances are already blacklisted across much of the Internet. You are unlikely to be able to reliably email from an EC2. – ChrisInEdmonton Oct 07 '13 at 19:07
  • @ChrisInEdmonton: Agree. At this moment I am less concerned about it, because my application is still in POC mode. – kosa Oct 07 '13 at 19:09
  • Not using James, but I think the MX entry should be "mycompany.com 0(priority) mailserver.mycompany.com", and you should have as servernames both localhost and mycompany.com. – harrymc Oct 10 '13 at 05:49
  • @harrymc: Thanks for your comment, Should I open port 25 in both inboud/outbound rules (Amazon EC2 is very restrictive)? and How can I validate my mail server is ready for incoming messages from outside world? – kosa Oct 10 '13 at 20:32
  • Port 25 is required for send and receive. For validation [this link](http://wiki.apache.org/james/JamesQuickstart) might be useful. – harrymc Oct 10 '13 at 22:09
  • Are my comments above worthwhile as an answer? – harrymc Oct 11 '13 at 05:22
  • @harrymc: For validation I have used few public websites etc., One change I did as per your suggestion is, MX mapping to mycomapny.com instead of mailserver.mycompany.com. your comments worth answer, I am not sure because I have done lot of trail/errors to get it working. If you can enhance your comment and make it as answer for James 3, I would be happy to accept it, otherwise I will write an answer with my experience. – kosa Oct 11 '13 at 14:14
  • Since you have used parts of my comments, I have collected them below as a partial answer. You should collect your findings in an answer of your own, or at least list the sources that you found useful. – harrymc Oct 11 '13 at 16:53
  • @harrymc: Yes make sense. (or) I will improve your answer and accept it with bounty (most probably on weekend). – kosa Oct 11 '13 at 17:04
  • @harrymc: Gave bounty and accepted answer. Will edit your answer when I get few minutes. – kosa Oct 17 '13 at 13:59

1 Answers1

0

The MX entry should be "mycompany.com 0(priority) mailserver.mycompany.com", and you should have as servernames both localhost and mycompany.com.

Port 25 is required to be opened in the firewall for send and receive.

For validation of your installation, this link might be useful :
James Wiki JamesQuickstart.

harrymc
  • 455,459
  • 31
  • 526
  • 924