IMAP new mail notification utility with IDLE support and Notification Center (OS X) and DBus (others) notifications

set SSL_verify_mode to SSL_VERIFY_PEER, allow overriding ca path

+10 -4
+10 -4
imapbiff.pl
··· 3 3 # 4 4 # imap biff with meow/growl/dbus notification 5 5 # 6 - # Copyright (c) 2006, 2008 joshua stein <jcs@jcs.org> 6 + # Copyright (c) 2006, 2008, 2010, 2013 joshua stein <jcs@jcs.org> 7 7 # ssl work-around code from Nick Burch (http://gagravarr.org/code/) 8 8 # 9 9 # Redistribution and use in source and binary forms, with or without 10 10 # modification, are permitted provided that the following conditions 11 11 # are met: 12 - # 12 + # 13 13 # 1. Redistributions of source code must retain the above copyright 14 14 # notice, this list of conditions and the following disclaimer. 15 15 # 2. Redistributions in binary form must reproduce the above copyright ··· 17 17 # documentation and/or other materials provided with the distribution. 18 18 # 3. The name of the author may not be used to endorse or promote products 19 19 # derived from this software without specific prior written permission. 20 - # 20 + # 21 21 # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR 22 22 # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 23 # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ··· 28 28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 30 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 - # 31 + # 32 32 33 33 # 34 34 # to configure, re-define variables in a ~/.imapbiffrc file like so: ··· 53 53 # 54 54 # # for verbosity 55 55 # #$debug = 1; 56 + # 57 + # # ssl ca path, if not this default 58 + # $ssl_ca_path = "/etc/ssl/cert.pem"; 56 59 # 57 60 # # which notification mechanism to use ("meow", "dbus", or "growl") 58 61 # $notify = "dbus"; ··· 238 241 PeerPort => ($config{$server}{"port"} ? 239 242 $config{$server}{"port"} : 993), 240 243 Timeout => 5, 244 + SSL_verify_mode => SSL_VERIFY_PEER, 245 + SSL_ca_path => $config{"ssl_ca_path"} ? 246 + $config{"ssl_ca_path"} : "/etc/ssl/cert.pem" 241 247 ) or die "no ssl socket: " . $@; 242 248 243 249 $config{$server}{"sslsock"} = \$sock;