September 9 2022

fetchmail ssl error

Get the combined ssl fingerprint:

openssl s_client -connect email.server.wan:993 -showcerts | openssl x509 -fingerprint -noout -md5

Example fetchmailrc:

set logfile /home/user/fetchmail.log
poll email.server.wan proto pop3
user "loginnamehere" password "passwordhere"
ssl
sslcertpath "/home/user/.fetchmail/ssl"
#sslcertck
nokeep
mda "/usr/bin/procmail -f %F -d %T";
sslfingerprint 'md5 thumbprint separated by :'s from first step'

The running script, print attachments with cups

#!/bin/bash
echo -n $(date +%m-%d-%Y_%H:%M:%S) ":>> " >> fetchmail.log
SUPPORTED_FILETYPES=.pdf.jpg
LP_OPTIONS="-d MFCL2710DN -o media=A4,tray1 -o fit-to-page -o position=top -o scaling=100"
FILENAME=$(date +%H%M%S).txt
/usr/bin/fetchmail --bsmtp ~/mailtemp/$FILENAME
if [ "$?" = "0" ]; then
/usr/bin/uudeview +e $SUPPORTED_FILETYPES -p ~/printable -i ~/mailtemp/$FILENAME
# rm ~/mailtemp/$FILENAME

for f in ~/printable/*
do
lp $LP_OPTIONS $f
rm $f
done
fi

https://www.linuxquestions.org/questions/linux-server-73/fetchmail-809435/

How to fix ssl certificate issue on fetchmail


Copyright 2021. All rights reserved.

Posted September 9, 2022 by reggie goldman in category "Uncategorized