|
|
@ -33,7 +33,7 @@ class rcube_smtp
|
|
|
|
// define headers delimiter
|
|
|
|
// define headers delimiter
|
|
|
|
const SMTP_MIME_CRLF = "\r\n";
|
|
|
|
const SMTP_MIME_CRLF = "\r\n";
|
|
|
|
|
|
|
|
|
|
|
|
const DEBUG_LINE_LENGTH = 4096;
|
|
|
|
const DEBUG_LINE_LENGTH = 4098; // 4KB + 2B for \r\n
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -330,8 +330,9 @@ class rcube_smtp
|
|
|
|
public function debug_handler(&$smtp, $message)
|
|
|
|
public function debug_handler(&$smtp, $message)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) {
|
|
|
|
if (($len = strlen($message)) > self::DEBUG_LINE_LENGTH) {
|
|
|
|
$message = substr_replace($message, "\n-----[debug cut]----\n",
|
|
|
|
$diff = $len - self::DEBUG_LINE_LENGTH;
|
|
|
|
self::DEBUG_LINE_LENGTH/2 - 11, $len - self::DEBUG_LINE_LENGTH - 22);
|
|
|
|
$message = substr($message, 0, self::DEBUG_LINE_LENGTH)
|
|
|
|
|
|
|
|
. "... [truncated $diff bytes]";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
rcube::write_log('smtp', preg_replace('/\r\n$/', '', $message));
|
|
|
|
rcube::write_log('smtp', preg_replace('/\r\n$/', '', $message));
|
|
|
|