1

Topic: Wrong parsing spf in "spf_to_greylist_whitelists.py"

==================== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: CentOS Linux release 7.2.1511 (Core)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

[root@mx ~]# mysql -uroot -e "select * from iredapd.greylisting_whitelists where sender like '%\"%';"
+------+---------+-------------+----------------------------+
| id   | account | sender      | comment                    |
+------+---------+-------------+----------------------------+
| 3729 | @.      | 199.18"     | AUTO-UPDATE: mailchimp.com |
| 3815 | @.      | 66.220.157" | AUTO-UPDATE: instagram.com |
+------+---------+-------------+----------------------------+
[root@mx ~]# host -t txt mailchimp.com
mailchimp.com descriptive text "v=spf1 include:servers.mcsv.net include:_spf.google.com include:_lp.mailchimp.com ip4:50.22.164.201 ip4:205.201.140.14 ip4:205.201.132.14 ~all"

[root@mx ~]# host -t txt _lp.mailchimp.com
_lp.mailchimp.com descriptive text "v=spf1 ip4:199.187.117.209 ip4:208.89.13.233 ip4:208.89.13.234/31 ip4:208.89.13.236/31 ip4:208.89.14.201 ip4:208.89.14.202/31 ip4:208.89.14.204 ip4:208.89.14.209 ip4:199.187.118.209 ip4:199.187.118.201 ip4:199.187.118.202/31 ip4:199.187.118.204 ip4:199.18" "7.117.233 ip4:199.187.117.234/31 ip4:199.187.117.236/31 ip4:178.249.202.16/29 ip4:178.249.98.16/29 ~all"

sender is 199.18" but should be 199.187.117.233 (199.18" "7.117.233 )

[root@mx ~]# host -t txt instagram.com
instagram.com descriptive text "v=spf1 include:sendgrid.net include:spf.mtasv.net include:facebookmail.com include:amazonses.com ip4:199.201.64.23 ip4:199.201.65.23 include:spf-00082601.pphosted.com -all"

[root@mx ~]# host -t txt facebookmail.com
facebookmail.com descriptive text "v=spf1 ip4:69.63.178.128/25 ip4:69.63.184.0/25 ip4:66.220.144.128/25 ip4:66.220.155.128/25 ip4:69.171.232.128/25 ip4:66.220.157" ".0/25 -all"

sender is 66.220.157" but should be 66.220.157.0/25 (66.220.157" ".0/25)

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Wrong parsing spf in "spf_to_greylist_whitelists.py"

It's more like a bug in the Python DNS module (python-dnspython, https://pypi.python.org/pypi/dnspython ), not iRedAPD script.

But i did a quick/dirty fix to get it working:
https://bitbucket.org/zhb/iredapd/commi … 81153e524f

3

Re: Wrong parsing spf in "spf_to_greylist_whitelists.py"

ZhangHuangbin wrote:

It's more like a bug in the Python DNS module (python-dnspython, https://pypi.python.org/pypi/dnspython ), not iRedAPD script.

But i did a quick/dirty fix to get it working:
https://bitbucket.org/zhb/iredapd/commi … 81153e524f

Thanks.