[erledigt] MSGMail bringt Fehler "Can't connect to host smtp.googlemail.com"

Begonnen von franky08, 02 Juni 2016, 20:12:33

Vorheriges Thema - Nächstes Thema

franky08

Habe mich heute mal mit MSGMail beschäftigt und auf einem Ubuntu Testsystem installiert. Leider bekomme ich beim Test jedesmal die oben genannte Fehlermeldung.
Hier das list:

Internals:
   DEF        xxxxxxx@t-online.de xxxxxx@gmail.com smtp.googlemail.com /etc/msgauthfile
   NAME       mymail
   NR         22
   STATE      ready
   TYPE       MSGMail
   Readings:
     2016-06-02 20:06:16   msgcount        0
     2016-06-02 19:55:19   state           add Test Test Test4
Attributes:
   CR         1
   authfile   /etc/msgauthfile
   from       xxxxxx@t-online.de
   mailtype   plain
   room       System
   smtphost   smtp.googlemail.com
   smtpport   587
   subject    FHEM
   to         xxxxxxx@gmail.com


File ist eingerichtet und alle benötigten Perl Pakete müssten installiert sein,

im Log:

2016.06.02 19:38:22 0: MSGMail: SSL is available, provided by Net::SMTP
2016.06.02 19:38:22 1: Including ./log/fhem.save
2016.06.02 19:38:22 0: Featurelevel: 5.7
2016.06.02 19:38:22 0: Server started with 12 defined entities (fhem.pl:11545/2016-05-29 perl:5.022001 os:linux user:fhem pid:1472)
2016.06.02 19:47:22 2: messenger set mymail add Das ist ein Test
2016.06.02 19:47:43 2: messenger set mymail add Das ist der zweite Test
2016.06.02 19:52:57 3: mymail: try to connect with Net::SMTP
2016.06.02 19:52:57 0: mymail: Can't connect to host smtp.googlemail.com: SMTP Error:  Can't connect to host smtp.googlemail.com
2016.06.02 19:53:07 2: messenger set mymail clear
2016.06.02 19:55:19 2: messenger set mymail add Test Test Test4
2016.06.02 19:55:26 3: mymail: try to connect with Net::SMTP
2016.06.02 19:55:26 0: mymail: Can't connect to host smtp.googlemail.com:587: SMTP Error:  Can't connect to host smtp.googlemail.com:587


Stutzig macht mich "SSL is available" und "SMTP Error":
SMTP Error gibt leider keinen Fehlercode zurück um das eingrenzen zu können.

Konsole:

Last login: Thu Jun  2 18:47:52 2016 from 192.168.2.24
root@frank-ZBOX-UBUNTU:~# apt-get install libnet-smtp-ssl-perl
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
libnet-smtp-ssl-perl is already the newest version (1.03-1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 80 nicht aktualisiert.


Jemand einen Tipp?

VG
Frank
Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

franky08

Debian Bookworm auf HUNSN / Debian Bullseye auf 2.ter HUNSN F2F an 2x RaspiB
mit FHEM aktuell
22Zoll ViewSonic als Infodislay (WVC)
3xHMLAN mit vccu, raspmatic_rpi3, HMIP-HCU1

dindihi

Hallo,

wie hast Du dies gelöst?
Bei mir geht's leider nicht:

Internals:
   DEF        xxxxx@gmail.com xxxxx@gmail.com smtp.gmail.com /opt/fhem/msgmailauth.google
   NAME       mailTest
   NR         89
   STATE      ready
   TYPE       MSGMail
   Readings:
     2017-03-03 09:39:11   msgcount        0
     2017-03-03 09:38:51   state           clear
Attributes:
   CR         1
   authfile   /opt/fhem/msgmailauth.google
   from       xxxxx@gmail.com
   loglevel   6
   mailtype   plain
   smtphost   smtp.gmail.com
   smtpport   587
   subject    FHEM
   to         xxxxx@gmail.com
   verbose    5



2017.03.03 09:50:40.909 4: mailTest: param to is now 'xxxx@gmail.com' (attribute 'to')
2017.03.03 09:50:40.909 4: mailTest: param smtpport is now '587' (attribute 'smtpport')
2017.03.03 09:50:40.909 4: mailTest: param smtphost is now 'smtp.gmail.com' (attribute 'smtphost')
2017.03.03 09:50:40.910 4: mailTest: param subject is now 'FHEM' (attribute 'subject')
2017.03.03 09:50:40.910 4: mailTest: param from is now 'xxxx@gmail.com' (attribute 'from')
2017.03.03 09:50:40.910 4: mailTest: param authfile is now '/opt/fhem/msgmailauth.google' (attribute 'authfile')
2017.03.03 09:50:40.911 4: mailTest: param cc is now '' (attribute 'cc')
2017.03.03 09:50:40.911 4: mailTest: param mtype is now 'plain' (attribute 'mailtype')
2017.03.03 09:50:40.912 4: mailTest: mailtype is text/plain
2017.03.03 09:50:41.043 3: mailTest: try to connect with Net::SMTP::SSL
2017.03.03 09:50:41.117 0: mailTest: Can't connect to host smtp.gmail.com: SMTP Error:  Can't connect to host smtp.gmail.com



Ein Test so funktioniert:

perl -MMIME::Base64 -e 'print encode_base64("\000xxxxx\@gmail.com\000PASSWORD")'
ergibt ein String: ABCDEFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

openssl s_client -starttls smtp -connect smtp.gmail.com:587 -crlf -ign_eof
EHLO localhost
AUTH PLAIN ABCDEFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
MAIL FROM: <xxxx@gmail.com>
rcpt to: <xxxx@gmail.com>
DATA
Subject: it works

Geht
.
quit