---
name: "Mail::MtPolicyd::Plugin::SPF"
section: "3pm"
platform: "linux"
package: "mtpolicyd"
version: "2.05-1.2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Mail::MtPolicyd::Plugin::SPF"
---

# Mail::MtPolicyd::Plugin::SPF(3pm)

mtpolicyd plugin to apply SPF checks

## NAME

Mail::MtPolicyd::Plugin::SPF - mtpolicyd plugin to apply SPF checks

## VERSION

version 2.05

## DESCRIPTION

This plugin applies Sender Policy Framework(SPF) checks.

Checks are implemented using the Mail::SPF perl module.

Actions based on the SPF result can be applied for:

- pass (pass\_mode, default: passive)

  - softfail (softfail\_mode, default: passive)

  - fail (fail\_mode, default: reject)

  - temperror (temperror\_mode, default: defer)

  - permerror (permerror\_mode, default: reject)

  For status 'neutral' no action or score is applied.

## PARAMETERS

- (uc\_)enabled (default: on)

  Enable/disable the plugin.

- (uc\_)pass\_mode (default: passive)

  How to behave if the SPF checks passed successfully:

  - passive

    Just apply score. Do not return an action.

  - accept, dunno

    Will return an 'dunno' action.

- pass\_score (default: empty)

  Score to apply when the sender has been successfully checked against SPF.

- (uc\_)softfail\_mode (default: passive)

  How to behave if the SPF checks returned a softfail status.

  - passive

    Just apply score. Do not return an action.

  - accept, dunno

    Will return an 'dunno' action.

  - reject

    Return an reject action.

- softfail\_score (default: empty)

  Score to apply when the SPF check returns an softfail status.

- (uc\_)fail\_mode (default: reject)

  - reject

    Return an reject action.

  - passive

    Just apply score and do not return an action.

- temperror\_mode (default: defer)

  Action to apply on a temperror SPF result.

  Possible values: passive, dunno, defer, reject

- temperror\_score (default: empty)

  Score to apply on a temperror SPF result.

  By default no score is applied.

- permerror\_mode (default: reject)

  Action to apply on a permerror SPF result.

  Possible values: passive, dunno, defer, reject

- permerror\_score (default: empty)

  Score to apply on a permerror SPF result.

  By default no score is applied.

- reject\_message (default: )

  If fail\_mode is set to 'reject' this message is used in the reject.

  The following pattern will be replaced in the string:

  - %LOCAL\_EXPL%

    Will be replaced with a (local) explanation of the check result.

  - %AUTH\_EXPL%

    Will be replaced with a URL to the explanation of the result.

    This URL could be configured with 'default\_authority\_explanation'.

- fail\_score (default: empty)

  Score to apply if the sender failed the SPF checks.

- default\_authority\_explanation (default: See http://www.%{d}/why/id=%{S};ip=%{I};r=%{R})

  String to return as an URL pointing to an explanation of the SPF check result.

  See Mail::SPF::Server for details.

- hostname (default: empty)

  An hostname to show in the default\_authority\_explanation as generating server.

- whitelist (default: '')

  A comma separated list of IP addresses to skip.

- check\_helo (default: "on")

  Set to 'off' to disable SPF check on helo.

- max\_dns\_interactive\_terms (default: 10)

  Maximum number of terms using DNS lookup in a SPF record to evaluate.

  Exceeding this limit will cause a permanent error as specified by RFC7208.

  The default of 10 is also specified in by RFC7208.

- max\_name\_lookups\_per\_term (default: 10)

  Maximum number of DNS lookups per SPF term.

- max\_void\_dns\_lookups (default: 2)

  Maximum number of void DNS lookups.

## EXAMPLE

```
  <Plugin spf>
    module = "SPF"
    pass_mode = passive
    pass_score = -10
    fail_mode = reject
    #fail_score = 10
  </Plugin>
```

## SEE ALSO

Mail::SPF, OpenSPF "" in www.openspf.org, RFC 7208 \<https://tools.ietf.org/html/rfc7208\>

## AUTHOR

Markus Benning \<ich@markusbenning.de\>

## COPYRIGHT AND LICENSE

This software is Copyright (c) 2014 by Markus Benning \<ich@markusbenning.de\>.

This is free software, licensed under:

```
  The GNU General Public License, Version 2, June 1991
```
