update templates for new re2o names
This commit is contained in:
parent
60c3f1032f
commit
51dcb049cf
2 changed files with 5 additions and 5 deletions
2
main.py
2
main.py
|
@ -22,7 +22,7 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
|
|||
|
||||
client_hostname = socket.gethostname().split('.', 1)[0]
|
||||
|
||||
all_users = api_client.list("mail/alias")
|
||||
all_users = api_client.list("localemail/users")
|
||||
|
||||
# Création de l'environnement Jinja
|
||||
env = Environment(loader=FileSystemLoader('.'))
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# Liste d'association alias:addresse des users
|
||||
{%- for user in data -%}
|
||||
{%- for alias in user.get_mail_aliases -%}
|
||||
{%- if user.redirection -%}
|
||||
{{alias.valeur}}:{{ user.get_mail }}
|
||||
{%- for alias in user.email_address -%}
|
||||
{%- if user.local_email_redirect -%}
|
||||
{{alias.complete_email_address}}:{{ user.email }}
|
||||
{%- else -%}
|
||||
{{alias.valeur}}:{{ user.pseudo }}
|
||||
{{alias.complete_email_address}}:{{ alias.user }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue