Server migration: too keep or not to keep user@domain.tld

Hello all.

I am fixing to migrate my domains from the old server (Centos 4.9 that is up since February 2005) to the newer one, Centos 6.5+Virtualmin pro.

So, because in the past I didn’t liked the panels and liked to do it myself, here’s my dilemma.

Right now my mail server is: Postfix+Cyrus+Amavis+Clamav+MySQL.
Obviously I want to migrate to Postfix+Dovecot+Amavis+…

So I am using mysql to store all my users, passwords and other information in the database. Actually I am using postfixadmin (see sourceforge) to manage accounts and offer an interface to some clients to be able to create mailboxes for their domains.

Clients = own domains and friends’ domains. So I am not into offering any kind of paid web hosting. Thus my needs are somehow different. And would like to be able to adjust to my needs the server and I think I can do that with Virtualmin… So in total I have about over 50 mailboxes in 30+ domains, of which less than 10 very active.

However, there seems to be some limitations. I’ve read, again, the pros and cons.

My approach was to keep all configuration, transport tables, mailboxes, domains, quota etc in mysql database. Mail is stored in /var/spool/imap on per domain folders.

Reading the documentation over here:
https://www.virtualmin.com/documentation/email/pop-and-imap
Not sure… but I really don’t like having so many system users on my server. That’s why I went to the other approach on the old server.

Now, we are many years later. Gonna replace Cyrus with Dovecot (some say it is better).

I am in a sort of crisis… I need to start migration. Old server is dying and yesterday I changed the TTL on the domains to start moving them tonight. Mail will be the last to be moved.

I am not too worried about changing the way users login to their mail, instead of user@domain to use user.domain, although authenticating with user@domain is nicer and if possible would like to keep it this way. But I am concerned about creating so many system users.

So, I have a question… is there an easy and quick way to store users in mysql instead on files? Is it worth to keep users in mysql? I found where I might be able to do that (tell dovecot for example to use mysql), but certainly i haven’t found an option/script to migrate everything related to email, at least, into mysql.
If I do that, when I create a user for a virtual domain, will the user be added into mysql or the old fashioned way?

How about smtpd_recipient_restrictions in main.cf?
Is there a way to added sources from a list? known working list? I have my list with a couple of dozens of rules, including reject_rhsbl* and reject_rbl*.

I know there is a lot to read and understand how virtualmin works. I have even omitted the option where to keep the tld into the domain name for users when creating virtual servers… so I would not be surprised if some magical solution already exists, but I guess it would have been presented already.

So in the end, anticipating your answers, I think I am gonna keep the user@domain.tld auth style, despite that virtualmin will create more users just for that, but I hate announcing everyone that their login is gone and needs to be changed. Furthermore, I want to migrate the mails as well from the previous server to the new one, and I found something that can do a sync between them (lost the link, but will find it easily).

your input is welcomed

Howdy,

I would suggest just using system users. I don’t think you’ll see any sort of performance issue… 50 mailboxes really isn’t many at all.

We see folks with hundreds, even thousands, of those, and there isn’t a problem in doing that, the setup works solidly.

When you start getting to the thousands, that may become more noticeable, but 50-ish mailboxes is no problem at all.

Also, note that email users will have a shell of /dev/null, so they won’t be able to log into FTP or SSH.

You’re quite welcome to continue with the user@domain.tld account format. You can set that in System Settings -> Server Templates -> Default -> Mail for Domain, and at the very bottom of that screen you can set “Format for usernames that include domain”.

It’s no problem to modify the smtpd_recipient_restrictions in the main.cf file. The simplest way is just to fire up a trusty text editor, and manually add those to the list in the main.cf. Virtualmin won’t interfere with that.

-Eric

Great. Good to know that virtualmin will not interfere with additional settings.

So I guess I will go ahead with configuring more the server to be ready tonight with it.

Thanks.

Regards,
Paul D.