Compare commits

..

3 commits

Author SHA1 Message Date
Hugo Levy-Falk
c89d3ad1d2 I need TLS 2020-06-13 13:45:01 +02:00
root
1856ef7f5e Merge branch 'crans' 2020-05-28 22:55:27 +02:00
Otthorn
894b129acb Minuscule pour la redirection des mail 2018-12-08 17:41:42 +01:00
2 changed files with 8 additions and 3 deletions

View file

@ -21,8 +21,12 @@ config.read(path+'/config.ini')
api_hostname = config.get('Re2o', 'hostname') api_hostname = config.get('Re2o', 'hostname')
api_password = config.get('Re2o', 'password') api_password = config.get('Re2o', 'password')
api_username = config.get('Re2o', 'username') api_username = config.get('Re2o', 'username')
if 'use_tls' in config['Re2o']:
use_tls = config.get('Re2o', 'use_tls')
else:
us_tls = False
api_client = Re2oAPIClient(api_hostname, api_username, api_password, use_tls=False) api_client = Re2oAPIClient(api_hostname, api_username, api_password, use_tls=use_tls)
client_hostname = socket.gethostname().split('.', 1)[0] client_hostname = socket.gethostname().split('.', 1)[0]

View file

@ -4,8 +4,9 @@
{% for user in data -%} {% for user in data -%}
{%- for alias in user.email_address -%} {%- for alias in user.email_address -%}
{%- if user.local_email_redirect -%} {%- if user.local_email_redirect -%}
{% else %} {{ alias.local_part }}:{{ user.email|lower }}
{{ alias.local_part }}:{{ alias.user }} {%- else -%}
{{ alias.local_part }}:{{ alias.user|lower }}
{% endif %} {% endif %}
{%- endfor -%} {%- endfor -%}
{%- endfor -%} {%- endfor -%}