<commit_before>postlicyd.conf-srs(5)
=====================
:doctype: manpage
include:../mk/asciidoc.conf[]

NAME
----
postlicyd.conf-srs - configuration of the SRS filter of postlicyd

SYNOPSIS
--------
This +srs+ allow early elimination of invalid +SRS+ emails.

This filter type has been introduced in +postlicyd+ 0.9.

PARAMETERS
----------
Its parameters are:

+bounce_domain = string ;+::
    Domain of the bounces.

+secret_file = path ;+::
    File with the SRS secret. This file can the same as the one used by
linkgit:pfix-srsd[8,../pfix-srsd/pfix-srsd.html].

RESULTS
-------
Possible results are:

* +none+: The recipient is not in the bounce domain and the SRS filter cannot be applied to it.
* +match+: The recipient is in the bounce domain and it's a valid SRS-encoded address.
* +fail+: The recipient is in the bounce domain but it's not a valid SRS-encoded address.

EXAMPLE
-------
The following example filter setup checks for bounces and validates the bounce domain and SRS address.

----
# First we check the sender is empty, meaning it's a bounce: MAIL FROM: <>
check_srs_bounce {
    type = match;
    condition = sender #=;
    on_match = check_srs_hash;
    on_fail = postfix:DUNNO;
}

# Now we check the bounce domain matches, and the hash is valid, with the SRS filter
check_srs_hash {
    type = srs;
    bounce_domain = bounces.example.com;
    secret_file = /etc/pfixtools/pfix-srsd-secrets;
    on_match = postfix:DUNNO;
    on_none = postfix:REJECT Invalid bounce domain;
    on_fail = postfix:REJECT Invalid sender for SRS bounces;
}

# SRS is checked at smtpd_recipient_restrictions
recipient_filter = check_srs_bounce;
----

To activate this you may have something such as the following in postfix's main.cf:

----
smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    check_policy_service unix:/var/run/postlicyd/postlicyd.sock,
    reject_unauth_destination
----

COPYRIGHT
---------
Copyright 2009-2012 the Postfix Tools Suite Authors. License BSD.

// vim:filetype=asciidoc:tw=78<commit_msg>Show a TCP table example first, as it is default<commit_after>postlicyd.conf-srs(5)
=====================
:doctype: manpage
include:../mk/asciidoc.conf[]

NAME
----
postlicyd.conf-srs - configuration of the SRS filter of postlicyd

SYNOPSIS
--------
This +srs+ allow early elimination of invalid +SRS+ emails.

This filter type has been introduced in +postlicyd+ 0.9.

PARAMETERS
----------
Its parameters are:

+bounce_domain = string ;+::
    Domain of the bounces.

+secret_file = path ;+::
    File with the SRS secret. This file can the same as the one used by
linkgit:pfix-srsd[8,../pfix-srsd/pfix-srsd.html].

RESULTS
-------
Possible results are:

* +none+: The recipient is not in the bounce domain and the SRS filter cannot be applied to it.
* +match+: The recipient is in the bounce domain and it's a valid SRS-encoded address.
* +fail+: The recipient is in the bounce domain but it's not a valid SRS-encoded address.

EXAMPLE
-------
The following example filter setup checks for bounces and validates the bounce domain and SRS address.

----
# First we check the sender is empty, meaning it's a bounce: MAIL FROM: <>
check_srs_bounce {
    type = match;
    condition = sender #=;
    on_match = check_srs_hash;
    on_fail = postfix:DUNNO;
}

# Now we check the bounce domain matches, and the hash is valid, with the SRS filter
check_srs_hash {
    type = srs;
    bounce_domain = bounces.example.com;
    secret_file = /etc/pfixtools/pfix-srsd-secrets;
    on_match = postfix:DUNNO;
    on_none = postfix:REJECT Invalid bounce domain;
    on_fail = postfix:REJECT Invalid sender for SRS bounces;
}

# SRS is checked at smtpd_recipient_restrictions
recipient_filter = check_srs_bounce;
----

To activate this you may have something such as the following in postfix's main.cf:

----
smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    check_policy_service tcp:127.0.0.1:10000,
    reject_unauth_destination
----

When using a unix socket file it may look like this instead:

----
smtpd_recipient_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    check_policy_service unix:/var/run/postlicyd/postlicyd.sock,
    reject_unauth_destination
----

COPYRIGHT
---------
Copyright 2009-2012 the Postfix Tools Suite Authors. License BSD.

// vim:filetype=asciidoc:tw=78
{'fraction_non_alphanumeric': 0.10984762337957699, 'fraction_numerical': 0.00886968387536957, 'mean_word_length': 3.543388429752066, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1672499', 'n_tokens_mistral': 1525, 'n_tokens_neox': 1446, 'n_words': 478}