Index: postman/config.py
===================================================================
--- postman/config.py	(revision 2)
+++ postman/config.py	(revision 9)
@@ -2,4 +2,45 @@
 
 import os
+from ConfigParser import SafeConfigParser
+
+def get_config_parameters(section=None, configfile=None):
+    if not configfile:
+        # If there is no config file defined, try with the usual places
+        # for config files, if there is no config file there, try to load
+        # the one provided with postman sources
+        default_paths = ['/usr/local/etc/postman/postman.conf',
+                         '/usr/local/etc/postman.conf',
+                         '/etc/postman/postman.conf',
+                         '/etc/postman.conf',
+                         os.path.join(os.path.dirname(__file__),
+                                      '../conf/postman.conf')]
+        for path in default_paths:
+            if os.path.exists(path):
+                configfile = path
+                break
+            
+    # if there is no config file now, raise an exception, as we need one
+    if not configfile:
+        raise IOError('ERROR - Can not find postman.conf in your environment')
+
+    available_sections = ['xmlrpc_server', 'storage', 'archive',
+                          'mailing_lists', 'members']
+
+    config = {}
+
+    parser = SafeConfigParser()
+    # FIXME: we should check here if the config file has been read correctly,
+    # instead of letting an exception to pass through
+    parser.read(configfile)
+
+    if section in available_sections:
+        for name, value in parser.items(section):
+            config[name] = value
+        return config
+
+    # if no section (or an invalid section) is provided, return an empty config
+    # set
+    return config
+
 
 # The default path for storage files
Index: postman/daemon.py
===================================================================
--- postman/daemon.py	(revision 7)
+++ postman/daemon.py	(revision 9)
@@ -12,11 +12,8 @@
 
     def __init__(self, configfile=None):
-        if not configfile:
-            # FIXME: This is not used right now, we are getting the stuff
-            # from postman.config, but we will move configurations to a
-            # external ini-style config file soon
-            configfile = os.path.join(os.path.dirname(__file__),
-                                      '../conf/postman.conf')
-        self.configfile = configfile
+        self.storage_config = config.get_config_parameters('storage',
+                                                           configfile)
+        self.archive_config = config.get_config_parameters('archive',
+                                                           configfile)
 
         # lists were the currently managed mailing lists information is going
@@ -27,8 +24,6 @@
         # the files were internal information (like active mailing lists,
         # members, etc) is saved
-        self.dbs = {'mailings': Storage(os.path.join(config.storage_path,
-                                                     'mailings.json')),
-                    'members': Storage(os.path.join(config.storage_path,
-                                                    'members.json'))}
+        self.dbs = {'mailings': Storage(self.storage_config['lists_db']),
+                    'members': Storage(self.storage_config['members_db'])}
 
     def save(self):
@@ -178,21 +173,17 @@
     def add(self, member_addr=None, list_addr=None):
         self.postman.add_mailing_member(member_addr, list_addr)
-                  
-
+    
+
+    
 class PostmanDaemon():
     def __init__(self, configfile=None):
-        if not configfile:
-            # FIXME: This is not used right now, we are getting the stuff
-            # from postman.config, but we will move configurations to a
-            # external ini-style config file soon
-            configfile = os.path.join(os.path.dirname(__file__),
-                                      '../conf/postman.conf')
-        self.configfile = configfile
+        self.config = config.get_config_parameters('xmlrpc_server', configfile)
 
         # FIXME: These should be loaded from a config file
-        self.address='localhost'
-        self.port = 9000
-        
-        self.logfile = os.path.join(os.path.dirname(__file__), 'server.log')
+        self.address = self.config.get('address', 'localhost')
+        self.port = int(self.config.get('port', 9876))
+        self.logfile = self.config.get('logfile',
+                                       os.path.join(os.path.dirname(__file__),
+                                                    'server.log'))
         logging.basicConfig(filename=self.logfile, level=logging.DEBUG)
 
Index: postman/tests/daemon.py
===================================================================
--- postman/tests/daemon.py	(revision 7)
+++ postman/tests/daemon.py	(revision 9)
@@ -186,2 +186,3 @@
         p.terminate()
         
+        
