Configure and Setup Postfixadmin
This page helps you setup PostfixAdmin. For further help see the documentation.
Warning: browser connection not secure, switch to https if possible"; } ?>- config.local.php file"; } ?>
One you have logged in with the setup_password, this page will ...
- run some simple hosting/environment checks which may help identify problems with your environment
- create/update your database of choice,
- allow you to list / add super user accounts
Login with setup_password
Generate setup_password
For a new installation, you must generate a 'setup_password' to go into your config.local.php file.
You can use the form below, or run something like the following in a shell - php -r 'echo
password_hash("password", PASSWORD_DEFAULT);'
Your setup_password is in an obsolete format. As of PostfixAdmin 3.3 it needs regenerating.'; } if (!$configSetupDone) { ?> If you want to use the password you entered as setup password, edit your config file (config.local.php) and set
'; $result .= "\$CONF['setup_password'] = '$hash';After updating your configuration you should be able to login with the "Login with setup_password" form.
"; } else { $form_error = 'has-error'; $errors['setup_password'] = implode(', ', $msgs); } } } ?> = $result ?>Hosting Environment Check
Information- ";
foreach ($check['info'] as $msg) {
echo "
- {$tick} {$msg} "; } echo "
Warnings
- ";
foreach ($check['warn'] as $msg) {
echo "
- ⚠ {$msg} "; } echo "
Errors (MUST be fixed)
- ";
foreach ($check['error'] as $msg) {
echo "
- ⛔{$msg} "; } echo "
Hosting Environment errors found. Login to see details.
'; } if (!empty($check['warn'])) { echo 'Hosting Environment warnings found. Login to see details.
'; } if (empty($check['warn']) && empty($check['error'])) { echo "$tick No problems detected.
"; } } ?>Database
-
Something went wrong while trying to connect to the database. A message should be logged - check PHP's error_log ($error_log)";
error_log("Couldn't perform PostfixAdmin database update - failed to connect to db? " . $e->getMessage() . " Trace: " . $e->getTraceAsString());
}
if ($db) {
echo "
- $tick Database - connection works "; try { ob_start(); $ret = require_once(dirname(__FILE__) . '/upgrade.php'); $output = ob_get_clean(); if ($ret) { echo "
- $tick Database update check - $output "; } } catch (\Exception $e) { if ($authenticated) { echo "
- Exception message: {$e->getMessage()} - check logs! "; } echo "
- Something went wrong while trying to apply database updates, a message should be logged - check PHP's error_log (" . ini_get('error_log') . ') '; error_log("Couldn't perform PostfixAdmin database update via upgrade.php - " . $e->getMessage() . " Trace: " . $e->getTraceAsString()); } } else { echo "
- Could not connect to database to perform updates; check PHP error log. "; } ?>
Database integrity
Check for records that reference missing mailboxes, domains, or administrators. This read-only check does not modify the database.
check(); echo render_database_integrity_results($integrity_results); } catch (\Exception $e) { echo "The database integrity check failed; check PHP's error log.
"; error_log("Couldn't perform PostfixAdmin database integrity check - " . $e->getMessage() . " Trace: " . $e->getTraceAsString()); } } } ?>Admin addition failed; check field error messages or server logs.
"; } else { // all good!. $setupMessage .= "You are done with your basic setup. You can now login to PostfixAdmin using the account you just created.
"; } echo "Super admins
The following 'super-admin' accounts have already been added to the database.
-
{$row['username']}";
}
?>
Add Superadmin Account
= $setupMessage ?>