[otrs] SMTPS and Google Apps (smtp.gmail.com)

3,279 views
Skip to first unread message

Kenneth Thorman

unread,
Apr 12, 2010, 4:21:25 AM4/12/10
to ot...@otrs.org
Hi everyone


I have spent a long time testing the different suggestions here but nothing seems to work.

I would like to send outgoing emails from OTRS through Google Apps.

More specifically

Config Options: Framework -> Core::Sendmail
SendmailModule: SMTPS
SendmailModule::Host: smtp.gmail.com
SendmailModule::Port: 465
SendmailModule::AuthUser: XXX...@XXXXX.com (a valid username)
SendmailModule::AuthPassword: XXXXXXXXXXXX  (corresponding password to username above)



I have added debugging in the SMTPS.pm file

    # debug
$Self->{Debug} = 1000;                     # ****************** Added line
    $Self->{Debug} = $Param{Debug} || 0;
    if ( $Self->{Debug} > 2 ) {

        # shown on STDERR
        $Self->{SMTPDebug} = 1;
    }


as well as additional debug information at

    # return if no connect was possible
    if ( !$SMTP ) {
        $Self->{LogObject}->Log(
            Priority => 'error',
            Message  => "Can't connect to $Self->{MailHost}: $!! </br>Self->{FQDN} = $Self->{FQDN}</br>Self->{SMTPPort} = $Self->{SMTPPort}</br>Self->{SMTPTimeout} = $Self->{SMTPTimeout}</br>Self->{MailHost} = $Self->{MailHost}</br>Self->{User} = $Self->{User}</br>Self->{Password} = $Self->{Password}",
        );
        return;   # ***************************** Added some more information here to see what is going on
    }




Trying to connect on the command line is working fine

root@XXXXXXXXXXXXX /vol/otrs/Kernel/System/Email #telnet smtp.gmail.com 465
Trying 216.239.59.109...
Connected to smtp.gmail.com (216.239.59.109).
Escape character is '^]'.


Just for info retrieving emails on the same account works fine



Checking modules

root@XXXXXXXXXXXXXX /vol/otrs/bin #./otrs.checkModules
   o CGI............................ok (v3.49)
   o Date::Pcalc....................ok (v1.2)
   o Date::Format...................ok (v2.22)
   o DBI............................ok (v1.52)
   o DBD::mysql.....................ok (v3.0007)
   o Digest::MD5....................ok (v2.36)
   o Crypt::PasswdMD5...............ok (v1.3)
   o LWP::UserAgent.................ok (v2.033)
   o Encode::HanExtra...............ok (v0.23)
   o IO::Scalar.....................ok (v2.110)
   o IO::Wrap.......................ok (v2.110)
   o MIME::Base64...................ok (v3.07)
   o Mail::Internet.................ok (v2.04)
   o MIME::Tools....................ok (v5.427)
   o Net::DNS.......................ok (v0.66)
   o Net::POP3......................ok (v2.29)
   o Mail::POP3Client...............ok (v2.18 )
      o IO::Socket::SSL.............ok (v1.01)
   o Net::IMAP::Simple..............ok (v1.17)
      o Net::IMAP::Simple::SSL......ok (v1.3)
   o Net::SMTP......................ok (v2.31)
      o Authen::SASL................ok (v2.12)
      o Net::SMTP::SSL..............ok (v1.01)
   o Net::LDAP......................ok (v0.33)
   o GD.............................ok (v2.35)
      o GD::Text....................ok (v0.86)
      o GD::Graph...................ok (v1.44)
      o GD::Graph::lines............ok (v1.15)
      o GD::Text::Align.............ok (v1.18)
   o PDF::API2......................ok (v0.73)
      o Compress::Zlib..............ok (v2.024)
   o SOAP::Lite.....................ok (v0.710.07)
   o XML::Parser....................ok (v2.36)



SELinux is disabled
root@XXXXXXXXXXXX /vol/otrs/bin #getenforce
Disabled



The error that is showed when trying to send a reply email is

 Error: Can't connect to smtp.gmail.com: ! </br>Self->{FQDN} = XXXXX[..]
Comment:    
Bug Report:    
Traceback:     ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Mon Apr 12 10:18:21 2010

