create table smtp_configs(
     channel_id bigint not null references channels(id),
     addr varchar not null default '',
     port integer not null default 0,
     login varchar not null default '',
     password varchar not null default '',
     send_from varchar not null default '',
     start_tls_type varchar not null default 'opportunistic',
     insecure_skip_verify boolean not null default false,
     tls_server_name varchar default '',
     public_key_path varchar default '',
     private_key_path varchar default '',
    enable_ssl boolean not null default false,
     send_bulk_timeout integer not null default 0
);

create table imap_configs(
    channel_id bigint not null references channels(id),
    addr varchar not null default '',
    port integer not null default 0,
    login varchar not null default '',
    password varchar not null default '',
    start_tls_type varchar not null default 'opportunistic',
    insecure_skip_verify boolean not null default false,
    tls_server_name varchar default '',
    public_key_path varchar default '',
    private_key_path varchar default '',
    delete_after boolean not null default false
);
