diff --git a/main.py b/main.py index 6a7d7a3..eb9d644 100755 --- a/main.py +++ b/main.py @@ -21,8 +21,12 @@ config.read(path+'/config.ini') api_hostname = config.get('Re2o', 'hostname') api_password = config.get('Re2o', 'password') 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] diff --git a/templates/list_alias b/templates/list_alias index 77df135..76788cf 100644 --- a/templates/list_alias +++ b/templates/list_alias @@ -4,8 +4,9 @@ {% for user in data -%} {%- for alias in user.email_address -%} {%- if user.local_email_redirect -%} -{% else %} -{{ alias.local_part }}:{{ alias.user }} +{{ alias.local_part }}:{{ user.email|lower }} +{%- else -%} +{{ alias.local_part }}:{{ alias.user|lower }} {% endif %} {%- endfor -%} {%- endfor -%}