SMTPTLS in Office 365

Moderator: crythias

Post Reply
dell123
OTRS newbie
Posts: 3
Joined: 24 Jun 2020, 15:01
OTRS Version?: 6.0
Real Name: Krzysztof Szortyka

SMTPTLS in Office 365

Post by dell123 »

1. I changed our mail from Exchange to Office 365 and I have problem with mails. I changed the settings for the mail notifications as mentionned by Microsoft but it is not working.
IMAPS is ok but SMTPTLS didn't work.

/opt/otrs/Kernel/Config/Files/ZZZAAuto.pm:

Code: Select all

$Self->{'SendmailModule'} =  'Kernel::System::Email::SMTPTLS';
$Self->{'SendmailModule::AuthPassword'} =  'password';
$Self->{'SendmailModule::AuthUser'} =  'Support@mymail';
$Self->{'SendmailModule::CMD'} =  '/usr/sbin/sendmail -i -f';
$Self->{'SendmailModule::Host'} =  'smtp.office365.com';
$Self->{'SendmailModule::Port'} =  '587';
Image

Image

/var/log/syslog

Code: Select all

Jun 24 18:09:35 mm-my-otrs OTRS-otrs.Console.pl-Maint::Email::MailQueue-10[21999]: [Error][Kernel::System::CommunicationLog::_LogError][Line:538]: CommunicationLog(ID:57354,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:81855)::Kernel::System::Email::SMTP => Could not send message to server: 354, Start mail input; end with <CRLF>.<CRLF>#012!
Jun 24 18:09:36 mm-my-otrs OTRS-otrs.Console.pl-Maint::Email::MailQueue-10[21999]: [Error][Kernel::System::CommunicationLog::_LogError][Line:538]: CommunicationLog(ID:57354,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:81855)::Kernel::System::Email => Error sending message using backend 'Kernel::System::Email::SMTPTLS'.
Jun 24 18:09:36 mm-my-otrs OTRS-otrs.Console.pl-Maint::Email::MailQueue-10[21999]: [Error][Kernel::System::CommunicationLog::_LogError][Line:538]: CommunicationLog(ID:57354,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:81855)::Kernel::System::MailQueue => Message could not be sent! Error message: Could not send message to server: 354, Start mail input; end with <CRLF>.<CRLF>#012!
2. The second thing, do not receive an email notification from NotificationSenderEmail.
I don't know where to look for the reason here.

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

Re: SMTPTLS in Office 365

Post by zzz »

Don't change settings in ZZZAAuto.pm.
Change them in Config.pm or preferably in the system configuration.

Most likely an issue with too old Perl modules. You can check it with "/opt/otrs/bin/otrs.CheckModules.pl".

Update "IO::Socket::SSL" and "Net::SMTP" via cpan or cpanm.

— 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, ModernSkinCustomer etc.): portal.efflux.de

dell123
OTRS newbie
Posts: 3
Joined: 24 Jun 2020, 15:01
OTRS Version?: 6.0
Real Name: Krzysztof Szortyka

Re: SMTPTLS in Office 365

Post by dell123 »

Code: Select all

$ /opt/otrs/bin/otrs.CheckModules.pl
  o Apache::DBI......................ok (v1.12)
  o Apache2::Reload..................ok (v0.13)
  o Archive::Tar.....................ok (v1.96)
  o Archive::Zip.....................ok (v1.39)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.58)
  o Date::Format.....................ok (v2.24)
  o DateTime.........................ok (v1.12)
  o DBI..............................ok (v1.631)
  o DBD::mysql.......................ok (v4.028)
  o DBD::ODBC........................ok (v1.50)
  o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................ok (v3.4.2)
  o Digest::SHA......................ok (v5.88)
  o Encode::HanExtra.................ok (v0.23)
  o IO::Socket::SSL..................ok (v2.002)
  o JSON::XS.........................ok (v2.34)
  o List::Util::XS...................ok (v1.38)
  o LWP::UserAgent...................ok (v6.26)
  o Mail::IMAPClient.................ok (v3.35)
    o IO::Socket::SSL................ok (v2.002)
    o Authen::SASL...................ok (v2.16)
    o Authen::NTLM...................ok (v1.09)
  o ModPerl::Util....................ok (v2.000009)
  o Net::DNS.........................ok (v0.81)
  o Net::LDAP........................ok (v0.64)
  o Template.........................ok (v2.24)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.11)
  o Time::HiRes......................ok (v1.9726)
  o XML::LibXML......................ok (v2.0116)
  o XML::LibXSLT.....................ok (v1.92)
  o XML::Parser......................ok (v2.41)
  o YAML::XS.........................ok (v0.41)
How update (commands) via cpan or cpanm?

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

Re: SMTPTLS in Office 365

Post by zzz »

Install cpanm (check repo name for your distribution) and execute

Code: Select all

cpanm IO::Socket::SSL Net::SMTP
But that was a Google job of 30 seconds...

Consider updating your OTRS. The newest version would have shown that your modules are too old.

— 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, ModernSkinCustomer etc.): portal.efflux.de

dell123
OTRS newbie
Posts: 3
Joined: 24 Jun 2020, 15:01
OTRS Version?: 6.0
Real Name: Krzysztof Szortyka

Re: SMTPTLS in Office 365

Post by dell123 »

zzz wrote:
24 Jun 2020, 21:02
Install cpanm (check repo name for your distribution) and execute

Code: Select all

cpanm IO::Socket::SSL Net::SMTP
But that was a Google job of 30 seconds...

Consider updating your OTRS. The newest version would have shown that your modules are too old.

— Emin
Is ok, mails are send.

Code: Select all

$ bin/otrs.CheckModules.pl
  o Apache::DBI......................ok (v1.12)
  o Apache2::Reload..................ok (v0.13)
  o Archive::Tar.....................ok (v1.96)
  o Archive::Zip.....................ok (v1.39)
  o Crypt::Eksblowfish::Bcrypt.......ok (v0.009)
  o Crypt::SSLeay....................ok (v0.58)
  o Date::Format.....................ok (v2.24)
  o DateTime.........................ok (v1.12)
  o DBI..............................ok (v1.631)
  o DBD::mysql.......................ok (v4.028)
  o DBD::ODBC........................ok (v1.50)
  o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
  o DBD::Pg..........................ok (v3.4.2)
  o Digest::SHA......................ok (v5.88)
  o Encode::HanExtra.................ok (v0.23)
  o IO::Socket::SSL..................ok (v2.068)
  o JSON::XS.........................ok (v2.34)
  o List::Util::XS...................ok (v1.38)
  o LWP::UserAgent...................ok (v6.26)
  o Mail::IMAPClient.................ok (v3.35)
    o IO::Socket::SSL................ok (v2.068)
    o Authen::SASL...................ok (v2.16)
    o Authen::NTLM...................ok (v1.09)
  o ModPerl::Util....................ok (v2.000009)
  o Net::DNS.........................ok (v0.81)
  o Net::LDAP........................ok (v0.64)
  o Template.........................ok (v2.24)
  o Template::Stash::XS..............ok (undef)
  o Text::CSV_XS.....................ok (v1.11)
  o Time::HiRes......................ok (v1.9726)
  o XML::LibXML......................ok (v2.0116)
  o XML::LibXSLT.....................ok (v1.92)
  o XML::Parser......................ok (v2.41)
  o YAML::XS.........................ok (v0.41)

Code: Select all

IO::Socket::SSL is up to date (2.068).
Net::SMTP is up to date (3.11).

But I have errors in logs:

Image

Post Reply