mirror of
https://github.com/cypht-org/cypht.git
synced 2026-04-25 04:56:03 +03:00
[GH-ISSUE #19] IMAP authentication doesn't work #17
Labels
No labels
2fa
I18N
PGP
Security
Security
account
advanced_search
advanced_search
announcement
api_login
authentication
awaiting feedback
blocker
bug
bug
bug
calendar
config
contacts
core
core
devops
docker
docs
duplicate
dynamic_login
enhancement
epic
feature
feeds
framework
github
github
gmail_contacts
good first issue
help wanted
history
history
imap
imap_folders
inline_message
installation
keyboard_shortcuts
keyboard_shortcuts
ldap_contacts
mobile
need-ssh-access
new module set
nux
pop3
profiles
pull-request
question
refactor
release
research
saved_searches
smtp
strategic
tags
tests
themes
website
wordpress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cypht#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ei4koote on GitHub (Aug 22, 2015).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/19
Originally assigned to: @jasonmunro on GitHub.
My setup is: ArchLinux + PHP + PHP-FPM + Dovecot. I am no expert in this stuff. So...
So... What i'm doing wrong?
@dumblob commented on GitHub (Aug 23, 2015):
Did you check whether you can login into dovecot using e.g. Thunderbird?
@ei4koote commented on GitHub (Aug 23, 2015):
Yes. Mutt, Geary, Thunderbird login successfully.
@jasonmunro commented on GitHub (Aug 25, 2015):
IIRC, Dovecot will not allow standard IMAP LOGIN attempts on port 143 unless you enable them in the configuration. Could you try changing the imap_auth_port to 993, and the imap_auth_tls setting to true, rebuild your config, and see if that helps? If not, we can enable some debugging in the IMAP lib to track down exactly what the conversation between dovecot and cypht is. Thanks for the feedback!
@jasonmunro commented on GitHub (Sep 2, 2015):
I tested both the IMAP and POP3 auth mechs against a local Dovecot installation - and both worked. I made some improvements and fixes, but those did not have to do with the actual authentication.
@jasonmunro commented on GitHub (Sep 14, 2015):
I can't reproduce this issue, and have not heard back in 3 weeks, so I'm going to close this for now. Please feel free to open a new issue if you are still having problems. Thanks!
@mbakhterev commented on GitHub (Jan 27, 2016):
Hi. I have the same problem... I think. My setup is (archlinux php pgp-cgi dovecot). When i'm trying to login with my IMAP credentials i get from the Dovecot
dovecot[513]: imap-login: Disconnected (disconnected before auth was ready, waited 0 secs): user=<>, rip=::1, lip=::1, secured, session=<7v08t1Yq8LEAAAAAAAAAAAAAAAAAAAAB>And Invalid username or password form Cypth. But there even was no attempts to authentificate. The specifity of my Dovecot setup is that it announces login only after STARTTLS.
Here goes my hm3.ini:
; -----------------------------------------------------------------------------
; General settings
; -----------------------------------------------------------------------------
; Define how to handle sessions. Standard PHP sessions, or a custom DB version
;
; PHP Standard PHP session handlers
; DB Custom database based sessions
session_type=PHP
; Define how users authenticate. You can use an IMAP or POP3 mail server, or
; a database schema
;
; DB use database support (see below) to authenticate
; IMAP use an IMAP server for authentication, the imap module must be enabled
; POP3 use a POP3 server for authentication, the pop3 module must be enabled
auth_type=IMAP
; if using "IMAP" as an auth type, this defines the server to use
imap_auth_name=localhost
imap_auth_server=localhost
imap_auth_port=143
imap_auth_tls=true
; if using "POP3" as the auth type, this defines the server to use
pop3_auth_name=localhost
pop3_auth_server=localhost
pop3_auth_port=110
pop3_auth_tls=
; Optional default SMTP server. Authentication will be done with the users login
; credentials, so this probably only makes sense if you are using POP3 or IMAP
; for authentication
default_smtp_name=
default_smtp_server=
default_smtp_port=
default_smtp_tls=
default_smtp_no_auth=
; Default language to use for the interface strings
default_language=en
; Storage location for user settings. Can be either "file" or "DB". If set to
; DB the hm_user_settings file must be available.
user_config_type=file
; location of other application data that should not be inside the document
; root
app_data_dir=/home/app/var/lib/hm3
; location of the user settings files. Must be readable/writable by the web
; server. Only used if user_config_type is set to "file"
user_settings_dir=/home/app/var/lib/hm3/users
; location of uploaded attachments for outbound messages
attachment_dir=/home/app/var/lib/hm3/attachments
; Allow HTTP requests. Not recommended.
disable_tls=false
; Comma delimited usernames with admin access. Currently this only enables the
; "create account" link in the account module set, and is only used if the
; auth_type is set to DB
admin_users=
; App name used throughout the program
app_name=HM3
; External command used to compress javascript includes during the config build process
; Examples:
; js_compress='java -jar /usr/local/lib/yuicompressor-2.4.8.jar --type js'
; js_compress='uglifyjs -nc --unsafe -c -v'
js_compress=false
; External command used to compress css includes during the config build process
; Examples:
; css_compress='java -jar /usr/local/lib/yuicompressor-2.4.8.jar --type css'
css_compress=false
; Browser side encryption using forge (https://github.com/digitalbazaar/forge)
; Enabling either one of these options causes the forge javascript lib to be
; included. This adds about 70KB to the page size (when gzipped).
; use AES encryption for ajax responses
encrypt_ajax_requests=
; use AES encryption for data stored in local storage
encrypt_local_storage=
; -----------------------------------------------------------------------------
; DB support
; -----------------------------------------------------------------------------
;
; All settings are required if using the built in DB user or session support.
;
; For the DB_auth session type The target DB must contain a table called
; hm_user that we can read and write to.
;
; Postgresql : create table hm_user (username varchar(255) primary key not null, hash varchar(255));
; Mysql or sqlite : create table hm_user (username varchar(250), hash varchar(250), primary key (username));
;
; For DB_session support the following additional table must be available:
;
; Postgresql : create table hm_user_session (hm_id varchar(250) primary key not null, data text, date timestamp);
; Mysql or sqlite : create table hm_user_session (hm_id varchar(250), data longblob, date timestamp, primary key (hm_id));
;
; For DB support for user_config_type the following additional table must be available:
;
; Postgresql : create table hm_user_settings (username varchar(250) primary key not null, settings text);
; Mysql or sqlite : create table hm_user_settings(username varchar(250), settings longblob, primary key (username));
;
; Technically any DB driver supported by the PHP PDO extension should work as
; long as the required tables are present. For sqlite, only the db_host needs to
; be set.
; database host name or ip address
db_host=127.0.0.1
; database name
db_name=test
; database user
db_user=test
; database password
db_pass=123456
; database type. can be any supported PDO driver
db_driver=mysql
; -----------------------------------------------------------------------------
; Modules
; -----------------------------------------------------------------------------
; Modules enabled
modules=core,contacts,feeds,imap,smtp,site,account,idle_timer,calendar,themes,nux,developer,github,wordpress,history,saved_searches,nasa
@jasonmunro commented on GitHub (Jan 27, 2016):
If you are using STARTTLS, then imap_auth_tls should not be set to true, since that will cause cypht to attempt to connect with TLS. Can you change that, rebuild your config, and see if that helps?
Thanks!
@mbakhterev commented on GitHub (Jan 28, 2016):
@jasonmunro Thanks! This works.