Any tips/advice to configure additional domains in nethserver/mail?

Greeting!

I need to migrate the functions of sending invoices from a very old mail server that has worked very well; but it is on a computer that is not server grade and already has many years in function, I fear it will fail me at any time.

At this moment one of my Nethserver (mail server) has everything configured and working (dkim, spf), and let’s encrypt certificates working with the help of @Andy_Wismer :trophy:

With the previous introduction, thanks in advance for the help & guide that can give me, to:

  • Add a new domain to send mails (1 or 2 addresses) outside (invoices).
  • Prevent those address from receiving mails or replies from the outside. It seems that if I make it Internal it can’t send mails externally (Or did I do something wrong?).
  • Make periodical deletion of the mails sent from this new mail to avoid consuming space on the hard disk; leaving the last 3 or 6 months tops from these accounts.

I’ve seen that Nethserver/mail allows multiple domains at once, but I haven’t found a guide to do it without shooting myself in the foot.

I have some domains available, so I test with some of them. My current NethServer mail server is working very well, and of course; first I would make a backup to avoid any problem in the configuration.

When I tried it in the early stages of setting up the server; I didn’t have it in production yet and I noticed weird things in the DKIM. I’m concerned about breaking something.

:thinking: I think the simplest option would be to create another vm… but I would like to even have the above in case of emergency. And due to certain urgent tasks I don’t get time to create the vm, although I suspect it will be the most appropriate.

Best regards.
Enrique

Saludos @MrE

Multidomains is possible wih NethServer, at least for mail…

Add in additional maildomains in NethServers Cockpit under Email → Domains
For all additional Domains, you’ll need external DNS entries (mail.domain2.tld) for the maildomain and Mailserver, but also MX entries and needewd stuff for DKIM etc. Use your primary maildomain as example.
These additional maildomains will generally allow in and outgoing mail, as for all Maildomains. To stop incoming, you can redirect all the incoming to a noreply kind of account, set a mail rule to reply accordingly.
As all “incomng” for these “special” accounts are directed to a single mail account (Mailbox), it should be easy to set up a rule to clean this folder up…

Create the users for these domains as following:

User1@maildomain2.tld → user1_domain2-shortform
(the full account for mail being user1_domain2-shortform@maildomain2.tld)

Use the Address option to set the correct external addresses.

I have described this in detail before (In reply to user capote), but can’t remember / find the original post…

Hope this helps

My 2 cents
Andy

1 Like

Thanks Andy,
I’ll review your instructions later; I’m on my way home.
:coffee:

1 Like

I took the liberty to catch this on a Wiki page. Please add/revise as you see fit. Thanks!

1 Like

@LayLow

Thanks, will phrase things a bit better…

My 2 cents
Andy

1 Like