Hello all,
This is my first message here, let me make some introductions, please. I’m planning to migrate my mail server, which I’ve set up manually (using Postfix, Dovecot, Mailscanner, Snappymail webmail, MySQL, Postfixadmin, etc.). My current setup is maintained and up-to-date. I’m looking for similar custom configurations, if possible, to evaluate my potential migration.
In Postfixadmin, I had added a custom table to the user database, called “restriction”. This table had the following fields: Local, National, Custom, and International. These restrictive rules work as follows:
smtpd_restriction_classes = National, International, Local, Others
National= check_recipient_access regexp:/etc/postfix/rules/National, reject
International= check_sender_access regexp:/etc/postfix/rules/International, reject
Local = check_recipient_access regexp:/etc/postfix/rules/Local , reject
Others = check_recipient_access regexp:/etc/postfix/rules/Others, reject
As you know, in the SMTP phases, the smtpd_recipient_restrictions
and smtpd_sender_restrictions
are used to apply restrictions. I can make this statically in Mailcow, but the goal is to have the ability to manage this through the web admin page and delegate actions to the support team without touching files and configuration.
The million-dollar question is: Can you add custom fields to the database and have them appear on the web page? Or can you call them by label, tag, custom attribute, or anything else? This is crucial because you want to group users by departments and use these custom fields to apply rules, such as message size restrictions, where some users can send messages up to 5 MB, while others can send up to 10 or 20 MB. You want to be able to control all of this using these custom characteristics.