Merge branch 'master' of https://gitlab.crans.org/nounous/re2o-mail-server
This commit is contained in:
commit
eec52e8718
4 changed files with 7 additions and 6 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@ config.ini
|
||||||
**/__pycache__/**
|
**/__pycache__/**
|
||||||
**.list
|
**.list
|
||||||
generated/*
|
generated/*
|
||||||
|
aliases_local
|
||||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
||||||
[submodule "re2oapi"]
|
[submodule "re2oapi"]
|
||||||
path = re2oapi
|
path = re2oapi
|
||||||
url = https://gitlab.federez.net/re2o/re2oapi.git
|
url = https://gitlab.adm.crans.org/nounous/re2o-re2oapi.git
|
||||||
|
|
2
main.py
2
main.py
|
@ -23,7 +23,7 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
|
||||||
|
|
||||||
client_hostname = socket.gethostname().split('.', 1)[0]
|
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):
|
def generate(api_client):
|
||||||
# Création de l'environnement Jinja
|
# Création de l'environnement Jinja
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Liste d'association alias:addresse des users
|
# Liste d'association alias:addresse des users
|
||||||
{%- for user in data -%}
|
{%- for user in data -%}
|
||||||
{%- for alias in user.get_mail_aliases -%}
|
{%- for alias in user.email_address -%}
|
||||||
{%- if user.redirection -%}
|
{%- if user.local_email_redirect -%}
|
||||||
{{alias.valeur}}:{{ user.get_mail }}
|
{{alias.complete_email_address}}:{{ user.email }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
{{alias.valeur}}:{{ user.pseudo }}
|
{{alias.complete_email_address}}:{{ alias.user }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in a new issue