Commit eec52e87 authored by Charlie Jacomme's avatar Charlie Jacomme
parents c04f1170 51dcb049
......@@ -2,3 +2,4 @@ config.ini
**/__pycache__/**
**.list
generated/*
aliases_local
[submodule "re2oapi"]
path = re2oapi
url = https://gitlab.federez.net/re2o/re2oapi.git
url = https://gitlab.adm.crans.org/nounous/re2o-re2oapi.git
......@@ -23,7 +23,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")
def generate(api_client):
# Création de l'environnement Jinja
......
# 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 %}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment