Menü umschalten
Persönliches Menü umschalten
Nicht angemeldet
Your IP address will be publicly visible if you make any edits.

IMAP Proxy with stunnel4: Unterschied zwischen den Versionen

Aus Hennings Wiki
(Die Seite wurde neu angelegt: „===== install stunnel4 ===== <syntaxhighlight lang="bash"> apt update apt install stunnel </syntaxhighlight> ===== Create certificate file from Lets Encrypt ===== <syntaxhighlight lang="bash"> vim /root/renew-cert.sh </syntaxhighlight> <syntaxhighlight lang="bash"> (cat /etc/letsencrypt/live/wiki.lexodexo.de/privkey.pem ; echo ""; cat /etc/letsencrypt/live/wiki.lexodexo.de/cert.pem; echo "") > /etc/stunnel/stunnel.pem </syntaxhighlight> ===== configuri…“)
 
Keine Bearbeitungszusammenfassung
Zeile 44: Zeile 44:
</syntaxhighlight>
</syntaxhighlight>


===== configuring outgoing IMAP traffic =====
<syntaxhighlight lang="bash">
vim /etc/stunnel/ssl_out.conf
</syntaxhighlight>


<syntaxhighlight lang="bash">
; /etc/stunnel/ssl_out.conf
; Some security enhancements for UNIX systems - comment them out on Win32
chroot = /var/lib/stunnel4/
setuid = stunnel4
setgid = stunnel4
; PID is created inside chroot jail
pid = /clt1.pid
; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1
client=yes
CAfile = clt1.ca
verify = 0
[ssl_out_imap]
accept  = 10993
connect = imap.example.com:993
</syntaxhighlight>


https://serverfault.com/a/247967
https://serverfault.com/a/247967

Version vom 27. August 2024, 13:20 Uhr

install stunnel4
apt update
apt install stunnel
Create certificate file from Lets Encrypt
vim /root/renew-cert.sh
(cat /etc/letsencrypt/live/wiki.lexodexo.de/privkey.pem ; echo ""; cat /etc/letsencrypt/live/wiki.lexodexo.de/cert.pem; echo "") > /etc/stunnel/stunnel.pem
configuring incoming IMAP traffic
vim /etc/stunnel/ssl_in.conf
; /etc/stunnel/ssl_in.conf
; Certificate/key is needed in server mode and optional in client mode
cert = /etc/stunnel/stunnel.pem

; Some security enhancements for UNIX systems - comment them out on Win32
chroot = /var/lib/stunnel4/
setuid = stunnel4
setgid = stunnel4

; PID is created inside chroot jail
pid = /srv1.pid

debug = 4
;output = /tmp/incoming.log

; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

[ssl_in_imap]
accept  = 993
connect = localhost:10993
configuring outgoing IMAP traffic
vim /etc/stunnel/ssl_out.conf
; /etc/stunnel/ssl_out.conf
; Some security enhancements for UNIX systems - comment them out on Win32
chroot = /var/lib/stunnel4/
setuid = stunnel4
setgid = stunnel4

; PID is created inside chroot jail
pid = /clt1.pid

; Some performance tunings
socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

client=yes
CAfile = clt1.ca
verify = 0


[ssl_out_imap]
accept  = 10993
connect = imap.example.com:993

https://serverfault.com/a/247967