Hi.I recently bought a Pi3 and have loaded Raspbian with Doobs (Previously I had this running faultlessly under a Windows Server for my Canon multi function printer that does not support SSL/TLS but only authentication). After about 8 attempts to get Stunnel4 working (there doesn't seem to be a later version to install via the command line) I eventually found that Stunnel4 works fine as long as one doesn't update Dabian from the initial Doobs install.So, I now have the service running and listening on port 25 with the following config file:debug=7output=/etc/stunnel/stunnel.log client=yesoptions=NO_SSLv2 (I added this last night after reading a blog)[SMTP OUT]sslVersion=TLSv1 (I added this last night after reading a blog)protocol=smtpaccept=25connect=smtp.office365.com:587On restarting the service I see the following which looks okay to my untrained eye:2017.04.03 09:42:09 LOG7[3570]: Dispatching signals from the signal pipe2017.04.03 09:42:09 LOG7[3570]: Processing SIGNAL_TERMINATE2017.04.03 09:42:09 LOG5[3570]: Terminated2017.04.03 09:42:09 LOG7[3570]: Closing service [SMTP OUT]2017.04.03 09:42:09 LOG7[3570]: Service [SMTP OUT] closed (FD=7)2017.04.03 09:42:09 LOG7[3570]: Service [SMTP OUT] closed2017.04.03 09:42:09 LOG7[3570]: removing pid file /var/run/stunnel4.pid2017.04.03 09:42:09 LOG7[3926]: Clients allowed=5002017.04.03 09:42:09 LOG5[3926]: stunnel 5.06 on arm-unknown-linux-gnueabihf platform2017.04.03 09:42:09 LOG5[3926]: Compiled with OpenSSL 1.0.1k 8 Jan 20152017.04.03 09:42:09 LOG5[3926]: Running with OpenSSL 1.0.1t 3 May 20162017.04.03 09:42:09 LOG5[3926]: Update OpenSSL shared libraries or rebuild stunnel2017.04.03 09:42:09 LOG5[3926]: Threading:PTHREAD Sockets:POLL,IPv6,SYSTEMD SSL:ENGINE,OCSP,FIPS Auth:LIB$2017.04.03 09:42:09 LOG7[3926]: errno: (*__errno_location ())2017.04.03 09:42:09 LOG5[3926]: Reading configuration from file /etc/stunnel/stunnel4.conf2017.04.03 09:42:09 LOG5[3926]: FIPS mode disabled2017.04.03 09:42:09 LOG7[3926]: Compression disabled2017.04.03 09:42:09 LOG7[3926]: Snagged 64 random bytes from /dev/urandom2017.04.03 09:42:09 LOG7[3926]: PRNG seeded successfully2017.04.03 09:42:09 LOG6[3926]: Initializing service [SMTP OUT]2017.04.03 09:42:09 LOG7[3926]: No private key specified2017.04.03 09:42:09 LOG7[3926]: SSL options: 0x03000004 (+0x03000000, -0x00000000)2017.04.03 09:42:09 LOG5[3926]: Configuration successful2017.04.03 09:42:09 LOG7[3926]: Listening file descriptor created (FD=7)2017.04.03 09:42:09 LOG7[3926]: Service [SMTP OUT] (FD=7) bound to 0.0.0.0:252017.04.03 09:42:09 LOG7[3927]: Created pid file /var/run/stunnel4.pidWhen sending a scan from the printer to an email address I see the following in the log file:2017.04.03 10:00:05 LOG7[3927]: Service [SMTP OUT] accepted (FD=3) from 192.168.8.99:10852017.04.03 10:00:05 LOG7[3960]: Service [SMTP OUT] started2017.04.03 10:00:05 LOG5[3960]: Service [SMTP OUT] accepted connection from 192.168.8.99:10852017.04.03 10:00:05 LOG6[3960]: s_connect: connecting 40.101.73.162:5872017.04.03 10:00:05 LOG7[3960]: s_connect: s_poll_wait 40.101.73.162:587: waiting 10 seconds2017.04.03 10:00:05 LOG5[3960]: s_connect: connected 40.101.73.162:5872017.04.03 10:00:05 LOG5[3960]: Service [SMTP OUT] connected remote server from 192.168.8.33:597922017.04.03 10:00:05 LOG7[3960]: Remote socket (FD=9) initialized2017.04.03 10:00:05 LOG7[3960]: <- 220 DB6PR07CA0179.outlook.office365.com Microsoft ESMTP MAIL Service $2017.04.03 10:00:05 LOG7[3960]: -> 220 DB6PR07CA0179.outlook.office365.com Microsoft ESMTP MAIL Service $2017.04.03 10:00:05 LOG7[3960]: -> EHLO localhost2017.04.03 10:00:05 LOG7[3960]: <- 250-DB6PR07CA0179.outlook.office365.com Hello [46.208.253.189]2017.04.03 10:00:05 LOG7[3960]: <- 250-SIZE 1572864002017.04.03 10:00:05 LOG7[3960]: <- 250-PIPELINING2017.04.03 10:00:05 LOG7[3960]: <- 250-DSN2017.04.03 10:00:05 LOG7[3960]: <- 250-ENHANCEDSTATUSCODES2017.04.03 10:00:05 LOG7[3960]: <- 250-STARTTLS2017.04.03 10:00:05 LOG7[3960]: <- 250-8BITMIME2017.04.03 10:00:05 LOG7[3960]: <- 250-BINARYMIME2017.04.03 10:00:05 LOG7[3960]: <- 250-CHUNKING2017.04.03 10:00:05 LOG7[3960]: <- 250 SMTPUTF82017.04.03 10:00:05 LOG7[3960]: -> STARTTLS2017.04.03 10:00:05 LOG7[3960]: <- 220 2.0.0 SMTP server ready2017.04.03 10:00:05 LOG6[3960]: SNI: sending servername: outlook.office365.com2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): before/connect initialization2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: SSL state (connect): unknown state2017.04.03 10:00:05 LOG7[3960]: 0 items in the session cache2017.04.03 10:00:05 LOG7[3960]: 2 client connects (SSL_connect())2017.04.03 10:00:05 LOG7[3960]: 2 client connects that finished2017.04.03 10:00:05 LOG7[3960]: 0 client renegotiations requested2017.04.03 10:00:05 LOG7[3960]: 0 server connects (SSL_accept())2017.04.03 10:00:05 LOG7[3960]: 0 server connects that finished2017.04.03 10:00:05 LOG7[3960]: 0 server renegotiations requested2017.04.03 10:00:05 LOG7[3960]: 0 session cache hits2017.04.03 10:00:05 LOG7[3960]: 0 external session cache hits2017.04.03 10:00:05 LOG7[3960]: 0 session cache misses2017.04.03 10:00:05 LOG7[3960]: 0 session cache timeouts2017.04.03 10:00:05 LOG6[3960]: SSL connected: new session negotiated2017.04.03 10:00:05 LOG6[3960]: Negotiated TLSv1 ciphersuite ECDHE-RSA-AES128-SHA (128-bit encryption)2017.04.03 10:00:05 LOG6[3960]: Compression: null, expansion: null2017.04.03 10:00:10 LOG6[3960]: SSL socket closed (SSL_read)2017.04.03 10:00:10 LOG7[3960]: Sent socket write shutdown2017.04.03 10:00:10 LOG5[3960]: Connection closed: 23 byte(s) sent to SSL, 79 byte(s) sent to socket2017.04.03 10:00:10 LOG7[3960]: Remote socket (FD=9) closed2017.04.03 10:00:10 LOG7[3960]: Local socket (FD=3) closed2017.04.03 10:00:10 LOG7[3960]: Service [SMTP OUT] finished (0 left)2017.04.03 10:00:20 LOG7[3927]: Service [SMTP OUT] accepted (FD=3) from 192.168.8.99:10862017.04.03 10:00:20 LOG7[3961]: Service [SMTP OUT] started2017.04.03 10:00:20 LOG5[3961]: Service [SMTP OUT] accepted connection from 192.168.8.99:10862017.04.03 10:00:20 LOG6[3961]: s_connect: connecting 40.101.72.194:5872017.04.03 10:00:20 LOG7[3961]: s_connect: s_poll_wait 40.101.72.194:587: waiting 10 seconds2017.04.03 10:00:20 LOG5[3961]: s_connect: connected 40.101.72.194:5872017.04.03 10:00:20 LOG5[3961]: Service [SMTP OUT] connected remote serve from 192.168.8.33:574222017.04.03 10:00:20 LOG7[3961]: Remote socket (FD=9) initialized2017.04.03 10:00:21 LOG7[3961]: <- 220 DB6PR07CA0014.outlook.office365.com Microsoft ESMTP MAIL Service $2017.04.03 10:00:21 LOG7[3961]: -> 220 DB6PR07CA0014.outlook.office365.com Microsoft ESMTP MAIL Service $2017.04.03 10:00:21 LOG7[3961]: -> EHLO localhost2017.04.03 10:00:21 LOG7[3961]: <- 250-DB6PR07CA0014.outlook.office365.com Hello [46.208.253.189]2017.04.03 10:00:21 LOG7[3961]: <- 250-SIZE 1572864002017.04.03 10:00:21 LOG7[3961]: <- 250-PIPELINING2017.04.03 10:00:21 LOG7[3961]: <- 250-DSN2017.04.03 10:00:21 LOG7[3961]: <- 250-ENHANCEDSTATUSCODES2017.04.03 10:00:21 LOG7[3961]: <- 250-STARTTLS2017.04.03 10:00:21 LOG7[3961]: <- 250-8BITMIME2017.04.03 10:00:21 LOG7[3961]: <- 250-BINARYMIME2017.04.03 10:00:21 LOG7[3961]: <- 250-CHUNKING2017.04.03 10:00:21 LOG7[3961]: <- 250 SMTPUTF82017.04.03 10:00:21 LOG7[3961]: -> STARTTLS2017.04.03 10:00:21 LOG7[3961]: <- 220 2.0.0 SMTP server ready2017.04.03 10:00:21 LOG6[3961]: SNI: sending servername: outlook.office365.com2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): before/connect initialization2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: SSL state (connect): unknown state2017.04.03 10:00:21 LOG7[3961]: 0 items in the session cache2017.04.03 10:00:21 LOG7[3961]: 3 client connects (SSL_connect())2017.04.03 10:00:21 LOG7[3961]: 3 client connects that finished2017.04.03 10:00:21 LOG7[3961]: 0 client renegotiations requested2017.04.03 10:00:21 LOG7[3961]: 0 server connects (SSL_accept())2017.04.03 10:00:21 LOG7[3961]: 0 server connects that finished2017.04.03 10:00:21 LOG7[3961]: 0 server renegotiations requested2017.04.03 10:00:21 LOG7[3961]: 0 session cache hits2017.04.03 10:00:21 LOG7[3961]: 0 external session cache hits2017.04.03 10:00:21 LOG7[3961]: 0 session cache misses2017.04.03 10:00:21 LOG7[3961]: 0 session cache timeouts2017.04.03 10:00:21 LOG6[3961]: SSL connected: new session negotiated2017.04.03 10:00:21 LOG6[3961]: Negotiated TLSv1 ciphersuite ECDHE-RSA-AES128-SHA (128-bit encryption)2017.04.03 10:00:21 LOG6[3961]: Compression: null, expansion: null2017.04.03 10:00:26 LOG6[3961]: SSL socket closed (SSL_read)2017.04.03 10:00:26 LOG7[3961]: Sent socket write shutdown2017.04.03 10:00:26 LOG5[3961]: Connection closed: 23 byte(s) sent to SSL, 79 byte(s) sent to socket2017.04.03 10:00:26 LOG7[3961]: Remote socket (FD=9) closed2017.04.03 10:00:26 LOG7[3961]: Local socket (FD=3) closed2017.04.03 10:00:26 LOG7[3961]: Service [SMTP OUT] finished (0 left)At the end of this, no email is received. I can't tell from the above if the document is not being received by Stunnel from the printer or if Stunnel can not pass the document to Office365. It looks like TLSv1 is being negotiated and some data is being sent but then it closes the connection.Any help would be much appreciated.Regards,Graeme
_______________________________________________
stunnel-users mailing list
stunnel-users@stunnel.org
https://www.stunnel.org/cgi-bin/mailman/listinfo/stunnel- users