gnutls_handshake failed using git

Today I ran into this error:

jj5@mercy:~/public-git$ git push origin master
error: gnutls_handshake() failed: A TLS warning alert has been received. while accessing https://demo@demo.personalserver.com/public/git/info/refs 

The solution, of all things, was to add a ServerName spec into my Apache configuration file /etc/apache2/sites-enabled/default-ssl.conf, e.g.:

ServerName demo.personalserver.com

Bug fixed!!

Debugging Courier on Debian

I found Debugging authentication problems

I edited /etc/courier/authdaemonrc and added:

DEBUG_LOGIN=1

Then I created a mail.debug log file:

# touch /var/log/mail.debug
# chown syslog:adm /var/log/mail.debug

Then I created a mail.conf file for rsyslog in /etc/rsyslog.d/mail.conf:

mail.debug /var/log/mail.debug

Then I restarted the rsyslog service:

# service rsyslog restart

Now I have debug logs for mail services!

…oh, no, wait… I only have LOGIN debugging enabled.

Found this, edited /etc/courier/imapd-ssl and added:

IMAPDEBUGFILE=courier.log

Then restarted courier imapd-ssl:

# sudo /etc/init.d/courier-imap-ssl restart

Now there is a courier.log file in: /var/pcmail/jj5@progclub.org