Topic: CHECK_SPF_IF_LOGIN_MISMATCH = True
============ REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 18.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
I have a web server which sends mail as an e-mail user on a domain hosted by my iRedMail server. This works well, unless the e-mail recipient is also on the iRedMail server. In this case, it fails with this message in maillog and iredapd.log:
REJECT SMTP AUTH is required for users under this sender domain
Searched through the forums on how to allow this specific case and found this setting to add to /opt/iredapd/settings.py:
CHECK_SPF_IF_LOGIN_MISMATCH = True
If my understanding is correct, this should cause iredapd to accept e-mail from senders hosted on the local server but sent by another server allowed by the SPF record (in this case, the "a" record matches).
It works with ipv4, but seems to be failing with ipv6 for me. I get this in iredapd.log:
INFO [SPF] IP <removed ipv6 address> is NOT listed in DNS SPF record of domain removed-domain.com, treated as disallowed server.
Looks like I can alter the SPF record to include the ipv6 address to make this work, but shouldn't it match without doing that?
All the A records for domain are tested. If the client IP is found among them, this mechanism matches. If the connection is made over IPv6, then an AAAA lookup is performed instead.
Thanks for your help,
ralph
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.