Add imap_trace option to show IMAP protocol dialog
idlebiff
patch 6cb864e02d9646202d1c02fce406e57ba2059f46
Author: Enrique D. Bosch <presidev@AT@gmail.com>
Date: Thu Aug 30 00:52:43 CEST 2018
* Add imap_trace option to show IMAP protocol dialog
diff -rN -u old-idlebiff/idlebiff new-idlebiff/idlebiff
--- old-idlebiff/idlebiff 2024-05-19 10:21:50.107856123 +0200
+++ new-idlebiff/idlebiff 2024-05-19 10:21:50.107856123 +0200
@@ -264,7 +264,11 @@
proc imap_command { con com } \
{
-# if {[regexp {.*LOGIN.*} $com]} {puts "C: [string range $com 0 10]"} else {puts "C: $com"}
+ variable ::shared::conf
+
+ if { $conf(imap_trace) } \
+ { if {[ regexp {.*LOGIN.*} $com ]} { puts "C: [string range $com 0 10]" } else { puts "C: $com" } }
+
if {[ catch { puts $con $com } ]} \
{
recon $con
@@ -513,6 +517,8 @@
proc read_line con \
{
+ variable ::shared::conf
+
cancel_timeout
if {[ catch { set r [ gets $con line ] } ]} \
{
@@ -531,7 +537,8 @@
} \
else \
{
-# puts "S: $line"
+ if { $conf(imap_trace) } { puts "S: $line" }
+
return $line
}
}