1 (edited by PaoloVIP 2018-04-18 17:22:26)

Topic: Greylist

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.7 MARIADB edition
- Linux/BSD distribution name and version: Debian 9.3 (stretch)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql (Mariadb)
- 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 read https://docs.iredmail.org/manage.iredapd.html

And about Greylist I have two questions, please:

1 - Which user I must use to add spf_to_greylist_whitelists.py to cron (root, iredapd)? I don't find any cron entry for this.

2 - Some users starts to use smtp in cloud. So, even if they send often mail to my Iredmail server they ends in greylist, 'cause they always send a mail from differents host/ip smtp server. What con I do for this? Is there a chance to put a range of ip/hostnames for python greylisting_admin.py --whitelist-domain --from "cip&ciop.fantasyname" ?

----

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

2

Re: Greylist

PaoloVIP wrote:

1 - Which user I must use to add spf_to_greylist_whitelists.py to cron (root, iredapd)? I don't find any cron entry for this.

"root" user. And it should be added by iRedMail installer, or iRedAPD upgrade script automatically.

PaoloVIP wrote:

2 - Some users starts to use smtp in cloud. So, even if they send often mail to my Iredmail server they ends in greylist, 'cause they always send a mail from differents host/ip smtp server. What con I do for this? Is there a chance to put a range of ip/hostnames for python greylisting_admin.py --whitelist-domain --from "cip&ciop.fantasyname" ?

Whitelist IP addresses/networks specified in the SPF record instead. For example, to whitelist all ip addressess/networks of Gmail:

cd /opt/iredapd/tools/
python spf_to_greylist_whitelists.py --submit gmail.com

3 (edited by PaoloVIP 2018-04-19 17:53:14)

Re: Greylist

My doubts stemmed from the fact that I had simple mistaken domain  :-) , but...

I used

python greylisting_admin.py --whitelist-domain --from 'domain.com'

instead

python spf_to_greylist_whitelists.py --submit

I think it was the same, or not?

For Cron I used

crontab -e -u iredapd
*/30   *   *   *   *   /usr/bin/python /opt/iredapd/tools/spf_to_greylist_whitelists.py &>/dev/null

and seems it was working, I must instead put the command in /etc/crontab ?

4

Re: Greylist

"greylisting_admin.py" is different than "spf_to_greylist_whitelists.py":

- greylisting_admin.py just whitelists the IP/domain name you give.
- spf_to_greylist_whitelists.py queries the SPF DNS record of given domain, and whitelist all IP addresses/networks in the SPF record.

as mentioned, the cron job should be present in "root" user's cronjob, and it was added by iRedMail installer (or iRedAPD upgrade script). You do NOT need to add it in "iredapd" user.

5

Re: Greylist

ZhangHuangbin wrote:

"greylisting_admin.py" is different than "spf_to_greylist_whitelists.py":

- greylisting_admin.py just whitelists the IP/domain name you give.
- spf_to_greylist_whitelists.py queries the SPF DNS record of given domain, and whitelist all IP addresses/networks in the SPF record.

as mentioned, the cron job should be present in "root" user's cronjob, and it was added by iRedMail installer (or iRedAPD upgrade script). You do NOT need to add it in "iredapd" user.

Ok, all clear, now. Thank you very much