OTRS Send Mail Module

Moderator: crythias

Post Reply
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

OTRS Send Mail Module

Post by mohsinkhan009 »

Getting below issue

Message: CommunicationLog(ID:22349,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:44619)::Kernel::System::MailQueue => Message could not be sent! Error message: SMTP authentication failed: 500, Command unknown: 'AUTH'!

Below is the configuration:-

SendmailModule :- Kernel::System::EMAIL::SMPTS
SendmailModule::Host :- smtp.office.365.com
SendmailModule::AuthUser :- actual user and password configure.
skilled
Znuny newbie
Posts: 69
Joined: 11 Apr 2018, 13:53
Znuny Version: 6.0.16

Re: OTRS Send Mail Module

Post by skilled »

Hi,

are you using smtp to send E-Mails? If yes, check your settings under sysconfig->Core:
- SendmailModule
- SendmailModule::AuthPassword
- SendmailModule::AuthUser
- SendmailModule::Host
- SendmailModule::Port
skilled
Znuny newbie
Posts: 69
Joined: 11 Apr 2018, 13:53
Znuny Version: 6.0.16

Re: OTRS Send Mail Module

Post by skilled »

Hi,

I think, you wrote wrong your host:
SendmailModule::Host :- smtp.office.365.com
It should be like: smtp.office365.com
Also, try to change send module to Kernel::System::EMAIL::SMTPTLS
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

Still no luck getting below error though the server is able to connect smtp.office365.com on 25 as well as 587

[Tue Nov 26 21:37:38 2019][Debug][Kernel::System::Email::SendExecute][737] Trying to send the email using backend 'Kernel::System::Email::SMTPS'.
[Tue Nov 26 21:37:39 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:47647,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Connection,ObjectLogID:117842)::Kernel::System::Email::SMTP => Could not connect to host 'smtp.office365.com'. ErrorMessage:
[Tue Nov 26 21:37:39 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:47647,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:113178)::Kernel::System::Email => Error sending message using backend 'Kernel::System::Email::SMTPS'.
[Tue Nov 26 21:37:39 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:47647,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:113178)::Kernel::System::MailQueue => Message could not be sent! Error message: Can't connect to smtp.office365.com: !
[Tue Nov 26 21:37:39 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:47647,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:113178)::Kernel::System::MailQueue => Temporary problem returned from server, requeuing message for sending. Message: SMTPCode: -, ErrorMessage: Can't connect to smtp.office365.com: !
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz »

Hey,

Use SMTPTLS, as mentioned by skilled, with port 587, get sure that your SendmailModule::AuthUser is allowed to send mails for all sender addresses and the Perl modules IO::Socket::SSL and IO::Socket::SSL are installed in version 2.066 or higher.

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

Still no luck showing the same error. already the said package is installed with same version.
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

This is the latest log which I have got

sudo su -c "/opt/otrs/bin/otrs.Console.pl Maint::Email::MailQueue --send" -s /bin/bash otrs
Net::SMTP>>> Net::SMTP(2.31)
Net::SMTP>>> Net::Cmd(2.29)
Net::SMTP>>> Exporter(5.68)
Net::SMTP>>> IO::Socket::INET(1.33)
Net::SMTP>>> IO::Socket(1.34)
Net::SMTP>>> IO::Handle(1.33)
Net::SMTP=GLOB(0x48585b8)<<< 220 SG2PR01CA0115.outlook.office365.com Microsoft ESMTP MAIL Service ready at Thu, 28 Nov 2019 05:27:20 +0000
Net::SMTP=GLOB(0x48585b8)>>> EHLO 192.168.6.31
Net::SMTP=GLOB(0x48585b8)<<< 250-SG2PR01CA0115.outlook.office365.com Hello [59.100.120.98]
Net::SMTP=GLOB(0x48585b8)<<< 250-SIZE 157286400
Net::SMTP=GLOB(0x48585b8)<<< 250-PIPELINING
Net::SMTP=GLOB(0x48585b8)<<< 250-DSN
Net::SMTP=GLOB(0x48585b8)<<< 250-ENHANCEDSTATUSCODES
Net::SMTP=GLOB(0x48585b8)<<< 250-STARTTLS
Net::SMTP=GLOB(0x48585b8)<<< 250-8BITMIME
Net::SMTP=GLOB(0x48585b8)<<< 250-BINARYMIME
Net::SMTP=GLOB(0x48585b8)<<< 250-CHUNKING
Net::SMTP=GLOB(0x48585b8)<<< 250 SMTPUTF8
Net::SMTP=GLOB(0x48585b8)>>> QUIT
Net::SMTP=GLOB(0x48585b8)<<< 221 2.0.0 Service closing transmission channel
ERROR: OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 Perl: 5.16.3 OS: linux Time: Thu Nov 28 05:27:21 2019

