Proper use of user@mail.mydomain.com vs user@mydomain.com in virtual domain creation

Ive named my system myserver.myvirtualrocks.com and created mail.myvirtualrocks.com the first virtual domain. The system only recongizes email in the form user@mail.myvirtualrocks.com. This is not the intended use as I want to have the mail be user@myvirtualrocks.com. So, when I add myvirtualrocks.com as a virtual domain it does allow user@myvirtualrocks.com but the /etc/passwd entries have stripped off the .com from the second domain. My question is what is the proper virtual domain name to reach my goal and is the /etc/passwd entry correct?

mail.myvirtualrocks.com:x:514:507::/home/mail.myvirtualrocks.com:/bin/sh

vruser:x:515:507::/home/mail.myvirtualrocks.com/homes/vruser:/dev/null

myvirtualrocks:x:516:508::/home/myvirtualrocks:/bin/sh <- lacks the .com in the entry but works

vruser1:x:517:508::/home/myvirtualrocks/homes/vruser1:/dev/null <- lacks the .com in the entry but works

I experimented with myvirtualrocks.org and myvirtualrocks.net and the .xxx extension is not stripped…

myvirtualrocks.net:x:518:509::/home/myvirtualrocks.net:/bin/sh

myvirtualrocks.org:x:519:510::/home/myvirtualrocks.org:/bin/sh

I understand the /etc/passwd concept now but Im still struggling with the user@mail.myvirtualrocks.com vs user@myvirtualrocks.com concept. Can anyone please enlighten me on which virtual domain creation is better for receiving user@myvirtualrocks.com , either mail.myvirtualrocks.com or myvirtualrocks.com?

Howdy,

Hmm, I’m not entirely certain I understand what you’re asking – but either of those should work. In fact, you could create one as a Virtual Server, and the other as an alias – making them both work for the same users.

That is, if you add myvirtualrocks.com as a Virtual Server, and mail.myvirtualrocks.com as a Virtual Server alias (or vice-versa, it doesn’t matter) – any user within that Virtual Server could receive mail at either address.

Does that by chance answer your question?

-Eric