code: def _parse_accounts(config):
          
          accounts = []
          if 'accounts' in config:
              for acc in config['accounts'].sections:
                  accsec = config['accounts'][acc]
                  args = dict(config['accounts'][acc].items())
  
                  # create abook for this account
                  abook = accsec['abook']
                  logging.debug('abook defined: %s', abook)
                  if abook['type'] == 'shellcommand':
                      cmd = abook['command']
                      regexp = abook['regexp']
                      if cmd is not None and regexp is not None:
                          ef = abook['shellcommand_external_filtering']
                          args['abook'] = ExternalAddressbook(
                              cmd, regexp, external_filtering=ef)
                      else:
                          msg = 'underspecified abook of type \'shellcommand\':'
                          msg += '\ncommand: %s\nregexp:%s' % (cmd, regexp)
                          raise ConfigError(msg)
                  elif abook['type'] == 'abook':
                      contacts_path = abook['abook_contacts_file']
                      args['abook'] = AbookAddressBook(
                          contacts_path, ignorecase=abook['ignorecase'])
                  else:
                      del args['abook']
  
                  cmd = args['sendmail_command']
                  del args['sendmail_command']
                  newacc = SendmailAccount(cmd, **args)
                  accounts.append(newacc)
          return accounts
docs: read accounts information from config
  
          :param config: valit alot config
          :type config: `configobj.ConfigObj`
          :returns: list of accounts