Message: CommunicationLog(ID:53439,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Connection,ObjectLogID:131180)::Kernel::System::Email::SMTP => SMTP authentication failed (SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH').
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Send Mail Module

Post by root »

Hi,

This log looks promising. The server is waiting for OTRS to use TLS. Is OTRS set to SMTPTLS? Do not change the port.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

No luck getting the same issue with SMTPTLS

[Thu Nov 28 20:21:01 2019][Debug][Kernel::System::Email::SendExecute][737] Trying to send the email using backend 'Kernel::System::Email::SMTPTLS'.
[Thu Nov 28 20:21:02 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:56335,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Connection,ObjectLogID:137067)::Kernel::System::Email::SMTP => SMTP authentication failed (SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH').
[Thu Nov 28 20:21:02 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:56335,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:137066)::Kernel::System::Email => Error sending message using backend 'Kernel::System::Email::SMTPTLS'.
[Thu Nov 28 20:21:02 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:56335,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:137066)::Kernel::System::MailQueue => Message could not be sent! Error message: SMTP authentication failed: 500, Command unknown: 'AUTH'!
[Thu Nov 28 20:21:02 2019][Error][Kernel::System::CommunicationLog::_LogError][538] CommunicationLog(ID:56335,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:137066)::Kernel::System::MailQueue => Permanent sending problem or we reached the sending attempt limit. Message will be removed
[Thu Nov 28 20:21:02 2019][Error][Kernel::System::Daemon::DaemonModules::BaseTaskWorker::_HandleError][49] There was an error executing Execute() in Kernel::System::Console::Command::Maint::Email::MailQueue: ERROR: OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 Perl: 5.16.3 OS: linux Time: Thu Nov 28 09:21:02 2019

Message: CommunicationLog(ID:56335,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Connection,ObjectLogID:137067)::Kernel::System::Email::SMTP => SMTP authentication failed (SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH').
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

this error is also coming:-

SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH'
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz »

That message can appears on some older Perl modules. That's why I've mentioned the versions.
Just saw a mistake on my old post: 'IO::Socket::SSL and IO::Socket::SSL' should've been 'IO::Socket::SSL and Net::SMTP'.
Install them via CPAN to get sure that you're up to date.

More info: https://bugs.otrs.org/show_bug.cgi?id=14357

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

Thanks, the said module are already installed please find below details
o IO::Socket::SSL..................ok (v2.066)
o Net::SMTP........................ok (v3.11)
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

Still getting below error

Message: CommunicationLog(ID:66002,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Connection,ObjectLogID:156411)::Kernel::System::Email::SMTP => SMTP authentication failed (SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH')

in PRODUCT = OTRS
VERSION = 6.0.23
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

Can someone provide input on the said issue.
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz »

Sorry, I am out of suggestions.

Anything else would take live debugging on the system.

But you're able to reach smtp.office.365.com from within your network, right (at least it looks like you can)?
Did you check your Exchange Online logs?

Best regards
Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
mohsinkhan009
Znuny newbie
Posts: 64
Joined: 02 Sep 2015, 08:47
Znuny Version: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 »

Yes I am able to connect smpt, need to check the exchange but as per the log it is showing SMTP authentication failed: 500
skilled
Znuny newbie
Posts: 69
Joined: 11 Apr 2018, 13:53
Znuny Version: 6.0.16

Re: OTRS Send Mail Module

Post by skilled »

Did you change your host to smtp.office365.com?
is it possible to check it with another account(i.e: gmail or another host) ?to see if it is working.
Or try to use sendmail as SendmailModule.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Send Mail Module

Post by root »

Hi,

I recommend Swaks for debugging.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
zzz
Znuny superhero
Posts: 888
Joined: 15 Dec 2016, 15:13
Znuny Version: All
Real Name: Emin
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz »

Just in case someone else stumbles upon this: Check that your FQDN is set correctly.

— Emin
Professional OTRS, Znuny & OTOBO services: efflux.de | efflux.de/en/

Free and premium add-ons: German | English
Post Reply