Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: problem with smtp Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
promidec
Newbie
Newbie


Joined: 04 June 2013
Online Status: Offline
Posts: 5
Posted: 04 June 2013 at 6:16am | IP Logged Quote promidec

Hello (I am french, sorry for my bad english)

I am testing the webmail lite (nice one),

But, I cannot send mail, always the same message "An error occured during sending the message. :-(
Im using smtp without authentification (noauth)

php mail() fonction work nice on the server and I have others webmail (like roundcube) and I dont have problem with smtp.

Please quand you help me ?


My config:

Webmail 7.0.1 (PHP)
serveur : debian6 / postfix courrier / php5 / mysql
Log activated but noting into the file


xml :

<WebMail>
          <AllowWebMail>On</AllowWebMail>
          <IncomingMailProtocol>IMAP4</IncomingMailProtocol>
          <IncomingMailServer>127.0.0.1</IncomingMailServer>
          <IncomingMailPort>143</IncomingMailPort>
          <IncomingMailUseSSL>Off</IncomingMailUseSSL>
          <OutgoingMailServer>127.0.0.1</OutgoingMailServer>
          <OutgoingMailPort>25</OutgoingMailPort>
          <OutgoingMailAuth>NoAuth</OutgoingMailAuth>
          <OutgoingMailLogin/>
          <OutgoingMailPassword/>
          <OutgoingMailUseSSL>Off</OutgoingMailUseSSL>
          <OutgoingSendingMethod>Specified</OutgoingSendingMethod>
          <UserQuota>0</UserQuota>
          <ShowQuotaBar>Off</ShowQuotaBar>
          <AutoCheckMailInterval>0</AutoCheckMailInterval>
          <DefaultSkin>Default</DefaultSkin>
          <MailsPerPage>20</MailsPerPage>
          <EnableMailboxSizeLimit>Off</EnableMailboxSizeLimit>
          <MailboxSizeLimit>0</MailboxSizeLimit>
          <AllowUsersChangeInterfaceSettings>Off</AllowUsersChangeInterfaceSettings>
          <AllowUsersChangeEmailSettings>Off</AllowUsersChangeEmailSettings>
          <EnableAttachmentSizeLimit>Off</EnableAttachmentSizeLimit>
          <AttachmentSizeLimit>10240000</AttachmentSizeLimit>
          <AllowLanguageOnLogin>On</AllowLanguageOnLogin>
          <FlagsLangSelect>Off</FlagsLangSelect>
          <LoginFormType>Email</LoginFormType>
          <UseLoginAsEmailAddress>On</UseLoginAsEmailAddress>
          <LoginAtDomainValue />
          <DefaultDomainValue />
          <UseAdvancedLogin>Off</UseAdvancedLogin>
          <UseCaptcha>Off</UseCaptcha>
          <UseReCaptcha>Off</UseReCaptcha>
          <AllowNewUsersRegister>On</AllowNewUsersRegister>
          <AllowUsersAddNewAccounts>Off</AllowUsersAddNewAccounts>
          <AllowIdentities>Off</AllowIdentities>
          <StoreMailsInDb>Off</StoreMailsInDb>
          <AllowInsertImage>On</AllowInsertImage>
          <AllowBodySize>Off</AllowBodySize>
          <MaxBodySize>600</MaxBodySize>
          <MaxSubjectSize>255</MaxSubjectSize>
          <Layout>Side</Layout>
          <AlwaysShowImagesInMessage>Off</AlwaysShowImagesInMessage>
          <SaveMail>Always</SaveMail>
          <IdleSessionTimeout>0</IdleSessionTimeout>
          <UseSortImapForDateMode>On</UseSortImapForDateMode>
          <DetectSpecialFoldersWithXList>On</DetectSpecialFoldersWithXList>
          <EnableLastLoginNotification>Off</EnableLastLoginNotification>
          <ExternalHostNameOfLocalImap />
          <ExternalHostNameOfLocalSmtp />
          <ActiveSync>Off</ActiveSync>
          <ExternalHostNameOfActiveSyncServer />
          <ExternalHostNameOfDAVServer />
     </WebMail>
Back to Top View promidec's Profile Search for other posts by promidec
 
promidec
Newbie
Newbie


Joined: 04 June 2013
Online Status: Offline
Posts: 5
Posted: 04 June 2013 at 7:45am | IP Logged Quote promidec

