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

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