Skip to content

Commit c5ae788

Browse files
authored
Fix for SMTP and IMAP hostname in add_mail_acc.html template
Dovecot and Exim4 is able to handle ONLY one TLS / SSL certs. In most cases - it is a cert ONLY for server hostname. So, if you point mail client to $v_domain for IMAP/SMTP TLS - mail client will popup a warning and it will say that certs are for server hostname - not for domain that client added. So, in most cases (in 99% percents) it is better to point mail client to server hostname - because Exim4 and Dovecot have valid cert for server hostname.
1 parent e6d6e19 commit c5ae788

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

web/templates/admin/add_mail_acc.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
<td class="mail-infoblock-td">
133133
<div class="mail-infoblock">
134134
<table>
135+
<?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
135136
<tr>
136137
<td><?=__('Username')?>:</td>
137138
<td><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></td>
@@ -142,7 +143,7 @@
142143
</tr>
143144
<tr>
144145
<td><?=__('IMAP hostname')?>:</td>
145-
<td><?=htmlentities($v_domain)?></td>
146+
<td><?=$hostname?></td>
146147
</tr>
147148
<tr>
148149
<td><?=__('IMAP port')?>:</td>
@@ -158,7 +159,7 @@
158159
</tr>
159160
<tr>
160161
<td><?=__('SMTP hostname')?></td>
161-
<td><?=htmlentities($v_domain)?></td>
162+
<td><?=$hostname?></td>
162163
</tr>
163164
<tr>
164165
<td><?=__('SMTP port')?>:</td>
@@ -179,4 +180,4 @@
179180
</tr>
180181
</table>
181182
</form>
182-
</div>
183+
</div>

0 commit comments

Comments
 (0)