I\'m getting a mess of these bogus warnings in my log file, and I’d like to suppress them without suppressing legitimate messages:
PHP Notice: Unknown: SECU
As deceze said, it's not really a "bogus" message, it just means that it's a plaintext unencrypted connection. Here is how you can do :
$error = imap_errors();
if (count($error) > 1 || $error[0] != 'SECURITY PROBLEM: insecure server advertised AUTH=PLAIN') {
// More than 1 error or not the expected error
var_dump($error);
throw new Exception('IMAP error detected');
}