Message: Can't connect to smtp.gmail.com: ! </br>Self->{FQDN} =XXXXXXXX</br>Self->{SMTPPort} = 465</br>Self->{SMTPTimeout} = 30</br>Self->{MailHost} = smtp.gmail.com</br>Self->{User} = XXXXXXX</br>Self->{Password} =XXXXXXX

Traceback (24125):
   Module: Kernel::System::Email::SMTPS::Send (v1.2) Line: 101
   Module: Kernel::System::Email::Send (v1.64.2.1) Line: 690
   Module: Kernel::System::Ticket::Article::ArticleSend (v1.232.2.1) Line: 2027
   Module: Kernel::Modules::AgentTicketCompose::Run (v1.81.2.4) Line: 424
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.43.2.1) Line: 819
   Module: ModPerl::ROOT::ModPerl::Registry::vol_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 48
   Module: (eval) (v1.88) Line: 203
   Module: ModPerl::RegistryCooker::run (v1.88) Line: 203
   Module: ModPerl::RegistryCooker::default_handler (v1.88) Line: 169
   Module: ModPerl::Registry::handler (v1.99) Line: 30


(servername, usernam and passwords have been replaced by XXXXXXXX in  the entire email above)


All suggestions in the following links have been tried:
http://osdir.com/ml/otrs.user/2004-05/msg00089.html
http://lists.otrs.org/pipermail/otrs/2009-November/029454.html
http://lists.otrs.org/pipermail/otrs/2009-December/029909.html
http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ&ItemID=363

I am pretty much stumped at this.

I must be missing something very obvious?

Thank you in advance

Regards
Kenneth Thorman


Marco Vannini

unread,
Apr 12, 2010, 4:25:40 AM4/12/10
to User questions and discussions about OTRS.
did you try port 587 ?


Markus Esche

unread,
Apr 12, 2010, 4:26:55 AM4/12/10
to User questions and discussions about OTRS.
Hi Kenneth,

On 12.04.2010, at 10:21, Kenneth Thorman wrote:
> Config Options: Framework -> Core::Sendmail
> SendmailModule: SMTPS
> SendmailModule::Host: smtp.gmail.com
> SendmailModule::Port: 465
> SendmailModule::AuthUser: XXX...@XXXXX.com (a valid username)
> SendmailModule::AuthPassword: XXXXXXXXXXXX (corresponding password to username above)

Could you try the following command:
$ openssl s_client -host smtp.gmail.com -port 465
to get a valid SSL connection to gmail?

And if have SMTP connection up, what if you try authenticate with your
credentials via the openssl prompt?

hth,
Markus

--

Markus Esche
Customer Development


OTRS AG
Europaring 4
94315 Straubing
Deutschland

T: +49 (0) 9421 56818 0
F: +49 (0) 9421 56818 18
I: http://www.otrs.com/

Geschäftssitz: Bad Homburg
Amtsgericht: Bad Homburg, HRB 10751
Steuernummer: 003 240 97505
Aufsichtsratsvorsitzender: Burchard Steinbild
Vorstand: André Mindermann (Vorsitzender), Martin Edenhofer

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Rodney McDuff

unread,
Apr 12, 2010, 4:27:04 AM4/12/10
to User questions and discussions about OTRS.
Isn't it port 587?

Kenneth Thorman wrote:
> Hi everyone
>
>
> I have spent a long time testing the different suggestions here but
> nothing seems to work.
>
> I would like to send outgoing emails from OTRS through Google Apps.
>
> More specifically
>
> Config Options: Framework -> Core::Sendmail
> SendmailModule: SMTPS

> SendmailModule::Host: smtp.gmail.com <http://smtp.gmail.com>

> smtp.gmail.com <http://smtp.gmail.com> 465
> Trying 216.239.59.109...
> Connected to smtp.gmail.com <http://smtp.gmail.com> (216.239.59.109).

> Error: Can't connect to smtp.gmail.com <http://smtp.gmail.com>: !


> </br>Self->{FQDN} = XXXXX[..]
> Comment:
> Bug Report:
> Traceback: ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Mon Apr
> 12 10:18:21 2010
>

> Message: Can't connect to smtp.gmail.com <http://smtp.gmail.com>: !


