That's the first time I'll configure a mail server. I explain you the complete picture. Currently, my company company.com has an old-win-2008-server-with-no-way-to-know-its-current-configuration-because-everything-is-pure-chaos, and we are migrating all of ours domains (about 40 little sites) to a new strato server with Ubuntu 12.04, to make things right.
About Linux administration, apache, permission and so on I've no problems. My lack of understanding is related to mail servers. I've learn a lot these days but I've some dubts about local delivery.
Specifically, I want to properly set the postfix parameters myorigin
, myhostname
, mydomain
and mydestination
, together with /etc/mailname
.
My default hostname is xxxx.stratoserver.net (the default hostname strato gives to us), but of course, our "standard domain" is company.com, and in the same server (we have only one), we will configure a bind9 server for our 40 sites, together with apache, postfix, dovecot, etc, etc, for these 40 sites.
Reading tutorials I see myorigin
is always set to something like mail.company.com (manually set or delegated to /etc/mailname). The first thing is, why mail.company.com and not just company.com? If a local message is generated for any of the process of the system, I want to send that email to whatever@company.com
and not to whatever@mail.company.com
.
If I change "hostname" to something related to company.com and not xxxx.stratoserver.net, there's no conflicts between both hostnames?
Where is local mails delivered to? Is that account accesible from outside? I mean, can I get local email by means of POP3/IMAP?, or it isn't a recommended practice for any reason? What will it happen if I change everything related to local mail to @localhost?
I know I make too much questions and questions have to be concrete in the stackexchange network, but this package of doubts can be resumed to "I would like to understand the whole picture of local mail/hostname/mailname", or at least, from the point of view of postfix/dovecot point of view.
NOTE: Although the @clement's answer was enough for me (nearly enough indeed, :P), this reading was very useful to finally understand the "whole picture": http://www.postfix.org/VIRTUAL_README.html