|
41 | 41 | */ |
42 | 42 | $CONF['configured'] = true; |
43 | 43 |
|
| 44 | +// Required for deprecation warnings in PHP/8.1 |
| 45 | +ini_set('display_errors', 'Off'); |
| 46 | + |
44 | 47 | $PFA_VARS = array('PFA_SETUP_PASS', 'PFA_DB_USER', 'PFA_DB_HOST', 'PFA_DB_PASS', 'PFA_DB_NAME', 'PFA_POSTFIX_SERVER', 'PFA_ABUSE_EMAIL', 'PFA_HOSTMASTER_EMAIL', 'PFA_POSTMASTER_EMAIL', 'PFA_WEBMASTER_EMAIL'); |
45 | 48 | $PFA_ERROR = false; |
46 | 49 | foreach ($PFA_VARS AS $PFA_VAR) { |
@@ -178,8 +181,8 @@ function language_hook($PALANG, $language) { |
178 | 181 | // Mail Server |
179 | 182 | // Hostname (FQDN) of your mail server. |
180 | 183 | // This is used to send email to Postfix in order to create mailboxes. |
181 | | -$CONF['smtp_server'] = $_ENV{'PFA_POSTFIX_SERVER'}; |
182 | | -$CONF['smtp_port'] = isset($_ENV{'PFA_POSTFIX_PORT'}) ? $_ENV{'PFA_POSTFIX_PORT'} : 25; |
| 184 | +$CONF['smtp_server'] = $_ENV['PFA_POSTFIX_SERVER']; |
| 185 | +$CONF['smtp_port'] = isset($_ENV['PFA_POSTFIX_PORT']) ? $_ENV['PFA_POSTFIX_PORT'] : 25; |
183 | 186 |
|
184 | 187 | // SMTP Client |
185 | 188 | // Hostname (FQDN) of the server hosting Postfix Admin |
@@ -255,10 +258,10 @@ function language_hook($PALANG, $language) { |
255 | 258 | // a) a full mail address |
256 | 259 | // b) only a localpart ('postmaster' => 'admin') - the alias target will point to the same domain |
257 | 260 | $CONF['default_aliases'] = array ( |
258 | | - 'abuse' => $_ENV{'PFA_ABUSE_EMAIL'}, |
259 | | - 'hostmaster' => $_ENV{'PFA_HOSTMASTER_EMAIL'}, |
260 | | - 'postmaster' => $_ENV{'PFA_POSTMASTER_EMAIL'}, |
261 | | - 'webmaster' => $_ENV{'PFA_WEBMASTER_EMAIL'} |
| 261 | + 'abuse' => $_ENV['PFA_ABUSE_EMAIL'], |
| 262 | + 'hostmaster' => $_ENV['PFA_HOSTMASTER_EMAIL'], |
| 263 | + 'postmaster' => $_ENV['PFA_POSTMASTER_EMAIL'], |
| 264 | + 'webmaster' => $_ENV['PFA_WEBMASTER_EMAIL'] |
262 | 265 | ); |
263 | 266 |
|
264 | 267 | // Mailboxes |
|
0 commit comments