vimbadmin & postfixadmin schema concerns #1

Closed
opened 2022-04-08 20:22:49 +02:00 by dalu · 0 comments
Owner

This should've been a vimbadmin issue but I didn't want to bother the maintainer

I have started working on a postfix {domain mailbox alias etc manager} admin software and took your schema as the source.
I'm guessing you've been using postfixadmin as the source for yours.
It will be open source and hosted here : https://code.icod.de/postfix/manager
I wanted to have something that can be shipped in a single binary.
I'm still using vimbadmin and am glad to see the v3.3.0 update.

Anyhow I can't help but have some questions regarding the schema choices.

Domain:
virtual_domains_maps.cf

user = theuser
password = thepasswd
hosts = 127.0.0.1
dbname = thedb
query = SELECT domain FROM domain WHERE domain = '%s' AND backupmx = '0' AND active = '1'

however

Table: domain

Columns:
	homedir	varchar(255)
	maildir	varchar(255)
	uid	int(11)
	gid	int(11)

Those makes sense for a mailbox but in every domain I've created those values were null.
Do you believe those fields are still required?
Looking at https://github.com/postfixadmin/postfixadmin/blob/master/model/DomainHandler.php
those fields aren't present in the Domain model.
Likewise in dovecot's sql conf dovecot-sql.conf.ext

connect = host=localhost user=theuser password=thepasswd dbname=thedb

default_pass_scheme = CRYPT

password_query = SELECT username as user, password as password, \
        homedir AS userdb_home, maildir AS userdb_mail, \
        concat('*:bytes=', quota) as userdb_quota_rule, uid AS userdb_uid, gid AS userdb_gid \
    FROM mailbox \
        WHERE username = '%Lu' AND active = '1' \
AND ( access_restriction = 'ALL' OR LOCATE( '%Us', access_restriction ) > 0 )

user_query = SELECT homedir AS home, maildir AS mail, \
        concat('*:bytes=', quota) as quota_rule, uid, gid \
FROM mailbox WHERE username = '%u'

the domain table isn't queried, only the mailbox table, which leads me to believe that the domain schema used to hold the domain and mailbox info and was later split off and never cleaned up.

# This should've been a vimbadmin issue but I didn't want to bother the maintainer I have started working on a postfix {domain mailbox alias etc manager} admin software and took your schema as the source. I'm guessing you've been using postfixadmin as the source for yours. It will be open source and hosted here : https://code.icod.de/postfix/manager I wanted to have something that can be shipped in a single binary. I'm still using vimbadmin and am glad to see the v3.3.0 update. Anyhow I can't help but have some questions regarding the schema choices. Domain: `virtual_domains_maps.cf` ``` user = theuser password = thepasswd hosts = 127.0.0.1 dbname = thedb query = SELECT domain FROM domain WHERE domain = '%s' AND backupmx = '0' AND active = '1' ``` however ``` Table: domain Columns: homedir varchar(255) maildir varchar(255) uid int(11) gid int(11) ``` Those makes sense for a mailbox but in every domain I've created those values were `null`. Do you believe those fields are still required? Looking at https://github.com/postfixadmin/postfixadmin/blob/master/model/DomainHandler.php those fields aren't present in the `Domain` model. Likewise in dovecot's sql conf `dovecot-sql.conf.ext` ``` connect = host=localhost user=theuser password=thepasswd dbname=thedb default_pass_scheme = CRYPT password_query = SELECT username as user, password as password, \ homedir AS userdb_home, maildir AS userdb_mail, \ concat('*:bytes=', quota) as userdb_quota_rule, uid AS userdb_uid, gid AS userdb_gid \ FROM mailbox \ WHERE username = '%Lu' AND active = '1' \ AND ( access_restriction = 'ALL' OR LOCATE( '%Us', access_restriction ) > 0 ) user_query = SELECT homedir AS home, maildir AS mail, \ concat('*:bytes=', quota) as quota_rule, uid, gid \ FROM mailbox WHERE username = '%u' ``` the domain table isn't queried, only the mailbox table, which leads me to believe that the domain schema used to hold the domain and mailbox info and was later split off and never cleaned up.
dalu closed this issue 2022-04-08 21:27:50 +02:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: postfix/manager#1
No description provided.