Próbuję użyć skryptu:
Kod: Zaznacz cały
#!/bin/bash
gmail_login="test@gmail.com" #login do skrzyki
gmail_password="aaa" #hasło do konta
dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \
--no-check-certificate | grep 'fullcount' \
| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"
if [ -z "$dane" ]; then
echo "Connection Error !"
else
echo "GMail: $dane list(ów)"
fi
Po usunięciu opcji -q ukazuje się błąd:
Kod: Zaznacz cały
Resolving mail.google.com... 74.125.87.18, 74.125.87.19, 74.125.87.83, ...
Connecting to mail.google.com|74.125.87.18|:443... connected.
WARNING: cannot verify mail.google.com's certificate, issued by
`/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA':
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 401 Unauthorized
Connecting to mail.google.com|74.125.87.18|:443... connected.
WARNING: cannot verify mail.google.com's certificate, issued by
`/C=ZA/O=Thawte Consulting (Pty) Ltd./CN=Thawte SGC CA':
Unable to locally verify the issuer's authority.
HTTP request sent, awaiting response... 401 Unauthorized
Authorization failed.
Connection Error !
Da się to jakoś poprawić?
Proszę o pomoc.
Pozdrawiam.
Radi