> </br>Self->{FQDN} =XXXXXXXX</br>Self->{SMTPPort} =
> 465</br>Self->{SMTPTimeout} = 30</br>Self->{MailHost} = smtp.gmail.com

> <http://smtp.gmail.com></br>Self->{User} =

> ------------------------------------------------------------------------


>
> ---------------------------------------------------------------------
> OTRS mailing list: otrs - Webpage: http://otrs.org/
> Archive: http://lists.otrs.org/pipermail/otrs
> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>
> NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
> http://www.otrs.com/en/support/enterprise-subscription/


--
Dr. Rodney G. McDuff |Ex ignorantia ad sapientiam
Manager, Strategic Technologies Group| Ex luce ad tenebras
Information Technology Services |
The University of Queensland |
EMAIL: mcd...@its.uq.edu.au |
TELEPHONE: +61 7 3365 8220 |

Kenneth Thorman

unread,
Apr 12, 2010, 4:42:12 AM4/12/10
to User questions and discussions about OTRS.
This is the output from the command

root@XXXXXXXX /vol/otrs/bin #openssl s_client -host smtp.gmail.com  -port 465
CONNECTED(00000003)
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
verify error:num=27:certificate not trusted
verify return:1
depth=0 /C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
Certificate chain
 0 s:/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
   i:/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium...@thawte.com
---
Server certificate
-----BEGIN CERTIFICATE-----
MIIDYzCCAsygAwIBAgIQUR2EgGT4+hGKEhCgLMX2sjANBgkqhkiG9w0BAQUFADCB
zjELMAkGA1UEBhMCWkExFTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJ
Q2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3VsdGluZyBjYzEoMCYGA1UE
CxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UEAxMYVGhh
d3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNl
cnZlckB0aGF3dGUuY29tMB4XDTA3MDczMDAwMDAwMFoXDTEwMDcyOTIzNTk1OVow
aDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1v
dW50YWluIFZpZXcxEzARBgNVBAoTCkdvb2dsZSBJbmMxFzAVBgNVBAMTDnNtdHAu
Z21haWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD+RiG+G3Mo9Q9C
tcwDjpp6dJGifjiR5M2DbEbrsIOlth80nk5A7xstKCUfKobHkf/G9Y/DO24JP5yT
s3hWep05ybyiCmOzGL5K0zy3jIq0vOWy+4pLv2GsDjYi9mQBhobAAx3z38tTrTL+
WF4p0/Kl014+wnukIpj4MdF35rIkgQIDAQABo4GmMIGjMB0GA1UdJQQWMBQGCCsG
AQUFBwMBBggrBgEFBQcDAjBABgNVHR8EOTA3MDWgM6Axhi9odHRwOi8vY3JsLnRo
YXd0ZS5jb20vVGhhd3RlUHJlbWl1bVNlcnZlckNBLmNybDAyBggrBgEFBQcBAQQm
MCQwIgYIKwYBBQUHMAGGFmh0dHA6Ly9vY3NwLnRoYXd0ZS5jb20wDAYDVR0TAQH/
BAIwADANBgkqhkiG9w0BAQUFAAOBgQBeNYOZwMVQ7bd6b4sueAkgm57Cyv2p1Xv1
52e8bLnWqd03mWgn/+TQtrwbE1E6pVuQaZJY33ILpt8IfzwVf2TGQI+M5yazZ2fC
xwArHo20iAss3MLQR8tDXWfBoH2Lk9BBsEKDRP4hp83yfpZgdY3pinHTCbqHpsiS
v97epiiFBA==
-----END CERTIFICATE-----
subject=/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com
issuer=/C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting cc/OU=Certification Services Division/CN=Thawte Premium Server CA/emailAddress=premium...@thawte.com
---
No client certificate CA names sent
---
SSL handshake has read 1017 bytes and written 315 bytes
---
New, TLSv1/SSLv3, Cipher is RC4-MD5
Server public key is 1024 bit
Compression: NONE
Expansion: NONE
SSL-Session:
    Protocol  : TLSv1
    Cipher    : RC4-MD5
    Session-ID: 05D147DEFDC2F6B10F47D15EC98B42539BD95BEB13F977A2116C49292DEAFBAD
    Session-ID-ctx:
    Master-Key: A2D70CF49308FC90EC4B82CD1C5EA094F88C909880C73C6B7B71EF9C36C3F446A3BA8F0C1E6C71795155E1F116A1F99D
    Key-Arg   : None
    Krb5 Principal: None
    Start Time: 1271061102
    Timeout   : 300 (sec)
    Verify return code: 21 (unable to verify the first certificate)
