afterlogic / webmail-lite

AfterLogic WebMail Lite PHP. Fast and easy-to-use webmail front-end for your existing IMAP mail server, Plesk or cPanel.
https://afterlogic.org/webmail-lite
GNU Affero General Public License v3.0
441 stars 120 forks source link

override-default-domain-settings plugin doesn't work #58

Closed abdelrahmanahmed closed 7 years ago

abdelrahmanahmed commented 7 years ago

I have followed this instructions in the documentation but it seems the plugin doesn't and always see the default setting

the log file :

[08:58:14.10][fc8263ae] [POST(7)][ip:127.0.0.1] /webmail/?/Ajax/
[08:58:14.10][fc8263ae] POST > [Action, Email, IncLogin, IncPassword, SignMe, AccountID, Token]
[08:58:14.10][fc8263ae]
[08:58:14.10][fc8263ae] AJAX: Action: SystemLogin
[08:58:14.10][fc8263ae] DB(PDO/mysql) : start connect to root@localhost
[08:58:14.10][fc8263ae] DB : PDO(mysql:dbname=webmail;host=localhost;charset=utf8)
[08:58:14.10][fc8263ae] DB : connected to root@localhost
[08:58:14.10][fc8263ae] DB[1] > SELECT `id_acct`, `id_user`, `id_domain`, `id_tenant`, `deleted`, `def_acct`, `mailing_list`, `quota`, `email`, `friendly_nm`, `mail_protocol`, `mail_inc_host`, `mail_inc_port`, `mail_inc_login`, `mail_inc_pass`, `mail_inc_ssl`, `mail_out_host`, `mail_out_port`, `mail_out_login`, `mail_out_pass`, `mail_out_auth`, `mail_out_ssl`, `hide_in_gab`, `signature`, `signature_type`, `signature_opt`, `custom_fields`, `allow_mail`, `is_password_specified` FROM awm_accounts WHERE `def_acct` = 1 AND `email` = 'helwansoft@gmail.com'
[08:58:14.11][fc8263ae] DB[2] > SELECT `id_domain`, `id_tenant`, `disabled`, `name`, `url`, `override_settings`, `is_internal`, `is_default_for_tenant`, `site_name`, `lang`, `def_user_timezone`, `def_user_timeformat`, `def_user_dateformat`, `allow_registration`, `allow_pass_reset`, `allow_webmail`, `mail_protocol`, `mail_inc_host`, `mail_inc_port`, `mail_inc_ssl`, `mail_out_host`, `mail_out_port`, `mail_out_auth`, `mail_out_login`, `mail_out_pass`, `mail_out_ssl`, `mail_out_method`, `check_interval`, `skin`, `msgs_per_page`, `allow_change_interface_settings`, `allow_change_account_settings`, `allow_users_add_acounts`, `allow_new_users_register`, `allow_open_pgp`, `layout`, `xlist`, `use_threads`, `allow_contacts`, `contacts_per_page`, `global_addr_book`, `allow_calendar`, `cal_show_weekends`, `cal_workday_starts`, `cal_workday_ends`, `cal_show_workday`, `cal_week_starts_on`, `cal_default_tab`, `allow_files`, `allow_helpdesk`, `default_tab` FROM awm_domains WHERE `name` = 'gmail.com'
[08:58:14.11][fc8263ae] DB[3] > SELECT COUNT(id_acct) as acct_count FROM awm_accounts
WHERE def_acct = 1 AND `email` = 'helwansoft@gmail.com' AND `mail_inc_login` = 'helwansoft@gmail.com'  LIMIT 1
[08:58:14.12][fc8263ae] IMAP[NOTE]: Start connection to "tcp://localhost:143"
[08:58:14.19][fc8263ae] IMAP[NOTICE]: Socket: [2] stream_socket_client(): unable to connect to tcp://localhost:143 (Connection refused)
[08:58:14.19][fc8263ae] IMAP[NOTICE]: exception 'MailSo\Net\Exceptions\SocketCanNotConnectToHostException' with message 'Can't connect to host "tcp://localhost:143"' in /var/www/html/webmail/libraries/MailSo/Net/NetClient.php:283
Stack trace:
#0 /var/www/html/webmail/libraries/MailSo/Imap/ImapClient.php(149): MailSo\Net\NetClient->Connect('localhost', 143, 0, false)
#1 /var/www/html/webmail/libraries/afterlogic/common/managers/users/manager.php(458): MailSo\Imap\ImapClient->Connect('localhost', 143, 0)
#2 /var/www/html/webmail/libraries/afterlogic/common/managers/webmail/manager.php(141): CApiUsersManager->createAccount(Object(CAccount), true)
#3 /var/www/html/webmail/libraries/afterlogic/common/managers/integrator/manager.php(823): CApiWebmailManager->createAccount('helwansoft@gmai...', '', '', Array)
#4 /var/www/html/webmail/libraries/ProjectCore/Actions.php(2973): CApiIntegratorManager->loginToAccount('helwansoft@gmai...', '', '', '', Array)
#5 [internal function]: ProjectCore\Actions->AjaxSystemLogin()
#6 /var/www/html/webmail/libraries/ProjectCore/Service.php(341): call_user_func(Array)
#7 /var/www/html/webmail/libraries/ProjectCore/Boot.php(12): ProjectCore\Service->Handle()
#8 /var/www/html/webmail/index.php(104): include('/var/www/html/w...')
#9 {main}
[08:58:14.19][fc8263ae] Exception[1011]: Can't connect to mail server
~ /libraries/afterlogic/common/managers/users/manager.php (537)
----------------------------------------------------------------------
#0 /var/www/html/webmail/libraries/afterlogic/common/managers/webmail/manager.php(141): CApiUsersManager->createAccount(Object(CAccount), true)
#1 /var/www/html/webmail/libraries/afterlogic/common/managers/integrator/manager.php(823): CApiWebmailManager->createAccount('helwansoft@gmai...', '', '', Array)
#2 /var/www/html/webmail/libraries/ProjectCore/Actions.php(2973): CApiIntegratorManager->loginToAccount('helwansoft@gmai...', '', '', '', Array)
#3 [internal function]: ProjectCore\Actions->AjaxSystemLogin()
#4 /var/www/html/webmail/libraries/ProjectCore/Service.php(341): call_user_func(Array)
#5 /var/www/html/webmail/libraries/ProjectCore/Boot.php(12): ProjectCore\Service->Handle()
#6 /var/www/html/webmail/index.php(104): include('/var/www/html/w...')
#7 {main}
[08:58:14.19][fc8263ae] Exception[1011]: Can't connect to mail server
~ /libraries/afterlogic/common/managers/users/manager.php (537)
----------------------------------------------------------------------
#0 /var/www/html/webmail/libraries/afterlogic/common/managers/webmail/manager.php(141): CApiUsersManager->createAccount(Object(CAccount), true)
#1 /var/www/html/webmail/libraries/afterlogic/common/managers/integrator/manager.php(823): CApiWebmailManager->createAccount('helwansoft@gmai...', '', '', Array)
#2 /var/www/html/webmail/libraries/ProjectCore/Actions.php(2973): CApiIntegratorManager->loginToAccount('helwansoft@gmai...', '', '', '', Array)
#3 [internal function]: ProjectCore\Actions->AjaxSystemLogin()
#4 /var/www/html/webmail/libraries/ProjectCore/Service.php(341): call_user_func(Array)
#5 /var/www/html/webmail/libraries/ProjectCore/Boot.php(12): ProjectCore\Service->Handle()
#6 /var/www/html/webmail/index.php(104): include('/var/www/html/w...')
#7 {main}
[08:58:14.19][fc8263ae] Event: helwansoft@gmail.com > login-failed
[08:58:14.19][fc8263ae] exception 'CApiManagerException' with message 'Can't connect to mail server' in /var/www/html/webmail/libraries/afterlogic/common/managers/users/manager.php:537
Stack trace:
#0 /var/www/html/webmail/libraries/afterlogic/common/managers/webmail/manager.php(141): CApiUsersManager->createAccount(Object(CAccount), true)
#1 /var/www/html/webmail/libraries/afterlogic/common/managers/integrator/manager.php(823): CApiWebmailManager->createAccount('helwansoft@gmai...', '', '', Array)
#2 /var/www/html/webmail/libraries/ProjectCore/Actions.php(2973): CApiIntegratorManager->loginToAccount('helwansoft@gmai...', '', '', '', Array)
#3 [internal function]: ProjectCore\Actions->AjaxSystemLogin()
#4 /var/www/html/webmail/libraries/ProjectCore/Service.php(341): call_user_func(Array)
#5 /var/www/html/webmail/libraries/ProjectCore/Boot.php(12): ProjectCore\Service->Handle()
#6 /var/www/html/webmail/index.php(104): include('/var/www/html/w...')
#7 {main}

and here is my admin settings :

Incoming mail:localhost
port :143 use SSL : no Outgoing mail : localhost port:25 use SSL : no

afterlogic-support commented 7 years ago

Settings from the plugin would only apply if the account is not in the database yet, existing accounts are not affected - I'd assume that's why you encountered the problem. Check awm_accounts database and see if the account is there. Also, recheck the code logic used in your plugin as there's a chance the actual reason of the issue is there.