OTRS Send Mail Module

Moderator: crythias

Post Reply
mohsinkhan009
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

OTRS Send Mail Module

Post by mohsinkhan009 » 21 Nov 2019, 14:32

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
OTRS expert
Posts: 68
Joined: 11 Apr 2018, 13:53
OTRS Version?: 6.0.16

Re: OTRS Send Mail Module

Post by skilled » 22 Nov 2019, 09:51

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
OTRS expert
Posts: 68
Joined: 11 Apr 2018, 13:53
OTRS Version?: 6.0.16

Re: OTRS Send Mail Module

Post by skilled » 22 Nov 2019, 10:15

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
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 26 Nov 2019, 12:39

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
OTRS superhero
Posts: 305
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz » 26 Nov 2019, 12:58

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 services for development, consulting, hosting and support:
efflux.de – German | efflux.de/en/ – English

Free and premium OTRS add-ons (TextModule, AdBlocker, ModernSkin ... growing): portal.efflux.de

mohsinkhan009
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 27 Nov 2019, 09:28

Still no luck showing the same error. already the said package is installed with same version.

mohsinkhan009
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 28 Nov 2019, 07:29

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
Moderator
Posts: 1883
Joined: 18 Dec 2007, 12:23
OTRS Version?: 4/5/6
Real Name: Roy Kaldung
Company: Znuny Inc.
Contact:

Re: OTRS Send Mail Module

Post by root » 28 Nov 2019, 08:23

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
OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

mohsinkhan009
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 28 Nov 2019, 11:22

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
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 28 Nov 2019, 13:03

this error is also coming:-

SMTP code: 500, ErrorMessage: 500, Command unknown: 'AUTH'

zzz
OTRS superhero
Posts: 305
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz » 28 Nov 2019, 13:46

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 services for development, consulting, hosting and support:
efflux.de – German | efflux.de/en/ – English

Free and premium OTRS add-ons (TextModule, AdBlocker, ModernSkin ... growing): portal.efflux.de

mohsinkhan009
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 29 Nov 2019, 05:44

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
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 02 Dec 2019, 06:52

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
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 04 Dec 2019, 09:26

Can someone provide input on the said issue.

zzz
OTRS superhero
Posts: 305
Joined: 15 Dec 2016, 15:13
OTRS Version?: 3.x - 6.0.x
Real Name: Emin Yazi
Company: Efflux GmbH
Contact:

Re: OTRS Send Mail Module

Post by zzz » 04 Dec 2019, 12:28

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 services for development, consulting, hosting and support:
efflux.de – German | efflux.de/en/ – English

Free and premium OTRS add-ons (TextModule, AdBlocker, ModernSkin ... growing): portal.efflux.de

mohsinkhan009
OTRS expert
Posts: 56
Joined: 02 Sep 2015, 08:47
OTRS Version?: OTRS-Rel-5

Re: OTRS Send Mail Module

Post by mohsinkhan009 » 04 Dec 2019, 13:08

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
OTRS expert
Posts: 68
Joined: 11 Apr 2018, 13:53
OTRS Version?: 6.0.16

Re: OTRS Send Mail Module

Post by skilled » 06 Dec 2019, 17:15

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
Moderator
Posts: 1883
Joined: 18 Dec 2007, 12:23
OTRS Version?: 4/5/6
Real Name: Roy Kaldung
Company: Znuny Inc.
Contact:

Re: OTRS Send Mail Module

Post by root » 06 Dec 2019, 17:26

Hi,

I recommend Swaks for debugging.

- Roy
OTRS 5/6 CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Do you need professional services for the ((OTRS)) Community Edition? Check out https://www.znuny.com/

Post Reply