-
Notifications
You must be signed in to change notification settings - Fork 300
Initial commit for Autoconfig #343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
AUTOCONFIG/AutoconfigHandler.php
Outdated
// This is a per-domain admin, so we use the table domain_admis to cross check which configuration he/she has access | ||
elseif ( authentication_has_role( 'admin' ) ) { | ||
$E_username = escape_string( $user ); | ||
$sql = "SELECT DISTINCT ad.config_id FROM $table_domain d LEFT JOIN $table_autoconfig_domains ad ON ad.domain = d.domain WHERE d.active IS TUE AND d.username='$E_username'"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this TUE a typo?
Can you rewrite it so there's no chance of $sql being undefined.
E.g. default $sql to whatever the 'admin' user has ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Yes, this should have been TRUE
. This reminds me I have not tested this interface as regular admin. Only as super admin, which is why I did not bump into this issue before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
( and probably 'table domain_admins' in the comment 👍
Most of them are from running 'composer psalm' and 'composer format' on the code. I haven't done much yet. |
@jackdeguest @DavidGoodwin Any updates about status? I was thinking it was a good idea to try to integrate Autoconfig, Mobileconfig, potentially Autodiscover, and other autodiscovery helper mechanisms into Postfixadmin, so the email user only needs to provide an email address and a password. |
@jackdeguest Would be great with information for Nginx also. |
Added Autodiscovery configuration interface to Postfix Admin version 3.3 (?).
Files added are:
An INSTALL.md is added giving instruction including on how to set up Apache Virtual Host and DNS zone. Maybe need to add information for Nginx?
Autoconfig uses foreign key to work properly.
This addition has been tested thoroughly by me but some bugs may have slipped my attention.