---
220 mx.google.com ESMTP t2sm65868gve.19




Now after starting to work the commands

EHLO
250-mx.google.com at your service, [79.125.6.100]
250-SIZE 35651584
250-8BITMIME
250-AUTH LOGIN PLAIN XOAUTH
250-ENHANCEDSTATUSCODES
250 PIPELINING
MAIL FROM:XXXXXXXXXXXXx
530-5.5.1 Authentication Required. Learn more at
530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 q9sm74150gve.14

....

So I can connect as far as I can see

Regards
Ken

Rodney McDuff

unread,
Apr 12, 2010, 4:32:31 AM4/12/10
to User questions and discussions about OTRS.
You need to do starttls for smtp.gmail.com. Use

openssl s_client -host smtp.gmail.com -port 465 -starttls smtp


-starttls protocol
send the protocol-specific message(s) to switch to TLS for
communication. protocol is a keyword for the intended protocol.
Currently, the only supported keywords are "smtp", "pop3",
"imap",
and "ftp".

--
Dr. Rodney G. McDuff |Ex ignorantia ad sapientiam
Manager, Strategic Technologies Group| Ex luce ad tenebras
Information Technology Services |
The University of Queensland |
EMAIL: mcd...@its.uq.edu.au |
TELEPHONE: +61 7 3365 8220 |

Marco Vannini

unread,
Apr 12, 2010, 4:42:55 AM4/12/10
to User questions and discussions about OTRS.
same "error" as mine ... ;) 
as in faq for that:

Select 465 as SendmailModule::Port  - Please note that Google also uses port 587, but only for TLS. OTRS uses SSL communication, so we should select port 465 here.

Kenneth Thorman

unread,
Apr 12, 2010, 4:44:02 AM4/12/10
to User questions and discussions about OTRS.
No I have not tried 587 due to the recommendation from http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ&ItemID=363


"Select 465 as SendmailModule::Port  - Please note that Google also uses port 587, but only for TLS. OTRS uses SSL communication, so we should select port 465 here."

Regards
Ken

On Mon, Apr 12, 2010 at 10:25 AM, Marco Vannini <marco....@gmail.com> wrote:
did you try port 587 ?



Kenneth Thorman

unread,
Apr 12, 2010, 4:49:58 AM4/12/10
to User questions and discussions about OTRS.
I have now tried using 587 with SMTPS selected as well in the

Config Options: Framework -> Core::Sendmail
SendmailModule: SMTPS
SendmailModule::Host: smtp.gmail.com <http://smtp.gmail.com>
SendmailModule::Port: 587

SendmailModule::AuthUser: XXX...@XXXXX.com (a valid username)
SendmailModule::AuthPassword: XXXXXXXXXXXX  (corresponding password to username above)

This still yields the same error

[ OTRS::ITSM 1.3.2 ]        Kenneth Thorman (kenneth...@appinux.com) 10:47:15 - 04/12/2010

Error: Can't connect to smtp.gmail.com: ! </br>Self->{FQDN} = XXXXXXXXXXXXXX[..]
Comment:    
Bug Report:    
Traceback:     ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Mon Apr 12 10:47:16 2010

Message: Can't connect to smtp.gmail.com: ! </br>Self->{FQDN} = XXXXXXXXXXXXXXX</br>Self->{SMTPPort} = 587</br>Self->{SMTPTimeout} = 30</br>Self->{MailHost} = smtp.gmail.com</br>Self->{User} = XXXXXXXXXXXX</br>Self->{Password} = XXXXXXXXXXXX


