Seems that the ports in the config file were not binding. I altered the ports. Finally tracked the source of all my problems, and it turns out it was McAfee antivirus and also an incorrect firewall rule set by the IT support company.

All working now.

On 2 August 2016 at 11:11, Lee Savidge <lee.savidge@gmail.com> wrote:
I just reinstalled stunnel the latest version. When running I went through the creation of the pem file. I put in UK for the country code and the company name and put a . for everything else. It finished, I start the GUI and it works. I edited the config file to comment out the gmail IMAP section and reload it and it was fine.

I rebooted, now it tells me tehre is an error in the config file.

Why?

I keep getting this problem. Rebooting seems to break the config somehow. Log shows this when stunnel starts:

[ ] Cron thread initialized
[ ] Running on Windows 6.1
[ ] No limit detected for the number of clients
[.] stunnel 5.35 on x86-pc-msvc-1500 platform
[.] Compiled/running with OpenSSL 1.0.2h-fips  3 May 2016
[.] Threading:WIN32 Sockets:SELECT,IPv6 TLS:ENGINE,FIPS,OCSP,PSK,SNI
[ ] errno: (*_errno())
[ ] GUI message loop initialized
[ ] Running on Windows 6.1
[.] Reading configuration from file stunnel.conf
[.] UTF-8 byte order mark detected
[.] FIPS mode disabled
[ ] Compression disabled
[ ] Snagged 64 random bytes from C:/.rnd
[ ] Wrote 1024 new random bytes to C:/.rnd
[ ] PRNG seeded successfully
[ ] Initializing service [gmail-pop3]
[ ] No certificate or private key specified
[ ] SSL options: 0x03000004 (+0x03000000, -0x00000000)
[ ] Initializing service [gmail-smtp]
[ ] No certificate or private key specified
[ ] SSL options: 0x03000004 (+0x03000000, -0x00000000)
[.] Configuration successful
[ ] Listening file descriptor created (FD=388)
[ ] Option SO_EXCLUSIVEADDRUSE set on accept socket
[ ] Service [gmail-pop3] (FD=388) bound to 127.0.0.1:110
[ ] Listening file descriptor created (FD=392)
[ ] Option SO_EXCLUSIVEADDRUSE set on accept socket
[!] bind: Permission denied (WSAEACCES) (10013)
[!] Error binding service [gmail-smtp] to 127.0.0.1:25
[ ] Closing service [gmail-pop3]
[ ] Service [gmail-pop3] closed (FD=388)
[ ] Service [gmail-pop3] closed
[ ] Closing service [gmail-smtp]
[ ] Service [gmail-smtp] closed

[!] Server is down
[ ] Executing cron jobs
[ ] Cron jobs completed in 0 seconds
[ ] Waiting 86400 seconds

The config file contains this:

debug = debug
output = stunnel.log

[gmail-pop3]
client = yes
accept = 127.0.0.1:110
connect = pop.gmail.com:995
verifyChain = yes
CAfile = ca-certs.pem
checkHost = pop.gmail.com
OCSPaia = yes

[gmail-smtp]
client = yes
accept = 127.0.0.1:25
connect = smtp.gmail.com:465
verifyChain = yes
CAfile = ca-certs.pem
checkHost = smtp.gmail.com
OCSPaia = yes

I have pasted in only the stuff that isn't commented out.

Why does this not work after a reboot? It makes no sense.
--
=-----------------=
    Lee Savidge
=-----------------=

--



--
=-----------------=
    Lee Savidge
=-----------------=

--