Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Delete a postfix setting

I am pretty new to the whole serveradmin tool and was working on trying to whitelist a couple of domains. When I list the settings using the command:


sudo serveradmin settings mail:postfix|grep white


I end up with the following output:


2012-11-26 08:54:16.973 serveradmin[13578:a07] servermgr_mail: postconf read error: /usr/sbin/postconf: warning: /Library/Server/Mail/Config/postfix/main.cf: unused parameter: domain_whitelist=delete

mail:postfix:whitelist_from:_array_index:0 = "delete"

mail:postfix:add_whitelist_domain:_array_index:0 = "domain1.com"

mail:postfix:add_whitelist_domain:_array_index:1 = "{"

mail:postfix:add_whitelist_domain:_array_index:2 = "{"

mail:postfix:add_whitelist_domain:_array_index:3 = "domain2.com"

mail:postfix:add_whitelist_domain:_array_index:4 = "domain2.com"

mail:postfix:host_whitelist:_array_index:0 = "{"

mail:postfix:add_whitelist_host:_array_index:0 = "{"

mail:postfix:domain_whitelist:_array_index:0 = "domain1.com"

mail:postfix:domain_whitelist:_array_index:1 = "{"

mail:postfix:domain_whitelist:_array_index:2 = "{"

mail:postfix:domain_whitelist:_array_index:3 = "domain2.com"

mail:postfix:domain_whitelist:_array_index:4 = "domain2.com"


How do I remove these so that I can start from scratch? And can anyone tell me if these are the right settings for correctly whitelisting 2 domains?

Where can one find more information on the serveradmin tool?


Thanks for your help!

- Tim

Mac mini Server (Mid 2011), OS X Mountain Lion (10.8.2)

Posted on Nov 26, 2012 7:03 AM

Reply
6 replies

Nov 28, 2012 11:35 PM in response to timmil312

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:


/Library/Server/Mail/Data/gldb


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).


Delete whitelist.db.


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.


Pat

Mar 17, 2013 10:17 PM in response to blacksun

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?

Mar 18, 2013 2:35 PM in response to mikeschinkel

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.


Pat

Nov 14, 2013 4:03 PM in response to blacksun

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?


Just wondering.

Thanks for the help!!!


Ben

Delete a postfix setting

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.