Traceback (24125):
   Module: Kernel::System::Email::SMTPS::Send (v1.2) Line: 101
   Module: Kernel::System::Email::Send (v1.64.2.1) Line: 690
   Module: Kernel::System::Ticket::Article::ArticleSend (v1.232.2.1) Line: 2027
   Module: Kernel::Modules::AgentTicketCompose::Run (v1.81.2.4) Line: 424
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.43.2.1) Line: 819
   Module: ModPerl::ROOT::ModPerl::Registry::vol_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 48
   Module: (eval) (v1.88) Line: 203
   Module: ModPerl::RegistryCooker::run (v1.88) Line: 203
   Module: ModPerl::RegistryCooker::default_handler (v1.88) Line: 169
   Module: ModPerl::Registry::handler (v1.99) Line: 30


Regards
Kenneth Thorman

Kenneth Thorman

unread,
Apr 12, 2010, 4:52:42 AM4/12/10
to User questions and discussions about OTRS.
Hi Marco

I am a little bit in doubt if I am reading your message correctly


"same "error" as mine ... ;) 
as in faq for that:"

I have tried both 465 and 587 now and the results are the same.
As per my understanding the OTRS are not using TLS and thus we should use the gmail port 465.
It this not correct?

Regards
Kenneth Thorman


On Mon, Apr 12, 2010 at 10:42 AM, Marco Vannini <marco....@gmail.com> wrote:

Marco Vannini

unread,
Apr 12, 2010, 4:55:34 AM4/12/10
to User questions and discussions about OTRS.
No sorry, it was related to the other guy that has suggested the same as the first mine (change to 587) but then I've read faq too ...so it was a notice to the other.

Sorry for the entropy 

Kenneth Thorman

unread,
Apr 12, 2010, 4:57:33 AM4/12/10
to User questions and discussions about OTRS.
Hi Rodney

According to http://faq.otrs.org/otrs/public.pl?Action=PublicFAQ&ItemID=363 it is support to be 465 if I am not mistaken.
However I tried using port 587 as well by changing the value through the Admin/SysConfig.
The port was changed as can be seen by the following, but unfortunatelly nothing has changed it is still throwing an error.


Error: Can't connect to smtp.gmail.com: ! </br>Self->{FQDN} = XXXXXXXXXXXXXX[..]
Comment:    
Bug Report:    
Traceback:     ERROR: OTRS-CGI-10 Perl: 5.8.8 OS: linux Time: Mon Apr 12 10:47:16 2010

Message: Can't connect to smtp.gmail.com: ! </br>Self->{FQDN} = XXXXXXXXXXXXXXX</br>Self->{
SMTPPort} = 587</br>Self->{SMTPTimeout} = 30</br>Self->{MailHost} = smtp.gmail.com</br>Self->{User} = XXXXXXXXXXXX</br>Self->{Password} = XXXXXXXXXXXX

Traceback (24125):
   Module: Kernel::System::Email::SMTPS::Send (v1.2) Line: 101
   Module: Kernel::System::Email::Send (v1.64.2.1) Line: 690
   Module: Kernel::System::Ticket::Article::ArticleSend (v1.232.2.1) Line: 2027
   Module: Kernel::Modules::AgentTicketCompose::Run (v1.81.2.4) Line: 424
   Module: Kernel::System::Web::InterfaceAgent::Run (v1.43.2.1) Line: 819
   Module: ModPerl::ROOT::ModPerl::Registry::vol_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 48
   Module: (eval) (v1.88) Line: 203
   Module: ModPerl::RegistryCooker::run (v1.88) Line: 203
   Module: ModPerl::RegistryCooker::default_handler (v1.88) Line: 169
   Module: ModPerl::Registry::handler (v1.99) Line: 30

Regards
Kenneth Thorman


On Mon, Apr 12, 2010 at 10:27 AM, Rodney McDuff <mcd...@its.uq.edu.au> wrote:

Kenneth Thorman

unread,
Apr 12, 2010, 5:00:53 AM4/12/10
to User questions and discussions about OTRS.
Hi Rodney

I have tried

root@XXXXXXXXXXx /vol/otrs/bin #openssl s_client -host smtp.gmail.com  -port 465 -starttls smtp
CONNECTED(00000003)

It looks as if I am indeed getting through to the gmail smtp servers?

Regards
Kenneth Thorman

Kenneth Thorman

unread,
Apr 12, 2010, 5:30:22 AM4/12/10
to User questions and discussions about OTRS.
Hi Marcus

Do you see anything obviously wrong in the below output?

Could there be some incompatibilities between the different CPAN modules?

Regards
Ken

