Giter Site home page Giter Site logo

sogo-user-import's Introduction

sogo mail.core.io mail api user importer

Fetch a remote JSON file with the mail.core.io api schema (http://mail.core.io/api/#basic) and push it into a sogo compatible postgresql database.

Env Variables

  • PGUSER postgres user (default: postgres)
  • PGDATABASE database (default: sogo)
  • PGPASSWORD password (default: sogo)
  • PGHOST host (default: localhost)
  • PGPORT port (default: 5432)
  • VERBOSE enable verbose output (default: no)

Usage

node index.js <url-to-json>

Example Call

 PGHOST=192.168.15.138 PGPASSWORD=secret node index.js https://some.srv.customer.skylime.net/mail/export.json?token=232323232323

Database Schema

-- Table: sogo_users

-- DROP TABLE sogo_users;

CREATE TABLE sogo_users
(
  c_uid character varying(512) NOT NULL,
  c_name character varying(512),
  c_password character varying(256),
  c_cn character varying(512),
  mail character varying(512),
  CONSTRAINT sogo_users_pkey PRIMARY KEY (c_uid)
)
WITH (
  OIDS=FALSE
);

Sogo Configuration

Put this in /etc/sogo/sogo.conf

  SOGoUserSources =
    (
      {
        displayName = "Default";
        type = sql;
        id = directory;
        viewURL = "postgresql://postgres:[email protected]:5432/sogo/sogo_users";
        canAuthenticate = YES;
        //isAddressBook = YES; // if you want the users to browse the others
        userPasswordAlgorithm = crypt;
      }
    );

sogo-user-import's People

Contributors

carlos22 avatar drscream avatar wiedi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.