mail-in-a-box / mailinabox

Mail-in-a-Box helps individuals take back control of their email by defining a one-click, easy-to-deploy SMTP+everything else server: a mail server in a box.
https://mailinabox.email/
Creative Commons Zero v1.0 Universal
14.02k stars 1.44k forks source link

Can I create several separate email addresses with different domains on one installation? #1898

Open esportleague opened 3 years ago

esportleague commented 3 years ago

I can't read this in the manual if I understand the operation well (and the problem is with reverse dns to quickly check) . Can I have 2 separate mail-boxes within one mail-box installation? I mean, one mail-box for adress/aliases e.g. jhon@domain.com , jhon2@domain.com and another mail-box for e.g. security@anothersuperdomain.com, partnership@anothersuperdomain.com.

hija commented 3 years ago

If I understood you correctly: Yes.

jvolkenant commented 3 years ago

yes, you can multiple domains running from one mailinabox machine. I have 3 domains running from one box myself.

esportleague commented 3 years ago

But if someone sends a message to address1 (jhon@jhon55.com), will I automatically reply from this address(jhon@jhon55.com)? And if someone sends a message on address2 (jhon@jhon987654321.com), will my second address exist as a sender ((jhon@jhon987654321.com)) when replying to this email?

If it is possible, how to do it ?

jvolkenant commented 3 years ago

As long as you have 2 email accounts yes. If you have an alias that sends jhon@example.com -> jhon@anotherexample.com, you will only be able to send as jhon@anotherexample.com when using jhon@anotherexample.com

esportleague commented 3 years ago

Do I understand correctly that within one machine I can have for example 4 domains which are equal to 4 separate mail accounts? Is the reverse dns configuration necessary if the cloud/hosting provider does not provide it?

hija commented 3 years ago

You can have as many separate email accounts as you want. There is no limit. You can have 1 per domain, 2 per domain etc. rDNS is one factor which will be used by email receivers to validate your mail and deciding whether it's spam or not. Who is your hosting provider?

lecbe commented 3 years ago

I wanted to try it on AWS - I have currently released limits for SES. But I don't know if I need to write for rDNS every time for each new ec2/lightsail instance?

hija commented 3 years ago

I wanted to try it on AWS - I have currently released limits for SES. But I don't know if I need to write for rDNS every time for each new ec2/lightsail instance?

Are you sure MIAB works on AWS? As far as I know, Amazon blocks the mail port (25), so sending mails would not be possible.

test2a commented 3 years ago

Hi.. im new here so I wanted to know if someone has tried to use Oracle always free cloud to host small server? Aws doesn't allow email by default, maybe Oracle does? It is pretty generous in the specs for lifetime unlimited though

alento-group commented 3 years ago

As long as you have 2 email accounts yes. If you have an alias that sends jhon@example.com -> jhon@anotherexample.com, you will only be able to send as jhon@anotherexample.com when using jhon@anotherexample.com

Uhmm ... Roundcube identities? Seem to work fine for me. @jvolkenant

alento-group commented 3 years ago

Do I understand correctly that within one machine I can have for example 4 domains which are equal to 4 separate mail accounts? Is the reverse dns configuration necessary if the cloud/hosting provider does not provide it?

You can have 4 domains with 4 or even 40 separate email accounts.

rDNS is an absolute must ... if your provider does not allow it to be set, RUN away. @esportleague

esportleague commented 3 years ago

@alento-group Are there any tools to check e.g. that no one else has access to the mailbox but me?

alento-group commented 3 years ago

@alento-group Are there any tools to check e.g. that no one else has access to the mailbox but me?

Yes. it would be called a password. @esportleague

alento-group commented 3 years ago

I meant some kind of analytical tools, access to logs, etc.

So on the server level then? No, not really. However you could install logwatch and read the resulting daily reports.

lavenetz commented 3 years ago

Hi, having two independent MiaB installations with one TLD each (i.e. example1.com, and example2.com). Both, have DNSSEC activated, and are running almost perfectly. But I would like (better: I need) to consolidate both in only one MiaB installation, with two domains (i.e. example1.com, and example2.com) in action with the same email addresses as before the consolidation. How can I achieve that? Do I have (A) to configure one of the MiaB installation, and close or purge the second one MiaB installation, or (B) is it necessary to build a new instance of MiaB with the two TLDs? I would prefer (A), but how do I make the configuration that is adding a second TLD to the existing one?

alento-group commented 3 years ago

Hi @lavenetz

This would more appropriately be asked on the Mail-in-a-Box Discourse Forum, but since you hijacked an unrelated thread here I will answer here.

You can copy the email files from one instance to the other with rsync and then you can edit the sqlite database to combine the two databases in one for user authentication and email, alias files. If you have any custom DNS configs on the box that you are migrating from, you will need to enter them manually on the receiving box. Then you will need to update nameservers accordingly.

I just did this for a client last week who had an old install on a Ubuntu 14 box to deal with as well. It went smoothly. How many users / gb of data do you have to deal with?

lavenetz commented 3 years ago

Hi @alento-group , I'm very encouraged to follow your advise. I'm looking forward to

copy the email files from one instance to the other with rsync and then you can edit the sqlite database to combine the two databases in one for user authentication and email, alias files

Do you have some more info to achieve this task, such as (A) where are the email files, (B) using rsync over ssh while enabling password login during transfer, (C) moving part of one sqlite database to the other for user authentication and, (D) email, alias files. The MiaB instance to move has only about 5 accounts, and only a few megabytes of content.

If it is not possible to give some more info within the framework of this chat, there's nothing else for it but to rebuild the main MiaB instance and adding the the second one, which, I hope, is somewhere documented in the documentation area.

Thanks a lot in advance!

alento-group commented 3 years ago

@lavenetz

What you are asking is the equivalent of asking a auto mechanic how to replace your timing belt on your car. Sure, you can study websites and read books to learn how the process works, but you won't have that experience to get the job done efficiently.

And no, what you are wanting to do is not documented in the documentation area as it is something that is so rarely done.

I am available, for a fee, to provide this service for you. You may contact me on the MiaB Slack channel or in PM on the MiaB Discourse forum.

styveaton commented 1 year ago

hello guy how can add the second domain to my MIb installation

hija commented 1 year ago

hello guy how can add the second domain to my MIb installation

https://mailinabox.email/maintenance.html#multiple-domains