Kenneth Thorman

unread,
Apr 12, 2010, 5:48:03 AM4/12/10
to User questions and discussions about OTRS.
Looking into the perldoc perllocal I find this

       Sun Nov  1 00:39:48 2009: "Module" Net::SSLeay
       ?   "installed into: /usr/lib/perl5/site_perl/5.8.8"
       ?   "LINKTYPE: dynamic"
       ?   "VERSION: 1.30"
       ?   "EXE_FILES: "


When I try to make a simple command line batch perl program like


#!/usr/bin/perl
use Net::SMTP::SSL;

my $fromEmail = 'XXXXXXXXXXXXXXx';
my $emailPassword = 'XXXXXXXXXXXXXXx';
my $toEmail = 'XXXXXXXXXXXXx';
 
my $text = 'Some email message without fancy formatting!';
my $html = '<b>Some email message with fancy html formatting!!</b>';
 
my $smtp;
if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
                                     Port => 465,
                                     Debug => 1)) {
   die "Could not connect to mail server\n";
}
 
$smtp->auth($fromEmail, $emailPassword) || die "Authentication failed!\n";
 
$smtp->mail($fromEmail . "\n");
my @recepients = split(/,/, $toEmail);
foreach my $recp (@recepients) {
    $smtp->to($recp . "\n");
}
 
$smtp->data();
$smtp->datasend("From: " . $fromEmail . "\n");
$smtp->datasend("To: " . $toEmail . "\n");
$smtp->datasend("Subject: " . $subject . "\n");
$smtp->datasend("MIME-Version: 1.0\n");
$smtp->datasend("Content-Type: multipart/alternative; boundary=\"$boundary\"\n");
$smtp->datasend("\n--$boundary\n");
$smtp->datasend("Content-Type: text/plain; charset=iso-8859-1\n");
$smtp->datasend("Content-Transfer-Encoding: quoted-printable\n");
$smtp->datasend($text . "\n\n");
$smtp->datasend("\n--$boundary\n");
$smtp->datasend("Content-Type: text/html; charset=iso-8859-1\n");
$smtp->datasend("Content-Transfer-Encoding: quoted-printable\n");
$smtp->datasend($html . "\n");
$smtp->dataend();
$smtp->quit;




I get this output

Can't locate Net/SMTP/SSL.pm in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./perl_test_email_gmail.pl line 2.
BEGIN failed--compilation aborted at ./perl_test_email_gmail.pl line 2.


I guess this is the reason for things not working?

Regards
Kenneth Thorman

Kenneth Thorman

unread,
Apr 12, 2010, 6:07:36 AM4/12/10
to User questions and discussions about OTRS.
Hi

On further investigation changing the test script a little bit so it ended up looking like below there are now now errors anymore with regards to the missing module in INC.

Now it is just

root@XXXXXXXXXX ~ #./perl_test_email_gmail.pl

Could not connect to mail server

So it looks like it is not just some PERL incorrect configuration issue. :(

Any help would be greatly appreciated.


Regards
Kenneth Thorman


#!/usr/bin/perl
use lib '/vol/otrs/Kernel/cpan-lib'; #***************************************** Added line
use Net::SMTP::SSL;

my $fromEmail = 'XXXXXXXXXXXXXXXXXXXx';
my $emailPassword = 'XXXXXXXXXXXXx';
my $toEmail = 'XXXXXXXXXXXXXXXXX';

Renée Bäcker

unread,
Apr 12, 2010, 6:22:35 AM4/12/10
to User questions and discussions about OTRS.
Hi Kenneth,

Kenneth Thorman schrieb:


> #!/usr/bin/perl
> use Net::SMTP::SSL;
>
> my $fromEmail = 'XXXXXXXXXXXXXXx';
> my $emailPassword = 'XXXXXXXXXXXXXXx';
> my $toEmail = 'XXXXXXXXXXXXx';
>

> ....
>

As the otrs.checkModules script says, that it can find Net::SMTP::SSL,
you should check if the same Perl interpreter is used. And you should
print where the otrs script can find the module. Add this line to
otrs.checkModules:

print $^X, " :: ", $INC{"Net/SMTP/SSL.pm"}, "\n" if $Module->{Module} eq
'Net::SMTP::SSL';

(add it to the place where it prints "ok (v$Version)" (around line 310) )

and add

print $^X,"\n";

to your test script that you posted above...

> I get this output
>
> Can't locate Net/SMTP/SSL.pm in @INC (@INC contains:
> /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi
> /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi

> ...


> /usr/lib/perl5/5.8.8 .) at ./perl_test_email_gmail.pl line 2.
> BEGIN failed--compilation aborted at ./perl_test_email_gmail.pl line 2.
>
>

