Webmin does not parse/display postgrey_whitelist_clients.local, and request to expose more greylisting customisation in Webmin

Webmin 1.941, Virtualmin 6.08 on CentOS 7.

I’ve just realised that while postgrey is apparently parsing the postgrey_whitelist_clients.local file, it’s only displaying the original postgrey_whitelist_clients file in the web UI.

Over the years I’ve compiled a decent .local file to whitelist additional MXes which don’t agree with greylisting. However Webmin doesn’t show it or provide a button/tab to switch to it, which means I have to head back to SSH to amend it.

I’ve found the delay option in /etc/sysconfig/postgrey and been able to customise the banner in /etc/systemd/system/multi-user.target.wants/postgrey.service - both of these options would be excellent to include in Webmin’s Email Greylisting section.

I’ve also noticed that the version running on this new Webmin deploy is Postgrey v1.34 (from 2011), however the version I integrated into an existing CentOS 6 / Postfix 2.6.6 install is Postgrey v1.37 (latest available, from 2016). Is this just due to the default yum repos not having 1.37 for RHEL? If so, any potential issues with Virtualmin if I upgrade to 1.37?

I ended up confirming that the .local file is being read, just not displayed in Webmin:

Steps to do this:

  • auditctl -w /etc/postfix -p war -k hostswrap
  • service postgrey restart, then ausearch -f /etc/postfix -i | less
  • remove the auditctl rule with auditctl -W /etc/postfix -p war -k hostswrap


type=PROCTITLE msg=audit(02/06/2020 15:28:23.450:2208534) : proctitle=/usr/bin/perl -T -w /usr/sbin/postgrey --unix=/var/spool/postfix/postgrey/socket --pidfile=/var/run/postgrey.pid --group=postgre
type=PATH msg=audit(02/06/2020 15:28:23.450:2208534) : item=0 name=/etc/postfix/postgrey_whitelist_clients.local inode=32067 dev=fd:01 mode=file,644 ouid=root ogid=root rdev=00:00 obj=unconfined_u:object_r:postfix_etc_t:s0 objtype=NORMAL cap_fp=none cap_fi=none cap_fe=0 cap_fver=0
type=CWD msg=audit(02/06/2020 15:28:23.450:2208534) :  cwd=/
type=SYSCALL msg=audit(02/06/2020 15:28:23.450:2208534) : arch=x86_64 syscall=open success=yes exit=4 a0=0x1a7fad0 a1=O_RDONLY a2=0x1b6 a3=0x130 items=1 ppid=1 pid=22635 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=(none) ses=unset comm=postgrey exe=/usr/bin/perl subj=system_u:system_r:postgrey_t:s0 key=hostswrap