sorry, in fact I have some log.
The connexion to the (local) smtp server seems good, but :

[14:42:26.05] SMTP[NOTE]: Start connection to "127.0.0.1:25"
[14:42:26.05] SMTP[TIME]: 0.00022292137145996 (raw connection)
[14:42:26.05] SMTP[DATA]: < 220 ns1.********.fr ESMTP Postfix (Debian/GNU)\r\n
[14:42:26.05] SMTP[TIME]: 0.00079894065856934
[14:42:26.05] SMTP[DATA]: > EHLO localhost\r\n
[14:42:26.05] SMTP[DATA]: < 250-ns1.********.fr\r\n
[14:42:26.05] SMTP[DATA]: < 250-PIPELINING\r\n
[14:42:26.05] SMTP[DATA]: < 250-SIZE 20240000\r\n
[14:42:26.05] SMTP[DATA]: < 250-VRFY\r\n
[14:42:26.05] SMTP[DATA]: < 250-ETRN\r\n
[14:42:26.05] SMTP[DATA]: < 250-ENHANCEDSTATUSCODES\r\n
[14:42:26.05] SMTP[DATA]: < 250-8BITMIME\r\n
[14:42:26.05] SMTP[DATA]: < 250 DSN\r\n
[14:42:26.05] SMTP[TIME]: 0.001244068145752
[14:42:26.05] SMTP[ERROR]: exception 'MailSo\Smtp\Exceptions\RuntimeException' with message 'A valid session has not been started' in /var/www/********/www/rar/components/com_webmail/webmail/libraries/MailSo/Smtp/SmtpClient.php:265
Back to Top View promidec's Profile Search for other posts by promidec
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6103
Posted: 05 June 2013 at 2:02am | IP Logged Quote Igor

Looks like the core reason of this is that SMTP authentication is disabled on both webmail and mailserver ends, and current implementation doesn't work well with that. There will be a proper fix in next release of course, for now you can add a workaround by replacing the following code in libraries/afterlogic/common/managers/mail/manager.php file around line 823:

Code:
$oSmtpClient->Connect($oAccount->OutgoingMailServer, $oAccount->OutgoingMailPort, 'localhost', $iSecure);
if ($oAccount->OutgoingMailAuth)
{
     $oSmtpClient->Login($sOutgoingMailLogin, $sOutgoingMailPassword);
}


replace it with:

Code:
$oSmtpClient->Connect($oAccount->OutgoingMailServer, $oAccount->OutgoingMailPort, 'localhost', $iSecure);
if ($oAccount->OutgoingMailAuth)
{
     $oSmtpClient->Login($sOutgoingMailLogin, $sOutgoingMailPassword);
}
else
{
     $oSmtpClient->Login();
}


--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
promidec
Newbie
Newbie


Joined: 04 June 2013
Online Status: Offline
Posts: 5
Posted: 12 June 2013 at 1:46am | IP Logged Quote promidec

thanks,
i fixed it by using an unique external smtp auth
Back to Top View promidec's Profile Search for other posts by promidec
 
Alx09
Newbie
Newbie


Joined: 12 June 2013
Online Status: Offline
Posts: 3
Posted: 12 June 2013 at 7:22am | IP Logged Quote Alx09

Experiencing the same issue.

Igor, the code that you point to and the code that you tell to replace with seem identical to me.

In the file, this part does not exist:
Code:

else
{
     $oSmtpClient->Login();
}

So, I guess that is what I need to add?

I've tested both with and without it and still get "A valid session has not been started".
Back to Top View Alx09's Profile Search for other posts by Alx09
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6103
Posted: 12 June 2013 at 10:52pm | IP Logged Quote Igor

Oh, my bad, you're right. For some reason, I pasted the same code twice, and the modification to be made is the else clause indeed. I've updated my initial response on this one.

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Alx09
Newbie
Newbie


Joined: 12 June 2013
Online Status: Offline
Posts: 3
Posted: 13 June 2013 at 11:39pm | IP Logged Quote Alx09

Gotcha :-)

Any idea why it doesn't work for me? Here is with no smtp validation:
Code:
[06:20:21.52] SMTP[ERROR]: exception 'MailSo\Smtp\Exceptions\RuntimeException' with message 'A valid session has not been started' in /home/alx/webapps/webmail/libraries/MailSo/Smtp/SmtpClient.php:265


And here is the error with auth enabled:

Code:

