Browse Source

fix examples cert4mail 08.01.2022:18.22

root 3 years ago
parent
commit
cdb92cf823

+ 1 - 1
certbot4mail/certbot4mail.conf

@@ -1,5 +1,5 @@
1 1
 adminmail="admin@mydomen.com";
2
-webcrt="/home/wwwmails/letsencrypt";
2
+webcrt="/home/wwwmail/letsencrypt";
3 3
 domains=( 
4 4
  "mail.mydomen.com" 
5 5
  );

+ 1 - 1
certbot4mail/examples/nginx/sites-avalable/http_mail-mydomen

@@ -5,7 +5,7 @@ server {
5 5
     if ($http_host !~ "^mail.mydomen.ru$"){
6 6
         rewrite ^(.*)$ http://mail.mydomen.ru$1 redirect;
7 7
     }
8
-    root /home/www/letsencrypt;
8
+    root /home/wwwmail/letsencrypt;
9 9
 
10 10
     error_log /var/log/nginx/err-mail_mydomen_ru.log;
11 11
     access_log /var/log/nginx/access-mail_mydomen_ru.log;

+ 1 - 1
certbot4mail/examples/nginx/templates/letsencrypt.conf

@@ -1,7 +1,7 @@
1 1
 location /.well-known {
2 2
    allow all;
3 3
    default_type "text/plain";
4
-   alias /home/www/letsencrypt/.well-known;
4
+   alias /home/wwwmail/letsencrypt/.well-known;
5 5
  }
6 6
 
7 7
  location = /.well-known {

+ 126 - 0
certbot4mail/examples/stunnel.conf

@@ -0,0 +1,126 @@
1
+; Sample stunnel configuration file for Unix by Michal Trojnara 2002-2015
2
+; Some options used here may be inadequate for your particular configuration
3
+; This sample file does *not* represent stunnel.conf defaults
4
+; Please consult the manual for detailed description of available options
5
+
6
+; **************************************************************************
7
+; * Global options                                                         *
8
+; **************************************************************************
9
+
10
+; It is recommended to drop root privileges if stunnel is started by root
11
+;setuid = stunnel4
12
+;setgid = stunnel4
13
+
14
+; PID file is created inside the chroot jail (if enabled)
15
+pid = /var/run/stunnel4/stunnel.pid
16
+
17
+; Debugging stuff (may be useful for troubleshooting)
18
+;foreground = yes
19
+;debug = info
20
+output = /var/log/stunnel4/stunnel.log
21
+
22
+; Enable FIPS 140-2 mode if needed for compliance
23
+;fips = yes
24
+fips = no
25
+; **************************************************************************
26
+; * Service defaults may also be specified in individual service sections  *
27
+; **************************************************************************
28
+
29
+; Enable support for the insecure SSLv3 protocol
30
+options = -NO_SSLv3
31
+sslVersion = TLSv1.2
32
+
33
+; These options provide additional security at some performance degradation
34
+;options = SINGLE_ECDH_USE
35
+;options = SINGLE_DH_USE
36
+
37
+; **************************************************************************
38
+; * Include all configuration file fragments from the specified folder     *
39
+; **************************************************************************
40
+
41
+;include = /etc/stunnel/conf.d
42
+
43
+; **************************************************************************
44
+; * Service definitions (remove all services for inetd mode)               *
45
+; **************************************************************************
46
+
47
+; ***************************************** Example TLS client mode services
48
+
49
+; The following examples use /etc/ssl/certs, which is the common location
50
+; of a hashed directory containing trusted CA certificates.  This is not
51
+; a hardcoded path of the stunnel package, as it is not related to the
52
+; stunnel configuration in /etc/stunnel/.
53
+
54
+;[mydomen-pop3]
55
+;client = yes
56
+;accept = 127.0.0.1:110
57
+;connect = pop3.mydomen.ru:995
58
+;verifyChain = yes
59
+;CApath = @sysconfdir/ssl/certs
60
+;checkHost = pop3s.mydomen.ru
61
+;OCSPaia = yes
62
+
63
+;[mydomen-imap]
64
+;client = yes
65
+;accept = 127.0.0.1:143
66
+;connect = imap.mydomen.ru:993
67
+;verifyChain = yes
68
+;CApath = @sysconfdir/ssl/certs
69
+;checkHost = imaps.mydomen.ru
70
+;OCSPaia = yes
71
+
72
+;[mydomen-smtp]
73
+;client = yes
74
+;accept = 127.0.0.1:25
75
+;connect = smtp.mydomen.ru:465
76
+;verifyChain = yes
77
+;CApath = @sysconfdir/ssl/certs
78
+;checkHost = smtps.mydomen.ru
79
+;OCSPaia = yes
80
+
81
+; ***************************************** Example TLS server mode services
82
+
83
+[pop3s]
84
+accept  = 10.2.2.8:995
85
+connect = 10.2.2.8:110
86
+cert=/etc/letsencrypt/live/mail.mydomen.ru/fullchain.pem
87
+key=/etc/letsencrypt/live/mail.mydomen.ru/privkey.pem
88
+
89
+[imaps]
90
+accept  = 10.2.2.8:993
91
+connect = 10.2.2.8:143
92
+cert=/etc/letsencrypt/live/mail.mydomen.ru/fullchain.pem
93
+key=/etc/letsencrypt/live/mail.mydomen.ru/privkey.pem
94
+
95
+[smtps]
96
+accept  = 10.2.2.8:465
97
+connect = 10.2.2.8:587
98
+cert=/etc/letsencrypt/live/mail.mydomen.ru/fullchain.pem
99
+key=/etc/letsencrypt/live/mail.mydomen.ru/privkey.pem
100
+
101
+; TLS front-end to a web server
102
+;[https]
103
+;accept  = 443
104
+;connect = 80
105
+;cert = /etc/stunnel/stunnel.pem
106
+; "TIMEOUTclose = 0" is a workaround for a design flaw in Microsoft SChannel
107
+; Microsoft implementations do not use TLS close-notify alert and thus they
108
+; are vulnerable to truncation attacks
109
+;TIMEOUTclose = 0
110
+
111
+; Remote shell protected with PSK-authenticated TLS
112
+; Create "/etc/stunnel/secrets.txt" containing IDENTITY:KEY pairs
113
+;[shell]
114
+;accept = 1337
115
+;exec = /bin/sh
116
+;execArgs = sh -i
117
+;ciphers = PSK
118
+;PSKsecrets = /etc/stunnel/secrets.txt
119
+
120
+; Non-standard MySQL-over-TLS encapsulation connecting the Unix socket
121
+;[mysql]
122
+;cert = /etc/stunnel/stunnel.pem
123
+;accept = 3307
124
+;connect = /run/mysqld/mysqld.sock
125
+
126
+; vim:ft=dosini