I had this question, too. Here's what I found by digging.
The script that runs greylisting is /usr/libexec/postfix/greylist.pl . This script creates two databases:
whitelist.db and greylist.db
A scan of that file reveals where these files are kept:
Here you'll find those two databases as well as two other files:
whitelist_domain and whitelist_host
I had similar garbage in those files and you can use pico or vi or yourfavoriteeditor to access them and rewrite them with the info you'd like them to have.
Stop the Mail services (so greylist.pl is inactive).
Restart Mail services. The whitelist.db gets recreated and you're good to go!
You can check that by running:
serveradmin settings mail
I'm off to go try creating blacklists to see if it works the same for those as well!
Hope I helped.
Thanks Pat, that totally helped.
BTW, this post says to use this command:
- sudo serveradmin settings mail:postfix:add_whitelist_domain = 'domain1.com,domain2.com,etc'
Then this manual page says to delete like this:
- web:Sites:_array_id:MySite = delete
If appears both are wrong, correct? I'm trying to verify if this is indeed correct:
- sudo serveradmin settings mail:postfix:add_whitelist_domain = domain1.com
- sudo serveradmin settings mail:postfix:add_whitelist_domain = domain2.com
- sudo serveradmin settings mail:postfix:add_whitelist_domain = etc
Which would mean that each domain goes on a line by itself. Is that correct?
Although I am not home where I can check this I think that those commands just write to the above mentioned file(s). I believe that you can do single lines if you prefer or if you have multiple addresses to add, add them all at once in a comma delimited format when using the command line. The effect is the same when file gets parsed. When I added names manually to the file, I stuck to the format of each address being on its own line - IIRC.
Dunno about the web:Sites:_array_id command you mentioned.
Would deleting the whitelist.db file clear all of the "automatically" whitelisted domains?
For instance my file is semi large as I imagine over the past several days domains are being added to the .db file as they are confirmed. If I delete that file and restart the mail services, the file goes to 0KB. Does that mean, it's just forgotten about all of the greylisted domains it learned?
Thanks for the help!!!