Kai Schätzl - 2017-07-12

I'm new to postfixadmin and virtual users for postfix/dovecot in general, but have long-time experience with mailservers and system mailuser accounts. I want to switch now from system users with postfix/sendmail/dovecot to virtual users with postfix and dovecot on Ubuntu 16.04 TLS.
At first it seemed I could still use simple user names (like with system users) which I would prefer but now I encounter some obstacles.
(e.g. I wanted to use
$CONF['domainpath'] = 'NO';
$CONF['domaininmailbox'] = 'NO';
and tell dovecot a maildir path without a domain in it.
Or did I misunderstand these conf parameters?)

First obstacle:
I couldn't create a superadmin without using an email address. I then created a second superadmin and removed the domain part in the database table. After this the second superadmin cannot login anymore. I suppose there is a check for a valid email address in the code? (I already disabled the dns check.)
From this experience I suppose the same is true for other users? So, that I cannot add new users that are not an email address. Is this correct?

Second obstacle:
Postfixadmin 3.1 supports a "domain quota" that didn't exist in 2.3.7 that I installed first (default version in ubuntu 16.04). I suppose the domain quota is not going to work without a domain part of the login as there is then nothing to link the user accounts to a common domain. Is this correct? Or is there another way to tie several accounts to a "domain"?

Perhaps, an example shows what I want.

My usual mail setup (with an example of two domains belonging to the same user/company/web server):
ftp (and maybe system) user: userid (it's unique!)
mail users are derived from that by adding digits, mail flows in via virtual and alias tables.
example.com and secondexample.com belong to the same user/web server:
mail1@example.com -> userid_01
mail2@example.com -> userid_01
mail1@secondexample.com -> userid_01, userid_02
mail3@xample.com -> userid_02

Can I achieve this setup with postfixadmin and have a common quota for that domain? Maybe by adding a domain, so the requirement for an email address is fulfilled? Like this:
mail1@example.com -> user_01@example.com
mail2@example.com -> user_01@example.com
mail1@secondexample.com -> user_01@example.com, userid_02@example.com
mail3@xample.com -> user_02@example.com

If I set a common quota for domain example.com: would this quota work for mail1@secondexample.com as well, as the final destination is someuser @example.com? Or how would I set a domain quota for all of them? Obviously, I cannot set quotas for all domains, as this might multiply the quotas. Or not?

Or are there other options available so that I can keep using simple usernames?

Thanks a lot!

 

Last edit: Kai Schätzl 2017-07-12