[06:28:32.34] SMTP[ERROR]: exception 'MailSo\Smtp\Exceptions\NegativeResponseException' with message 'MailSo-Smtp-Exceptions-NegativeResponseException (SmtpClient.php ~ 670)' in /home/alx/webapps/webmail/libraries/MailSo/Smtp/SmtpClient.php:670


And here it is with your code fix added / no auth:
Code:

[06:37:17.68] SMTP[ERROR]: exception 'MailSo\Smtp\Exceptions\NegativeResponseException' with message 'MailSo-Smtp-Exceptions-NegativeResponseException (SmtpClient.php ~ 670)' in /home/alx/webapps/webmail/libraries/MailSo/Smtp/SmtpClient.php:670


My host is webfaction, and roundcube works just fine.

Would love to be able to use this one though, as it feels so much more modern.


Another question: I looked at the Pro client, but only pricing options available were for 100 users minimum. I would only use it for myself (my ~2-3 email addresses). Is there any option for that, so that I can get features like filters for example? Or would I have to purchase the 100-user thing if so?
Back to Top View Alx09's Profile Search for other posts by Alx09
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6103
Posted: 14 June 2013 at 12:14am | IP Logged Quote Igor

To assist you on this, we'll need a test account on mail server you use. And though we don't offer guaranteed technical support for WebMail Lite, this one seems to be worth of making an exception. Please open a ticket in HelpDesk and send us account details, including hostname and port.

And though I can't promise anything, there might be a special licensing offer for the Pro

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
Alx09
Newbie
Newbie


Joined: 12 June 2013
Online Status: Offline
Posts: 3
Posted: 14 June 2013 at 2:06am | IP Logged Quote Alx09

Thank you for making the exception. Sent in a ticket.

EDIT: Not sure if my replies to you on Helpdesk went through, I tried twice. But I'd like to say thank you for helping me solve the issues!

I'll add the solution/fix/problem here for others:

Quote:

First of all, it looks like your mail server requires username rather than email address, indeed. It's not something unusual, but still you need to log into with full email address as WebMail needs to know it. To solve this complication, set UseLoginAsEmalAddress to Off in data/settings/settings.xml file.

I've tested this on a local installation, upon applying a fix posted on forum, and it works well - but only with SMTP auth enabled. When it's disabled, log file states that SMTP server rejects the host - so the error message posted on the forum looks legit.

One more thing: if you enable/disable SMTP auth in AdminPanel, it won't have effect on existing account, you'd need to delete that account first. You can tick that box in account settings, and applying that change will probably require refreshing with F5 / Ctrl-R or logging out and back in.


This fixed it for me.
Back to Top View Alx09's Profile Search for other posts by Alx09
 
paulD1968
Newbie
Newbie
Avatar

Joined: 22 November 2013
Location: Netherlands
Online Status: Offline
Posts: 1
Posted: 22 November 2013 at 1:23am | IP Logged Quote paulD1968

Alx09 code works fine for me.

Problem was indeed when sending emails directly from localhost.
this change resolved my issue using build: 7.0.1

my app is on an hosted server and couldn't change any other parameter so thanks for this.
Back to Top View paulD1968's Profile Search for other posts by paulD1968
 
pasha_pv
Newbie
Newbie


Joined: 02 September 2014
Location: Ukraine
Online Status: Offline
Posts: 1
Posted: 02 September 2014 at 1:31pm | IP Logged Quote pasha_pv

I have a similar problem with settings.xml -> OutgoingMailServer, my data replaced to '127.0.0.1'.

Version 7.3.0.3 (php)

And another error on installation: imap and smtp server not writed into settings.xml .

But AfterLogic WebMail Lite very nice!
Back to Top View pasha_pv's Profile Search for other posts by pasha_pv
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6103
Posted: 03 September 2014 at 2:28am | IP Logged Quote Igor

I'm not sure I understand what exactly is the problem, can you describe it in more detail? Is my understanding correct that you've supplied different data in default domain settings but then they were overwritten somehow?

--
Regards,
Igor, AfterLogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
andreif
Newbie
Newbie


Joined: 22 November 2014
Location: Ireland
Online Status: Offline
Posts: 5
Posted: 14 December 2014 at 3:43am | IP Logged Quote andreif

promidec wrote:
thanks,
i fixed it by using an unique external smtp auth


hy, how did you fixed? i have the same problem
Back to Top View andreif's Profile Search for other posts by andreif
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide