Charles Marcus a écrit : > Hello, > > I've been tasked with adding a few more domains for handling mail. This > server has been running flawlessly for about 5 years (and survived many > updates), but this will be my first implementation of virtual hosting, > so before I actually start changing config settings, I thought I'd ask > for clarification. I've read the virtual config docs, and I think I > understand most everything (hopefully I won't find out otherwise) except... > > Currently, I simply have our one domain referenced in mydomain, and have > the hostname set accordingly (see postconf -n below), and am not using > virtual_mailbox_domains. >
currently, you have domains in mydestination even if you didn't specify that. you can test with $ postconf mydestination mydestination = $myhostname, localhost.$mydomain, localhost This means that the listed domains are "local" domains (they are delivered to unix accounts). > Does simply adding the additional domain example2.com in > virtual_mailbox_domains allow me to use the additional hostname > smtp.example2.com (in client configurations) for sending mail, assuming > example2.com is listed in virtual_mailbox_domains and have appropriate > DNS & MX records for the additional domain(s) pointed to the appropriate IP? > > receiving mail has nothing to do with sending mail. Repeat this seven times, get a drink, then repeat again. until you feel convinced. if you feel your brain is playing games with this, start again. if it's too hard, repeat once and drink seven times. when you send mail, the hostname is used as the HELO (EHLO) argument. This identifies the _server_ that sends mail. It has nothing to do with the domains you host. if you want to serve "virtual" domains, add them to virtual_mailbox_domains, and specify the users mailboxes in virtual_mailbox_maps. you can set the virtual transport to dovecot (which is what you use if my my two neurons are still working), in which case the result in virtual_mailbox_maps doesn't matter, but you'l have to configure dovecot to know that. Note that virtual mailbox domains have nothing to do with virtual alias domains (the latter are "aliases", so their users must be mapped to users in other domains). and while I am in, virtual alias maps is yet another concept. it applies to all mail. In short: "virtual" has different meanings.