Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bnzf

macrumors newbie
Jan 9, 2020
17
1
OK. I did that and nothing new appeared.

Long version:
Squid restarts itself. I had to watch in activity monitor that it was (still) down and then type
/Library/Squid/squid -d 0
to get those error messages.

After the mail test I started the Interweb browser and went to some https-pages to see if something appears in the terminal window - nothing appeared. Is that the expected behaviour?

Then I changed in network settings /Proxys localhost to 127:0:0:1. Interweb now complained that it can not reach the Proxy. So the Proxy seemed to work with the original settings.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,617
1,991
Then I changed in network settings /Proxys localhost to 127:0:0:1. Interweb now complained that it can not reach the Proxy. So the Proxy seemed to work with the original settings.
Interweb is based on Firefox and so uses its own certificate store and https implementation, it needs to be told to bypass the proxy. (Or, the Squid certificate needs to be added to Firefox's certificate store.)

Did nothing appear *after* you'd changed the network settings in System Preferences and tried to connect in Mail?
 

bnzf

macrumors newbie
Jan 9, 2020
17
1
Interweb is based on Firefox and so uses its own certificate store and https implementation, it needs to be told to bypass the proxy. (Or, the Squid certificate needs to be added to Firefox's certificate store.)

Did nothing appear *after* you'd changed the network settings in System Preferences and tried to connect in Mail?

I needed to confirm with Interweb the certificates. I had a look on those, they were the self signed Squid certificates. So Interweb used the Squid Proxy for https.

No, nothing appeared in the terminal output after I changed the network settings.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,617
1,991
No, nothing appeared in the terminal output after I changed the network settings.
Okay, so you're right then, the Apple Mail IMAP connection isn't getting sent through the proxy at all.

Thanks for testing, I'll look into this more.
 

Wowfunhappy

macrumors 68000
Mar 12, 2019
1,617
1,991
Yeah, bnzf was 100% right on the whole time, sorry about that. IMAP, POP, and SMTP don't go through the http protocol at all (even though they do use TLS). Squid can't handle those protocols, no matter how it's configured.

stunnel is probably the right tool here. I don't know why it's not working though.
 

bnzf

macrumors newbie
Jan 9, 2020
17
1
After a hint from the stunnel mailing list I got stunnel working.
I had to delete the "protocol = smtp" and protocol = pop3" line in my conf file.

I had tried JohnAJ version with
Code:
protocol = smtp
protocolUsername = YOURUSERNAME
protocolPassword = YOURPASSWORD
but that had not changed the behaviour in my case.

Here is the conf that works for me:
Code:
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

CApath = /usr/local/etc/stunnel/
cert = /usr/local/etc/stunnel/stunnel.pem

foreground = yes
debug = 7
output = /usr/local/etc/stunnel/stunnel.log

[strato-pop3]
client = yes
accept = 127.0.0.1:110
connect = pop3.strato.de:995

[strato-smtp]
client = yes
accept = 25
connect = smtp.strato.de:465
 
  • Love
Reactions: Wowfunhappy
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.