| 1 | {**************************************************************************} |
| 2 | {* *} |
| 3 | {* Copyright (C) 2003-2010 Polytechnique.org *} |
| 4 | {* http://opensource.polytechnique.org/ *} |
| 5 | {* *} |
| 6 | {* This program is free software; you can redistribute it and/or modify *} |
| 7 | {* it under the terms of the GNU General Public License as published by *} |
| 8 | {* the Free Software Foundation; either version 2 of the License, or *} |
| 9 | {* (at your option) any later version. *} |
| 10 | {* *} |
| 11 | {* This program is distributed in the hope that it will be useful, *} |
| 12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
| 13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
| 14 | {* GNU General Public License for more details. *} |
| 15 | {* *} |
| 16 | {* You should have received a copy of the GNU General Public License *} |
| 17 | {* along with this program; if not, write to the Free Software *} |
| 18 | {* Foundation, Inc., *} |
| 19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
| 20 | {* *} |
| 21 | {**************************************************************************} |
| 22 | |
| 23 | <h1> |
| 24 | Tes adresses de redirection |
| 25 | </h1> |
| 26 | <p> |
| 27 | Tu configures ici les adresses emails vers lesquelles tes adresses (listées ci-dessous) sont redirigées : |
| 28 | </p> |
| 29 | <ul> |
| 30 | {if $melix} |
| 31 | <li> |
| 32 | <strong>{$melix}@{#globals.mail.alias_dom#}</strong>, |
| 33 | <strong>{$melix}@{#globals.mail.alias_dom2#}</strong> |
| 34 | </li> |
| 35 | {/if} |
| 36 | {foreach from=$alias item=a} |
| 37 | <li> |
| 38 | <strong>{$a.alias}@{#globals.mail.domain#}</strong> |
| 39 | {if $a.expire}<span class='erreur'>(expire le {$a.expire|date_format})</span>{/if} |
| 40 | </li> |
| 41 | {/foreach} |
| 42 | </ul> |
| 43 | <p> |
| 44 | Le routage est en place pour les adresses dont la case "<strong>Actif</strong>" est cochée. |
| 45 | Si tu modifies souvent ton routage, tu as tout intérêt à rentrer toutes les |
| 46 | adresses qui sont susceptibles de recevoir ton routage, de sorte qu'en |
| 47 | jouant avec les cases "<strong>Actif</strong>" tu pourras facilement mettre en place les unes |
| 48 | ou bien les autres. |
| 49 | </p> |
| 50 | <p> |
| 51 | Enfin, la <strong>réécriture</strong> consiste à substituer à ton adresse email habituelle |
| 52 | (adresse gmail, orange, free…) ton adresse {#globals.mail.domain#} ou |
| 53 | {#globals.mail.domain2#} dans l'adresse d'expédition de tes messages, lorsqu'un email |
| 54 | passe par nos serveurs. Ceci arrive lorsque tu écris à un camarade sur son adresse {#globals.mail.domain#} ou |
| 55 | {#globals.mail.domain2#}, ou lorsque tu utilises notre |
| 56 | <a href="Xorg/SMTPSecurise">service d'envoi d'email SMTP sécurisé</a>. |
| 57 | </p> |
| 58 | |
| 59 | {javascript name=ajax} |
| 60 | <script type="text/javascript">//<![CDATA[ |
| 61 | {literal} |
| 62 | function activeEnable() |
| 63 | { |
| 64 | var remove = $(".active_email:checked"); |
| 65 | if (remove.length <= 1) { |
| 66 | remove.attr("disabled", "disabled"); |
| 67 | remove.parent('td').parent('tr').children('td').children('.remove_email').hide(); |
| 68 | } else { |
| 69 | remove.removeAttr("disabled"); |
| 70 | $('.remove_email').show(); |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | function redirectUpdate() |
| 75 | { |
| 76 | showTempMessage('redirect-msg', "Tes redirections ont été mises à jour.", true); |
| 77 | activeEnable(); |
| 78 | } |
| 79 | |
| 80 | function removeRedirect(link, email) |
| 81 | { |
| 82 | if (confirm("Supprimer l'adresse " + email + " ?")) { |
| 83 | $.get(link.href, {},function() { |
| 84 | $('#line_' + email.replace('@', '_at_').replace('.','\\.')).remove(); |
| 85 | showRemove(); |
| 86 | activeEnable(); |
| 87 | }); |
| 88 | } |
| 89 | return false; |
| 90 | } |
| 91 | |
| 92 | function showRemove() |
| 93 | { |
| 94 | var removeLinks = $('.remove_email'); |
| 95 | if (removeLinks.length == 1) { |
| 96 | removeLinks.hide(); |
| 97 | } else { |
| 98 | removeLinks.show(); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | function updateRedirect(checked, email) |
| 103 | { |
| 104 | activeEnable(); |
| 105 | Ajax.update_html(null, 'emails/redirect/' + (checked ? '' : 'in') + 'active/' + email, redirectUpdate); |
| 106 | } |
| 107 | |
| 108 | function rewriteUpdate(mail, allow, box) |
| 109 | { |
| 110 | return function() { |
| 111 | if (!allow) { |
| 112 | if (box.value != '') { |
| 113 | alert("Un mail de validation vient d'être envoyé sur " + mail |
| 114 | + ". La réécriture ne sera active que lorsque tu auras cliqué sur le lien indiqué dans ce mail."); |
| 115 | } |
| 116 | } |
| 117 | redirectUpdate(); |
| 118 | }; |
| 119 | } |
| 120 | |
| 121 | {/literal} |
| 122 | //]]></script> |
| 123 | {test_email} |
| 124 | <div id="redirect-msg" style="position:absolute;"></div><br /> |
| 125 | <div class="center"> |
| 126 | <form action="emails/redirect" method="post"> |
| 127 | <table class="bicol" summary="Adresses de redirection"> |
| 128 | <tr> |
| 129 | <th>Redirection</th> |
| 130 | <th>Actif</th> |
| 131 | <th>Réécriture</th> |
| 132 | <th> </th> |
| 133 | </tr> |
| 134 | {foreach from=$emails item=e name=redirect} |
| 135 | <tr class="{cycle values="pair,impair"}" id="line_{$e->email|replace:'@':'_at_'}"> |
| 136 | <td> |
| 137 | <strong> |
| 138 | {if $e->broken}<span class="erreur">{assign var="erreur" value="1"}{/if} |
| 139 | {if $e->panne neq '0000-00-00'}{assign var="panne" value="1"}{icon name=error title="En panne"}{/if} |
| 140 | {$e->display_email} |
| 141 | {if $e->broken}</span>{/if} |
| 142 | </strong> |
| 143 | </td> |
| 144 | <td> |
| 145 | <input type="checkbox" value="{$e->email}" {if $e->sufficient}class="active_email"{/if} |
| 146 | {if $e->active}checked="checked"{/if} |
| 147 | {if $smarty.foreach.redirect.total eq 1}disabled="disabled"{/if} |
| 148 | onchange="updateRedirect(this.checked, '{$e->email}')" /></td> |
| 149 | <td style="text-align: left"> |
| 150 | {if $e->has_rewrite()} |
| 151 | <select onchange="Ajax.update_html(null,'emails/redirect/rewrite/{$e->email}/'+this.value, rewriteUpdate('{$e->email}', {$e->allow_rewrite|default:"0"}, this))"> |
| 152 | <option value=''>--- aucune ---</option> |
| 153 | {assign var=dom1 value=#globals.mail.domain#} |
| 154 | {assign var=dom2 value=#globals.mail.domain2#} |
| 155 | {foreach from=$alias item=a} |
| 156 | <option {if $e->rewrite eq "`$a.alias`@`$dom1`"}selected='selected'{/if} |
| 157 | value='{$a.alias}@{#globals.mail.domain#}'>{$a.alias}@{#globals.mail.domain#}</option> |
| 158 | <option {if $e->rewrite eq "`$a.alias`@`$dom2`"}selected='selected'{/if} |
| 159 | value='{$a.alias}@{#globals.mail.domain2#}'>{$a.alias}@{#globals.mail.domain2#}</option> |
| 160 | {/foreach} |
| 161 | </select> |
| 162 | {if $e->rewrite neq '' && !$e->allow_rewrite}{icon name="error" title="en attente de validation"}{/if} |
| 163 | {else} |
| 164 | <em>pas de réécriture</em> |
| 165 | {/if} |
| 166 | </td> |
| 167 | <td> |
| 168 | {if $e->is_removable()} |
| 169 | <a href="emails/redirect/remove/{$e->email}" |
| 170 | class="remove_email" |
| 171 | onclick="return removeRedirect(this, "{$e->email}");" > |
| 172 | {icon name=cross title="Supprimer"} |
| 173 | </a> |
| 174 | {else} |
| 175 | {if $e->sufficient}<span class="remove_email"><span style="display:none"> </span></span>{/if} |
| 176 | <a href="emails/redirect#{$e->email}">{icon name=information title="Plus d'informations"}</a> |
| 177 | {/if} |
| 178 | </td> |
| 179 | </tr> |
| 180 | {/foreach} |
| 181 | {cycle values="pair,impair" assign=class_combobox} |
| 182 | {$error_email} |
| 183 | {include file="include/emails.combobox.tpl" name="email" val=$email class=$class_combobox error=$error_email i="0"} |
| 184 | <tr class="{$class_combobox}"><td colspan="4"><div> |
| 185 | <input type="submit" value="ajouter" name="emailop" /> |
| 186 | {xsrf_token_field} |
| 187 | </div></td></tr> |
| 188 | </table> |
| 189 | </form> |
| 190 | <script type="text/javascript">showRemove(); activeEnable();</script> |
| 191 | </div> |
| 192 | <p class="smaller center"> |
| 193 | Légende : {icon name=cross title="Supprimer"} Supprimer la redirection |
| 194 | - {icon name=information title="Plus d'informations"} Plus d'informations |
| 195 | </p> |
| 196 | {if $panne} |
| 197 | <p class="smaller"> |
| 198 | <strong> |
| 199 | {icon name=error title="En panne"} |
| 200 | <a href="Xorg/Pannes">Panne :</a> |
| 201 | </strong> |
| 202 | les adresses marquées de cette icône sont des adresses de redirection pour lesquelles une panne |
| 203 | a été détectée. Si le problème persiste, la redirection vers ces adresses sera désactivée. |
| 204 | </p> |
| 205 | {/if} |
| 206 | {if $erreur} |
| 207 | <p class="smaller"> |
| 208 | <strong> |
| 209 | {icon name=error title="En panne"} |
| 210 | <a href="Xorg/Pannes" style="color: #f00">Panne durable :</a> |
| 211 | </strong> |
| 212 | les adresses en rouge sont des adresses qui ont été désactivées en raison d'un grand nombre de pannes. Si tu penses que |
| 213 | le problème est résolu, tu peux les réactiver, mais l'adresse sera redésactivée si les problèmes persistent. |
| 214 | </p> |
| 215 | {/if} |
| 216 | {if $smarty.session.mx_failures|@count} |
| 217 | <fieldset> |
| 218 | <legend>{icon name=error} Des problèmes sont actuellement recontrés sur tes redirections suivantes</legend> |
| 219 | {foreach from=$smarty.session.mx_failures item=mail} |
| 220 | <div> |
| 221 | <span class="erreur">{$mail.mail}</span> |
| 222 | <div class="explication">{$mail.text}</div> |
| 223 | </div> |
| 224 | {/foreach} |
| 225 | </fieldset> |
| 226 | {/if} |
| 227 | |
| 228 | {if #globals.mailstorage.googleapps_active# or #globals.mailstorage.imap_active# or hasPerm('admin') or $googleapps} |
| 229 | <h1>Tes comptes de stockage d'emails</h1> |
| 230 | {/if} |
| 231 | {if #globals.mailstorage.imap_active# or hasPerm('admin')} |
| 232 | <p id="imap"> |
| 233 | Polytechnique.org te propose de conserver les emails que tu reçois, pendant une durée limitée (environ 30 jours). |
| 234 | Grâce à ce service, tu disposes d'une sauvegarde de tes emails en secours, au cas où, par exemple, tu effacerais |
| 235 | un email par erreur.<br /> |
| 236 | <strong>Attention :</strong> il ne s'agit que d'un service de secours, dont la disponibilité n'est pas garantie. |
| 237 | </p> |
| 238 | |
| 239 | <table class="bicol" summary="Compte de stockage"> |
| 240 | <col width="55%" /> |
| 241 | <col width="45%" /> |
| 242 | <tr> |
| 243 | <th colspan="2">Compte de stockage</th> |
| 244 | </tr> |
| 245 | <tr class="pair"> |
| 246 | <td> |
| 247 | <a href="Xorg/IMAP"> |
| 248 | <strong>Accès de secours aux emails (IMAP)</strong> |
| 249 | </a><br />Hébergé par Polytechnique.org |
| 250 | </td> |
| 251 | <td style="text-align: center; vertical-align: middle"> |
| 252 | <a href="emails/redirect#line_imap">Voir l'état de la redirection vers l'IMAP</a> |
| 253 | </td> |
| 254 | </tr> |
| 255 | </table> |
| 256 | {/if} |
| 257 | |
| 258 | {if #globals.mailstorage.googleapps_active# or hasPerm('admin') or $googleapps} |
| 259 | <br /> |
| 260 | <p id="googleapps"> |
| 261 | Grâce à un partenariat avec Google, Polytechnique.org te propose également un compte |
| 262 | <b>Google Apps</b>, qui te permet de disposer des services Google (GMail pour |
| 263 | tes emails, Google Calendar, Google Docs…) sur une adresse polytechnique.org. |
| 264 | </p> |
| 265 | |
| 266 | <table class="bicol" summary="Compte de stockage"> |
| 267 | <col width="55%" /> |
| 268 | <col width="45%" /> |
| 269 | <tr> |
| 270 | <th colspan="2">Compte de stockage</th> |
| 271 | </tr> |
| 272 | <tr class="pair"> |
| 273 | {if $googleapps eq 'active'} |
| 274 | <td> |
| 275 | <a href="googleapps"> |
| 276 | <strong>Compte Google Apps / Polytechnique.org</strong> |
| 277 | </a><br />Hébergé par Google |
| 278 | </td> |
| 279 | <td style="text-align: center; vertical-align: middle"> |
| 280 | Ton compte Google Apps est actif.<br /> |
| 281 | <a href="emails/redirect#line_googleapps">Voir l'état de la redirection vers GMail</a> |
| 282 | </td> |
| 283 | {else} |
| 284 | <td colspan="2"> |
| 285 | {if $googleapps eq 'disabled'} |
| 286 | Ton compte Google Apps est actuellement inactif.<br /> |
| 287 | {else} |
| 288 | Tu n'as pas encore de compte Google Apps pour Polytechnique.org.<br /> |
| 289 | {/if} |
| 290 | <a href="googleapps">Plus d'informations …</a> |
| 291 | </td> |
| 292 | {/if} |
| 293 | </tr> |
| 294 | </table> |
| 295 | {/if} |
| 296 | |
| 297 | {if $eleve} |
| 298 | <h1>Pour les élèves (non encore diplômés)</h1> |
| 299 | <p> |
| 300 | L'X te fournit aussi une adresse à vie en <strong>«prenom.nom»@polytechnique.edu</strong> qui par défaut est |
| 301 | une redirection vers «login»@poly.polytechnique.fr. <a href="https://www.mail.polytechnique.edu/"> |
| 302 | Tu peux modifier cette redirection</a> et la faire pointer vers ton adresse |
| 303 | {$user->forlifeEmail()} (attention, cela demande de la concentration). |
| 304 | </p> |
| 305 | <p> |
| 306 | Si tu utilises le service POP de poly pour récupérer tes emails dans ton logiciel de courrier, |
| 307 | l'équipe de Polytechnique.org te conseille de rediriger : |
| 308 | </p> |
| 309 | <ul> |
| 310 | <li>«prenom.nom»@polytechnique.edu vers {$user->forlifeEmail()} ;</li> |
| 311 | <li>{$user->forlifeEmail()} vers «login»@poly.polytechnique.fr.</li> |
| 312 | </ul> |
| 313 | <p> |
| 314 | Attention à ne pas faire une boucle quand tu manipules tes redirections ! Tes emails seraient |
| 315 | alors perdus, jusqu'à ce que tu règles le problème. |
| 316 | </p> |
| 317 | {/if} |
| 318 | |
| 319 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |