Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 1 | <?php
|
| 2 | if (!isset($_SESSION['mailcow_cc_role'])) {
|
| 3 | header('Location: /');
|
| 4 | exit();
|
| 5 | }
|
| 6 | ?>
|
| 7 | <!-- add settings rule modal -->
|
| 8 | <div class="modal fade" id="addRsettingModal" tabindex="-1" role="dialog" aria-hidden="true">
|
| 9 | <div class="modal-dialog modal-lg">
|
| 10 | <div class="modal-content">
|
| 11 | <div class="modal-header">
|
| 12 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
| 13 | <h3 class="modal-title"><?=$lang['admin']['add_settings_rule'];?></h3>
|
| 14 | </div>
|
| 15 | <div class="modal-body">
|
| 16 | <form class="form-horizontal" data-cached-form="true" data-id="rsetting" role="form" method="post">
|
| 17 | <div class="form-group">
|
| 18 | <label class="control-label col-sm-2" for="desc"><?=$lang['admin']['rsetting_desc'];?>:</label>
|
| 19 | <div class="col-sm-10">
|
| 20 | <input type="text" class="form-control" id="adminRspamdSettingsDesc" name="desc" required>
|
| 21 | </div>
|
| 22 | </div>
|
| 23 | <div class="form-group">
|
| 24 | <label class="control-label col-sm-2" for="content"><?=$lang['admin']['rsetting_content'];?>:</label>
|
| 25 | <div class="col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 26 | <textarea class="form-control" id="adminRspamdSettingsContent" name="content" rows="10"><?=(isset($rsetting_details['content'])) ? $rsetting_details['content'] : '';?></textarea>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 27 | </div>
|
| 28 | </div>
|
| 29 | <div class="form-group">
|
| 30 | <div class="col-sm-offset-2 col-sm-10">
|
| 31 | <div class="checkbox">
|
| 32 | <label><input type="checkbox" value="1" name="active" checked> <?=$lang['admin']['active'];?></label>
|
| 33 | </div>
|
| 34 | </div>
|
| 35 | </div>
|
| 36 | <div class="form-group">
|
| 37 | <div class="col-sm-offset-2 col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 38 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="rsetting" data-api-url='add/rsetting' data-api-attr='{}' href="#"><i class="bi bi-plus-lg"></i> <?=$lang['admin']['add'];?></button>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 39 | </div>
|
| 40 | </div>
|
| 41 | </form>
|
| 42 | <hr>
|
| 43 | <p><?=$lang['admin']['rspamd-com_settings'];?></p>
|
| 44 | <ul id="rspamd_presets"></ul>
|
| 45 | </div>
|
| 46 | </div>
|
| 47 | </div>
|
| 48 | </div><!-- add settings rule modal -->
|
| 49 | <!-- add domain admin modal -->
|
| 50 | <div class="modal fade" id="addDomainAdminModal" tabindex="-1" role="dialog" aria-hidden="true">
|
| 51 | <div class="modal-dialog modal-lg">
|
| 52 | <div class="modal-content">
|
| 53 | <div class="modal-header">
|
| 54 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
| 55 | <h3 class="modal-title"><?=$lang['admin']['add_domain_admin'];?></h3>
|
| 56 | </div>
|
| 57 | <div class="modal-body">
|
| 58 | <form class="form-horizontal" data-cached-form="true" data-id="add_domain_admin" role="form" method="post" autocomplete="off">
|
| 59 | <div class="form-group">
|
| 60 | <label class="control-label col-sm-2" for="username"><?=$lang['admin']['username'];?>:</label>
|
| 61 | <div class="col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 62 | <input type="text" class="form-control" name="username" onkeyup="this.value = this.value.toLowerCase();" required>
|
| 63 | ↳ <kbd>a-z - _ .</kbd>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 64 | </div>
|
| 65 | </div>
|
| 66 | <div class="form-group">
|
| 67 | <label class="control-label col-sm-2" for="name"><?=$lang['admin']['admin_domains'];?>:</label>
|
| 68 | <div class="col-sm-10">
|
| 69 | <select title="<?=$lang['admin']['search_domain_da'];?>" class="full-width-select" name="domains" size="5" multiple>
|
| 70 | <?php
|
| 71 | foreach (mailbox('get', 'domains') as $domain) {
|
| 72 | echo "<option>".htmlspecialchars($domain)."</option>";
|
| 73 | }
|
| 74 | ?>
|
| 75 | </select>
|
| 76 | </div>
|
| 77 | </div>
|
| 78 | <div class="form-group">
|
| 79 | <label class="control-label col-sm-2" for="password"><?=$lang['admin']['password'];?> (<a href="#" class="generate_password"><?=$lang['admin']['generate'];?></a>)</label>
|
| 80 | <div class="col-sm-10">
|
| 81 | <input type="password" class="form-control" data-pwgen-field="true" data-hibp="true" name="password" placeholder="" autocomplete="new-password" required>
|
| 82 | </div>
|
| 83 | </div>
|
| 84 | <div class="form-group">
|
| 85 | <label class="control-label col-sm-2" for="password2"><?=$lang['admin']['password_repeat'];?>:</label>
|
| 86 | <div class="col-sm-10">
|
| 87 | <input type="password" class="form-control" data-pwgen-field="true" name="password2" placeholder="" autocomplete="new-password" required>
|
| 88 | </div>
|
| 89 | </div>
|
| 90 | <div class="form-group">
|
| 91 | <div class="col-sm-offset-2 col-sm-10">
|
| 92 | <div class="checkbox">
|
| 93 | <label><input type="checkbox" value="1" name="active" checked> <?=$lang['admin']['active'];?></label>
|
| 94 | </div>
|
| 95 | </div>
|
| 96 | </div>
|
| 97 | <div class="form-group">
|
| 98 | <div class="col-sm-offset-2 col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 99 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_domain_admin" data-api-url='add/domain-admin' data-api-attr='{}' href="#"><i class="bi bi-plus-lg"></i> <?=$lang['admin']['add'];?></button>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 100 | </div>
|
| 101 | </div>
|
| 102 | </form>
|
| 103 | </div>
|
| 104 | </div>
|
| 105 | </div>
|
| 106 | </div><!-- add domain admin modal -->
|
| 107 | <!-- change fido2 fn -->
|
| 108 | <div class="modal fade" id="fido2ChangeFn" tabindex="-1" role="dialog" aria-hidden="true">
|
| 109 | <div class="modal-dialog modal-lg">
|
| 110 | <div class="modal-content">
|
| 111 | <div class="modal-header">
|
| 112 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
| 113 | <h3 class="modal-title"><?=$lang['fido2']['set_fn'];?></h3>
|
| 114 | <p class="help-block" style="word-break:break-all" id="fido2_subject_desc" data-fido2-subject=""></p>
|
| 115 | </div>
|
| 116 | <div class="modal-body">
|
| 117 | <form class="form-horizontal" data-cached-form="false" data-id="fido2ChangeFn" role="form" method="post" autocomplete="off">
|
| 118 | <input type="hidden" class="form-control" name="fido2_cid" id="fido2_cid">
|
| 119 | <div class="form-group">
|
| 120 | <label class="control-label col-sm-4" for="fido2_fn"><?=$lang['fido2']['fn'];?>:</label>
|
| 121 | <div class="col-sm-8">
|
| 122 | <input type="text" class="form-control" name="fido2_fn">
|
| 123 | </div>
|
| 124 | </div>
|
| 125 | <div class="form-group">
|
| 126 | <div class="col-sm-offset-4 col-sm-8">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 127 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="edit_selected" data-id="fido2ChangeFn" data-item="null" data-api-url='edit/fido2-fn' data-api-attr='{}' href="#"><?=$lang['admin']['save'];?></button>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 128 | </div>
|
| 129 | </div>
|
| 130 | </form>
|
| 131 | </div>
|
| 132 | </div>
|
| 133 | </div>
|
| 134 | </div><!-- add domain admin modal -->
|
| 135 | <!-- add oauth2 client modal -->
|
| 136 | <div class="modal fade" id="addOAuth2ClientModal" tabindex="-1" role="dialog" aria-hidden="true">
|
| 137 | <div class="modal-dialog modal-lg">
|
| 138 | <div class="modal-content">
|
| 139 | <div class="modal-header">
|
| 140 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
| 141 | <h3 class="modal-title">OAuth2</h3>
|
| 142 | </div>
|
| 143 | <div class="modal-body">
|
| 144 | <form class="form-horizontal" data-cached-form="true" data-id="add_oauth2_client" role="form" method="post">
|
| 145 | <div class="form-group">
|
| 146 | <label class="control-label col-sm-2" for="redirect_uri"><?=$lang['admin']['oauth2_redirect_uri'];?>:</label>
|
| 147 | <div class="col-sm-10">
|
| 148 | <input type="text" class="form-control" name="redirect_uri" required>
|
| 149 | </div>
|
| 150 | </div>
|
| 151 | <div class="form-group">
|
| 152 | <div class="col-sm-offset-2 col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 153 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_oauth2_client" data-api-url='add/oauth2-client' data-api-attr='{}' href="#"><i class="bi bi-plus-lg"></i> <?=$lang['admin']['add'];?></button>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 154 | </div>
|
| 155 | </div>
|
| 156 | </form>
|
| 157 | </div>
|
| 158 | </div>
|
| 159 | </div>
|
| 160 | </div><!-- add domain admin modal -->
|
| 161 | <!-- add admin modal -->
|
| 162 | <div class="modal fade" id="addAdminModal" tabindex="-1" role="dialog" aria-hidden="true">
|
| 163 | <div class="modal-dialog modal-lg">
|
| 164 | <div class="modal-content">
|
| 165 | <div class="modal-header">
|
| 166 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
| 167 | <h3 class="modal-title"><?=$lang['admin']['add_admin'];?></h3>
|
| 168 | </div>
|
| 169 | <div class="modal-body">
|
| 170 | <form class="form-horizontal" data-cached-form="true" data-id="add_admin" role="form" method="post" autocomplete="off">
|
| 171 | <div class="form-group">
|
| 172 | <label class="control-label col-sm-2" for="username"><?=$lang['admin']['username'];?>:</label>
|
| 173 | <div class="col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 174 | <input type="text" class="form-control" name="username" onkeyup="this.value = this.value.toLowerCase();" required>
|
| 175 | ↳ <kbd>a-z - _ .</kbd>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 176 | </div>
|
| 177 | </div>
|
| 178 | <div class="form-group">
|
| 179 | <label class="control-label col-sm-2" for="password"><?=$lang['admin']['password'];?> (<a href="#" class="generate_password"><?=$lang['admin']['generate'];?></a>):</label>
|
| 180 | <div class="col-sm-10">
|
| 181 | <input type="password" class="form-control" data-pwgen-field="true" data-hibp="true" name="password" placeholder="" autocomplete="new-password" required>
|
| 182 | </div>
|
| 183 | </div>
|
| 184 | <div class="form-group">
|
| 185 | <label class="control-label col-sm-2" for="password2"><?=$lang['admin']['password_repeat'];?>:</label>
|
| 186 | <div class="col-sm-10">
|
| 187 | <input type="password" class="form-control" data-pwgen-field="true" name="password2" placeholder="" autocomplete="new-password" required>
|
| 188 | </div>
|
| 189 | </div>
|
| 190 | <div class="form-group">
|
| 191 | <div class="col-sm-offset-2 col-sm-10">
|
| 192 | <div class="checkbox">
|
| 193 | <label><input type="checkbox" value="1" name="active" checked> <?=$lang['admin']['active'];?></label>
|
| 194 | </div>
|
| 195 | </div>
|
| 196 | </div>
|
| 197 | <div class="form-group">
|
| 198 | <div class="col-sm-offset-2 col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 199 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-success" data-action="add_item" data-id="add_admin" data-api-url='add/admin' data-api-attr='{}' href="#"><i class="bi bi-plus-lg"></i> <?=$lang['admin']['add'];?></button>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 200 | </div>
|
| 201 | </div>
|
| 202 | </form>
|
| 203 | </div>
|
| 204 | </div>
|
| 205 | </div>
|
| 206 | </div><!-- add admin modal -->
|
| 207 | <!-- test transport modal -->
|
| 208 | <div class="modal fade" id="testTransportModal" tabindex="-1" role="dialog" aria-hidden="true">
|
| 209 | <div class="modal-dialog modal-lg">
|
| 210 | <div class="modal-content">
|
| 211 | <div class="modal-header">
|
| 212 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 213 | <h3 class="modal-title"><i class="bi bi-info-circle-fill"></i> Transport</h3>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 214 | </div>
|
| 215 | <div class="modal-body">
|
| 216 | <form class="form-horizontal" data-cached-form="true" id="test_transport_form" role="form" method="post">
|
| 217 | <input type="hidden" class="form-control" name="transport_id" id="transport_id">
|
| 218 | <input type="hidden" class="form-control" name="transport_type" id="transport_type">
|
| 219 | <div class="form-group">
|
| 220 | <label class="control-label col-sm-2" for="mail_from"><?=$lang['admin']['relay_from'];?></label>
|
| 221 | <div class="col-sm-10">
|
| 222 | <input type="text" class="form-control" name="mail_from" placeholder="relay@example.org">
|
| 223 | </div>
|
| 224 | </div>
|
| 225 | <div class="form-group">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 226 | <label class="control-label col-sm-2" for="mail_rcpt"><?=$lang['admin']['relay_rcpt'];?></label>
|
| 227 | <div class="col-sm-10">
|
| 228 | <input type="text" class="form-control" name="mail_rcpt" placeholder="null@hosted.mailcow.de" value="null@hosted.mailcow.de">
|
| 229 | <p class="help-block"><?=$lang['admin']['transport_test_rcpt_info'];?></p>
|
| 230 | </div>
|
| 231 | </div>
|
| 232 | <div class="form-group">
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 233 | <div class="col-sm-offset-2 col-sm-10">
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 234 | <button class="btn btn-xs-lg visible-xs-block visible-sm-inline visible-md-inline visible-lg-inline btn-default" id="test_transport" href="#"><?=$lang['admin']['relay_run'];?></button>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 235 | </div>
|
| 236 | </div>
|
| 237 | </form>
|
| 238 | <hr>
|
| 239 | <div id="test_transport_result" style="font-size:10pt">-</div>
|
| 240 | </div>
|
| 241 | </div>
|
| 242 | </div>
|
| 243 | </div><!-- test transport modal -->
|
| 244 | <!-- show queue item modal -->
|
| 245 | <div class="modal fade" id="showQueuedMsg" tabindex="-1" role="dialog" aria-hidden="true">
|
| 246 | <div class="modal-dialog modal-lg">
|
| 247 | <div class="modal-content">
|
| 248 | <div class="modal-header">
|
| 249 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 250 | <h3 class="modal-title"><i class="bi bi-card-checklist" style="font-size:18px"></i> ID <span id="queue_id"></span></h3>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 251 | </div>
|
| 252 | <div class="modal-body">
|
| 253 | <textarea class="form-control" id="queue_msg_content" name="content" rows="40"></textarea>
|
| 254 | </div>
|
| 255 | </div>
|
| 256 | </div>
|
| 257 | </div><!-- show queue item modal -->
|
| 258 | <!-- priv key modal -->
|
| 259 | <div class="modal fade" id="showDKIMprivKey" tabindex="-1" role="dialog" aria-hidden="true">
|
| 260 | <div class="modal-dialog">
|
| 261 | <div class="modal-content">
|
| 262 | <div class="modal-header">
|
| 263 | <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span></button>
|
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 264 | <h3 class="modal-title"><i class="bi bi-key-fill"></i> Private key</h3>
|
Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 265 | </div>
|
| 266 | <div class="modal-body">
|
| 267 | <pre id="priv_key_pre"></pre>
|
| 268 | </div>
|
| 269 | </div>
|
| 270 | </div>
|
| 271 | </div><!-- priv key modal -->
|