Maybe you should clean your @INC...

Regards,
Renee

--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de

Renée Bäcker

unread,
Apr 12, 2010, 6:24:38 AM4/12/10
to User questions and discussions about OTRS.
Kenneth Thorman schrieb:

> Hi
>
> On further investigation changing the test script a little bit so it ended
> up looking like below there are now now errors anymore with regards to the
> missing module in INC.
>
>

So, my last mail is obsolete...

- Renée

--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de

Renée Bäcker

unread,
Apr 12, 2010, 6:32:41 AM4/12/10
to User questions and discussions about OTRS.
Kenneth Thorman schrieb:

> my $smtp;
> if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
> Port => 465,
> Debug => 1)) {
> die "Could not connect to mail server\n";
> }
>

Can you print the value of $@?

my $smtp;
if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
Port => 465,
Debug => 1)) {

die "Could not connect to mail server -> $@\n";
}


- Renée

--
Perl-Magazin: http://perl-magazin.de
Perl-Nachrichten: http://perl-nachrichten.de

Kenneth Thorman

unread,
Apr 12, 2010, 7:03:17 AM4/12/10
to User questions and discussions about OTRS.
Hi Renée

I changed the script to the following (this is my small test script not the actual OTRS installation)


print "$@\n";

if (not $smtp = Net::SMTP::SSL->new('smtp.gmail.com',
                                     Port => 465,
                                     Debug => 1)) {
print "$@\n";

   die "Could not connect to mail server\n";
}



The output is

root@XXXXXXXXXX ~ #./perl_test_email_gmail.pl

Net::SMTP::SSL: Bad service ''

Could not connect to mail server

Regards
Kenneth Thorman

Rodney McDuff

unread,
Apr 12, 2010, 7:45:13 AM4/12/10
to User questions and discussions about OTRS.
>From <http://mail.google.com/support/bin/answer.py?answer=78799>

Incoming Mail (IMAP) Server - requires SSL: imap.gmail.com
Use SSL: Yes
Port: 993
Outgoing Mail (SMTP) Server - requires TLS: smtp.gmail.com (use authentication)
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name: your full email address (including @gmail.com) Google Apps users, please enter username@your_domain.com
Email Address: your full Gmail email address (user...@gmail.com) Google Apps users, please enter username@your_domain.com
Password: your Gmail password

May be you need to use Net::SMTP::TLS <http://search.cpan.org/~awestholm/Net-SMTP-TLS-0.12/> so you can do a STARTTLS. Ie start with a clear text protocol and then upgrade to a TLS encrypted protocol.


Kenneth Thorman wrote:
---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
http://www.otrs.com/en/support/enterprise-subscription/

Michiel Beijen

unread,
Jan 6, 2011, 6:30:53 AM1/6/11
to User questions and discussions about OTRS.
Bumping an old thread:

Apparently Google switched to requiring TLS?

You can use TLS with OTRS although it's a bit broken in < 3.0.5 (which is not out yet).

Instructions on updating are here: http://bugs.otrs.org/show_bug.cgi?id=6354
for users who prefer to use old software (i.e. OTRS 2.4.x) you can install this package:
http://users.otrs.com/~mb/SMTPTLS-1.0.2.opm

Then simply go to Admin > SysConfig > Framework > Core::Sendmail

select SMTPTLS as 'SendmailModule'
host: smtp.gmail.com
port: 587
authuser: your...@gmail.com
authpassword: yoursecret

and it works for me...

I've updated the FAQ page accordingly.

--
Mike

Hugh Kelley

unread,
Jan 6, 2011, 8:55:36 AM1/6/11
to User questions and discussions about OTRS.
Is there an estimated release date for 3.0.5?

Is there a page where these dates are shared?

Hugh

