#1126961 exim4-config: Enable exim4 trust host when checking SPF to enable mx backup host to send the email back.

#1126961#5
Date:
2026-02-04 18:33:56 UTC
From:
To:

#1126961#10
Date:
2026-02-04 18:53:19 UTC
From:
To:
[... and nothing else ]

I am at loss. What is this report about?

cu Andreas

#1126961#13
Date:
2026-02-04 18:53:19 UTC
From:
To:
[... and nothing else ]

I am at loss. What is this report about?

cu Andreas

#1126961#18
Date:
2026-02-04 20:37:34 UTC
From:
To:
I will like to add some type of support for external backup emails.

went you send a email from one server and the mail server is not
responding, you can send to the MX backup email in a priority order like
MX 5 MX10 MX100, after the some time the mail backup server will send
you the mail back to you...

the mail issue is, on the default config a new file
30_exim4-config_check_rcpt
   .ifdef _HAVE_SPF
   deny
     !acl = acl_local_deny_exceptions
     spf = fail
     message = [SPF] $sender_host_address is not allowed to send mail from \
               ${if def:sender_address_domain
{$sender_address_domain}{$sender_helo_name}}.
     log_message = SPF check failed.

By default is deny the email..

Will be great if we enable some file like: /etc/exim4/trustedmailhosts
in order to bypass this rule and allow send the mail back from the MX
backup without check the SPF
My proposal will be like:

  .ifdef CHECK_RCPT_SPF
   .ifdef _HAVE_SPF
   deny
     !acl = acl_local_deny_exceptions
     !condition = ${if
match_ip{$sender_host_address}{iplsearch;/etc/exim4/trustedmailhosts}{1}{0}}
     spf = fail
     message = [SPF] $sender_host_address is not allowed to send mail from \
               ${if def:sender_address_domain
{$sender_address_domain}{$sender_helo_name}}.
     log_message = SPF check failed.

   defer
     !acl = acl_local_deny_exceptions
     spf = temperror
     message = Temporary DNS error while checking SPF record.  Try again
later.

   warn

I am not a expert on exim rules, maybe there is other way to do it.

Regards!
------------- By Pk25.com
#1126961#23
Date:
2026-02-04 20:37:34 UTC
From:
To:
I will like to add some type of support for external backup emails.

went you send a email from one server and the mail server is not
responding, you can send to the MX backup email in a priority order like
MX 5 MX10 MX100, after the some time the mail backup server will send
you the mail back to you...

the mail issue is, on the default config a new file
30_exim4-config_check_rcpt
   .ifdef _HAVE_SPF
   deny
     !acl = acl_local_deny_exceptions
     spf = fail
     message = [SPF] $sender_host_address is not allowed to send mail from \
               ${if def:sender_address_domain
{$sender_address_domain}{$sender_helo_name}}.
     log_message = SPF check failed.

By default is deny the email..

Will be great if we enable some file like: /etc/exim4/trustedmailhosts
in order to bypass this rule and allow send the mail back from the MX
backup without check the SPF
My proposal will be like:

  .ifdef CHECK_RCPT_SPF
   .ifdef _HAVE_SPF
   deny
     !acl = acl_local_deny_exceptions
     !condition = ${if
match_ip{$sender_host_address}{iplsearch;/etc/exim4/trustedmailhosts}{1}{0}}
     spf = fail
     message = [SPF] $sender_host_address is not allowed to send mail from \
               ${if def:sender_address_domain
{$sender_address_domain}{$sender_helo_name}}.
     log_message = SPF check failed.

   defer
     !acl = acl_local_deny_exceptions
     spf = temperror
     message = Temporary DNS error while checking SPF record.  Try again
later.

   warn

I am not a expert on exim rules, maybe there is other way to do it.

Regards!
------------- By Pk25.com
#1126961#26
Date:
2026-02-04 20:37:34 UTC
From:
To:
I will like to add some type of support for external backup emails.

went you send a email from one server and the mail server is not
responding, you can send to the MX backup email in a priority order like
MX 5 MX10 MX100, after the some time the mail backup server will send
you the mail back to you...

the mail issue is, on the default config a new file
30_exim4-config_check_rcpt
   .ifdef _HAVE_SPF
   deny
     !acl = acl_local_deny_exceptions
     spf = fail
     message = [SPF] $sender_host_address is not allowed to send mail from \
               ${if def:sender_address_domain
{$sender_address_domain}{$sender_helo_name}}.
     log_message = SPF check failed.

By default is deny the email..

Will be great if we enable some file like: /etc/exim4/trustedmailhosts
in order to bypass this rule and allow send the mail back from the MX
backup without check the SPF
My proposal will be like:

  .ifdef CHECK_RCPT_SPF
   .ifdef _HAVE_SPF
   deny
     !acl = acl_local_deny_exceptions
     !condition = ${if
match_ip{$sender_host_address}{iplsearch;/etc/exim4/trustedmailhosts}{1}{0}}
     spf = fail
     message = [SPF] $sender_host_address is not allowed to send mail from \
               ${if def:sender_address_domain
{$sender_address_domain}{$sender_helo_name}}.
     log_message = SPF check failed.

   defer
     !acl = acl_local_deny_exceptions
     spf = temperror
     message = Temporary DNS error while checking SPF record.  Try again
later.

   warn

I am not a expert on exim rules, maybe there is other way to do it.

Regards!
------------- By Pk25.com