{% macro display_greylisting_setting(account, gl_setting) -%} {# @gl_setting is sql query result of per-account greylisting setting. #} {# Defaults to global setting: account == '@.' #} {% set account_type = 'global' %} {% set label = _('Greylisting service') %} {# Detect account type #} {% if account == '@.' %} {% set account_type = 'global' %} {% elif account.startswith('@') %} {% set account_type = 'domain' %} {% set label = _('Greylisting service for this domain') %} {% elif '@' in account %} {% set account_type = 'user' %} {% set label = _('Greylisting service for this user') %} {% endif %} {# is_greylisted: @None - Inherit global setting (no greylisting setting found) @True - Explicitly enabled @False - Explicitly disabled #} {% set is_greylisted = None %} {% if gl_setting.active == 1 %} {% set is_greylisted = True %} {% elif gl_setting.active == 0 %} {% set is_greylisted = False %} {% endif %}
{{ _("This feature requires iRedAPD plugin 'wblist_rdns', please make sure it's enabled in file /opt/iredapd/settings.py.") }}
| {{ _('Time') }} | {{ _('Client Address') }} | {{ _('Auth Username') }} | {{ _('Envelope Sender') }} | {{ _('Recipient') }} | {{ _('Encryption Protocol') }} |
|---|---|---|---|---|---|
| {{ row['time'] | utc_to_timezone(timezone=session.get('timezone')) }} | {{ client_address }} | {{ sasl_username }} | {{ sender }} | {{ recipient }} | {{ encryption_protocol }} |
| {{ _('No SMTP authentication activity.') }} | |||||
| {{ _('Time') }} | {{ _('Client Address') }} | {{ _('Auth Username') }} | {{ _('Envelope Sender') }} | {{ _('Recipient') }} | {{ _('SMTP Action') }} | {{ _('Rejection Reason') }} |
|---|---|---|---|---|---|---|
| {{ row['time'] | utc_to_timezone(timezone=session.get('timezone')) }} | {{ client_address }} {% if session.get('is_global_admin') %} {% if _is_whitelisted %} {{ _('Whitelisted') }} {% elif _is_senderscore or _is_greylisting %} {# Display a button to whitelist this IP address. #} {{ _('Whitelist') }} {% endif %} {% endif %} | {{ sasl_username }} | {{ sender }} | {{ recipient }} | {%- if action == 'DUNNO' -%} {{ _('Dunno') }} {%- elif action == 'OK' -%} {{ _('Whitelisted') }} {%- else %} {% if _is_greylisting %} {{ _('Greylisted') }} {%- else -%} {{ action }} {%- endif -%} {%- endif -%} | {% if action not in ['DUNNO', 'OK', '451'] %}{{ reason }}{% endif %} |
| {{ _('No matched SMTP sessions.') }} | ||||||