On 1/6/11, Michiel Beijen <michiel...@otrs.com> wrote:
> Bumping an old thread:
>
> Apparently Google switched to requiring TLS?
>
> You can use TLS with OTRS although it's a bit broken in < 3.0.5 (which is
> not out yet).
>
> Instructions on updating are here: http://bugs.otrs.org/show_bug.cgi?id=6354
> for users who prefer to use old software (i.e. OTRS 2.4.x) you can install
> this package:

> http://users.otrs.com/~mb/SMTPTLS-1.0.2.opm<http://users.otrs.com/%7Emb/SMTPTLS-1.0.2.opm>


>
> Then simply go to Admin > SysConfig > Framework > Core::Sendmail
>
> select SMTPTLS as 'SendmailModule'
> host: smtp.gmail.com
> port: 587
> authuser: your...@gmail.com
> authpassword: yoursecret
>
> and it works for me...
>
> I've updated the FAQ page accordingly.
>
> --
> Mike
>
> On Mon, Apr 12, 2010 at 1:45 PM, Rodney McDuff <mcd...@its.uq.edu.au> wrote:
>
>> >From

>> <http://mail.google.com/support/bin/answer.py?answer=78799><http://mail.google.com/support/bin/answer.py?answer=78799>
>>
>> *Incoming Mail (IMAP) Server - requires SSL:* imap.gmail.com
>> *Use SSL*: Yes
>> *Port*: 993 *Outgoing Mail (SMTP) Server - requires TLS:*
>> smtp.gmail.com(use authentication)
>> *Use Authentication*: Yes
>> *Use STARTTLS*: Yes (some clients call this SSL)
>> *Port*: 465 or 587 *Account Name: * your full email address (including @


>> gmail.com) Google Apps users, please enter username@your_domain.com

>> *Email
>> Address: * your full Gmail email address (user...@gmail.com) Google Apps
>> users, please enter username@your_domain.com *Password: * your Gmail


>> password
>>
>>
>> May be you need to use Net::SMTP::TLS

>> <http://search.cpan.org/~awestholm/Net-SMTP-TLS-0.12/><http://search.cpan.org/%7Eawestholm/Net-SMTP-TLS-0.12/>so

>> ------------------------------


>>
>> ---------------------------------------------------------------------
>> OTRS mailing list: otrs - Webpage: http://otrs.org/
>> Archive: http://lists.otrs.org/pipermail/otrs
>> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>>
>> NEW! ENTERPRISE SUBSCRIPTION - Get more information

>> NOW!http://www.otrs.com/en/support/enterprise-subscription/


>>
>>
>>
>> --
>> Dr. Rodney G. McDuff |Ex ignorantia ad sapientiam
>> Manager, Strategic Technologies Group| Ex luce ad tenebras
>> Information Technology Services |
>> The University of Queensland |
>> EMAIL: mcd...@its.uq.edu.au |
>> TELEPHONE: +61 7 3365 8220 |
>>
>>
>>
>> ---------------------------------------------------------------------
>> OTRS mailing list: otrs - Webpage: http://otrs.org/
>> Archive: http://lists.otrs.org/pipermail/otrs
>> To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
>>
>> NEW! ENTERPRISE SUBSCRIPTION - Get more information NOW!
>> http://www.otrs.com/en/support/enterprise-subscription/
>>
>

Shawn Beasley

unread,
Jan 7, 2011, 2:43:59 AM1/7/11
to User questions and discussions about OTRS.
Hello Hugh,

On Jan 6, 2011, at 14:55 , Hugh Kelley wrote:

> Is there an estimated release date for 3.0.5?
>

The estimated release for OTRS 3.0.5 is calendar week 3-4.

> Is there a page where these dates are shared?

There is currently no release plan available to the public. I am looking into this currently, and will get back with you personally as soon as I know more.

Thanks for using OTRS!


--

Shawn Beasley

Community Manager

OTRS AG
Norsk-Data-Str 1
61352 Bad Homburg
Germany

Internet: http://www.otrs.com/
Project: http://www.otrs.org/

Business location: Bad Homburg, Country Court: Bad Homburg, HRB 10751, VAT ID: DE256610065
Chairman: Burchard Steinbild, Managing Board: André Mindermann

Reply all
Reply to author
Forward
0 new messages