I am busy configuring some new gateway servers, using exim 4.69, complete with spamassasin, ClamAV and greylisting. The essential issue is that the ACL for the greylister refers to a file, which should list all the whitelisted mail servers. Each entry is either a single host or a subnet definition, like this: \ \

According to the exim4 manual, this should work. However, when the list is used, Exim throws error messages like this:

8878 host in ": +relay_from_hosts : /etc/greylistd/whitelist-hosts"? no (malformed IPv4 address or address mask)

As soon as I remove the "/24" from the above line, it all works like a charm. If I escape the "/24" with a backslash, the error doesn't show up, but the addresses are not matched correctly. either. If I need to use the form without the network masks for everything, I would have to write endless lists of IP addresses.

I have tried to google this, but no luck at all (only somebody who was using a dodgy text editor). Maybe it's worth mentioning that this runs on a DELL R310, under Debian. In order to get the OS installed and running, we had to use a special backport which identifies itself as "2.6.32-trunk-686", as the normal lenny kernel doesn't have the drivers for the mobo hardware. But I cannot see how this would impact on parsing of text files? Has anybody seen this before? Or am I just not seeing the wood for the trees here?


I have roughly the same configuration (debian, exim, spamassassin, greylist, clamav + some other stuff), but my greylist whitelist, just contains ip addresses en subnets without : \, like :

for me this works.

  • So it was a case of "wood and trees". When reading from a file, items must no be separated with colons and line continuations. It clearly upsets the parser. – wolfgangsz Jul 28 '10 at 14:07
  • Exim supports many file-formats for external files. They're all documented in The Exim Specification, "spec.txt" with Exim or online at the website. "10.3 File names in lists" talks about how bare filenames are interpreted when in a list and how the contents are parsed. – Phil P Aug 8 '10 at 6:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.