You are not logged in.

#1 2019-10-09 17:23:11

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

GMAIL script for conky

Due to my ISP forcing people to use Windows and Chrome to get email I no longer have my emaill address I have been using for 10 years.

COLOUR ME: BLACK!

Anyway I cannot get conkyEmail to work with gmail at all although the help file says it does but conkyEmail is old and and unsupported python file and gmail has evolved. 

AND I HATE GMAIL - thunderbird worked for all of 2 or three dayS and now I cannot receive so I have to use Firefox.

goodbye claws-mail after 10 years and the same for thunderbird (my wife used that)l

So what I am looking for is a script that with get just the number of "new" mails at a gmail account and display it in a conky like I had conkyEmail do.

Like in the bottom left corner here:
2019-09-09_102133_S11.th.jpg

Anyone got such a script?  Need one for 3 accounts


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#2 2019-10-09 18:00:12

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,153

Re: GMAIL script for conky

Got you buddy


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#3 2019-10-09 20:38:37

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 649

Re: GMAIL script for conky

Sector11 wrote:

Due to my ISP forcing people to use Windows and Chrome to get email I no longer have my emaill address I have been using for 10 years.

Sorry to hear this Sector ... but are you sure that the reason is what you think it is? I mean, it looks quite a trouble for your ISP to check that standard mail transfer is originated from Windows, and not from Linux? I'm not saying it is impossible (probably), but it is quite difficult on the ISP side ... if I understand what your problem really is. Perhaps, I don't understand. Were you 10-years-old email on gmail based? Or it was somewhere else, and your ISP blocks all other email addresses except gmail email address? Can you perhaps explain in more details what was working before, and doesn't work now? (Of course, be careful to exclude all sensitive information such as real email addresses ...)

For example, I'm using Sylpheed, which is more-less a clone of the clawmail, and I have configured it to have regular access to my gmail address, along with my job email. And it works from everywhere, including my how via ISP.


Postpone all your duties; if you die, you won't have to do them ..

Offline

#4 2019-10-09 21:32:09

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

TeoBigusGeekus wrote:

Got you buddy

That's using sound if greater than o "new mails"

OK deeper:  No sound here (headphone is watching a movie)
I would like the # of new mails  ie: 5 maube  smile


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#5 2019-10-09 22:55:15

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

iMBeCil wrote:
Sector11 wrote:

Due to my ISP forcing people to use Windows and Chrome to get email I no longer have my emaill address I have been using for 10 years.

Sorry to hear this Sector ... but are you sure that the reason is what you think it is? I mean, it looks quite a trouble for your ISP to check that standard mail transfer is originated from Windows, and not from Linux? I'm not saying it is impossible (probably), but it is quite difficult on the ISP side ... if I understand what your problem really is. Perhaps, I don't understand. Were you 10-years-old email on gmail based? Or it was somewhere else, and your ISP blocks all other email addresses except gmail email address? Can you perhaps explain in more details what was working before, and doesn't work now? (Of course, be careful to exclude all sensitive information such as real email addresses ...)

For example, I'm using Sylpheed, which is more-less a clone of the clawmail, and I have configured it to have regular access to my gmail address, along with my job email. And it works from everywhere, including my how via ISP.

Fought with the for 12 days of no email.  My ISP bought out another ISP and were merging the systems.
My email came directly from my ISP for that last 10+ years - into claws for my account and into thunderbird for my wife's account.

Started with a few days we could not connect for and hour, a couple of hours, 30 minutes ... then one day could not connect for the entire day.   Now consider I have some mails that dated back to day one with these people and still a bunch of mails from lavabit.com (remember them - Wikileaks).  So as I said the day after we could not get mail for the complete day we phoned, my wife contacted then via WhatsApp and Twitter.  They kept telling us that according to "Their system all was fine." we can get email.  We could not and I sent them an image of "our client page" which shows my account (top), my wife's account (middle) and my MIL's were "Inactive".  NOT A THING ON OUR END HAD CHANGED.

}2019-09-27_150920_S11_2.md.jpg

On the 12th day of arguing with them a techie finally told us they were having problems and that we need to install Windows on a partition on our computer and install Chrome to read our mail.  That's when I gave fibertel the "The Middle Fickle Finger of Fate Award"

I have avoided "Googlemail" from day one, and at some point in time it changed to "gmail".  Now I have a choice:
gmail
hotmail
yahoomail

I would LOVE to have had claws and thunderbird set to get gmail BUT .... OH POO!!!

I keep getting"Network Log":

* Account 'S11': Connecting to SMTP server: smtp.gmail.com:465...
*** Connection closed by the remote host.

Would love to know how you do it.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#6 2019-10-09 23:24:27

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 649

Re: GMAIL script for conky

^Here is my Sylpheed config:

iJv920Us_t.png 3DErhHUS_t.png KZ6GJrog_t.png EUiSSgsL_t.png cDx2raFK_t.png

The first scrot is from 'Configuration | Edit accounts ...'

On the second scrot, the field at the bottom called 'User ID' has my full gmail address "something@gmail.com" (but is not visible since the entry box is quite short).

HTH

Last edited by iMBeCil (2019-10-10 08:02:26)


Postpone all your duties; if you die, you won't have to do them ..

Offline

#7 2019-10-10 04:09:17

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,153

Re: GMAIL script for conky

Sector11 wrote:

That's using sound if greater than o "new mails"

OK deeper:  No sound here (headphone is watching a movie)
I would like the # of new mails  ie: 5 maube  smile

Create a folder in your home folder named conky_gmail.
Put the script in there and create another folder inside the conky_gmail folder called mail_sounds.
Put some wavs inside it (here, have some of mine).
The number of new mails is the number in the first line of the mails_number file.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#8 2019-10-10 07:37:23

unklar
Member
Registered: 2015-10-31
Posts: 949

Re: GMAIL script for conky

https://www.claws-mail.org/faq/index.ph … with_Gmail
https://www.claws-mail.org/faq/index.ph … ccounts.3F

I agree with the opinion of iMBeCiI. With claws-mail this should still work.
I have to test it myself...   wink

Offline

#9 2019-10-10 11:56:30

unklar
Member
Registered: 2015-10-31
Posts: 949

Re: GMAIL script for conky

I took the test, my friend.  (Negative)

The decisive factor is how the account was created with gmail.
In my case, I had created a fictitious account on an Android tablet some time ago (so that they would be satisfied).

Google not only remembers the device, but it automatically marks the login to the account "with secure app" and blocks ALL other logins. (A "protection" against hacker attacks) glasses
With claws-mail I have no chance, unless I log in to Google and mark my account with "allow less secure app".

My test caused Google to send a critical security warning to my gmail account that "a person with my username and password" has attempted to log in and successfully prevented it.   big_smile

Offline

#10 2019-10-10 13:39:11

iMBeCil
WAAAT?
From: Edrychwch o'ch cwmpas
Registered: 2015-09-29
Posts: 649

Re: GMAIL script for conky

@unklar: quite, this might be the case with Sector as well. Good observation.

Personally, I have no idea what type of acct I have on gmail ... now and then I receive a notification from gmail about 'new device' which logs in to my acct, but it is always myself doing stuff ... Anyhow, I regularly connect to my gmail acct with my Sylpheed, my Android phone, and occasionally via web with palemoon. And it all works flawlessly.


Postpone all your duties; if you die, you won't have to do them ..

Offline

#11 2019-10-24 16:59:27

obscurant
Member
Registered: 2017-08-06
Posts: 142

Re: GMAIL script for conky

This isn't necessary, but here's the script I've been using for ages

#!/bin/bash
 
gmail_login="username" 
gmail_password="password"
 
nbmail="$(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 "$nbmail" ]; then
echo "Error"
else
  if [ $nbmail != 0 ]; then
    echo "$nbmail messages"
    aplay ~/.conky/igor.wav
  else
  echo "$nbmail messages"
  fi
fi

And in conky (checks mail every 300 seconds)

${execi 300 sh ~/.conky/.gmail.sh}

And a few "new email" sounds I ripped from a couple of movies

From Eurotrip: "Mail Motherf*cker"
From Brainscan (1994): "You have a call Master"

Offline

#12 2019-10-24 18:42:18

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

Sorry ... never got notified that there were replies ....

catch up time.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#13 2019-10-24 18:52:32

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

iMBeCil wrote:

^Here is my Sylpheed config:

{snip}

The first scrot is from 'Configuration | Edit accounts ...'

On the second scrot, the field at the bottom called 'User ID' has my full gmail address "something@gmail.com" (but is not visible since the entry box is quite short).

HTH

Not the same as Claws and mine still does not work  sad
But huge Thank you.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#14 2019-10-24 19:55:02

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

unklar wrote:

I took the test, my friend.  (Negative)

The decisive factor is how the account was created with gmail.
{snip}

Yup ... that's what happened here too.  sad
GRRRRR....


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#15 2019-10-24 19:57:44

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

iMBeCil wrote:

@unklar: quite, this might be the case with Sector as well. Good observation.

Personally, I have no idea what type of acct I have on gmail ... now and then I receive a notification from gmail about 'new device' which logs in to my acct, but it is always myself doing stuff ... Anyhow, I regularly connect to my gmail acct with my Sylpheed, my Android phone, and occasionally via web with palemoon. And it all works flawlessly.

I HATE YOU!!!!!!

{... said with a snicker, a wink, and a smile}
lol  lol  lol  lol  lol


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#16 2019-10-24 20:02:02

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

obscurant wrote:

This isn't necessary, but here's the script I've been using for ages

says who ... testing.  thank you


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#17 2019-10-24 20:11:46

damo
....moderator....
Registered: 2015-08-20
Posts: 5,198

Re: GMAIL script for conky

Sector11 wrote:
obscurant wrote:

This isn't necessary, but here's the script I've been using for ages

says who ... testing.  thank you

If it errors out it is probably because you need to enable unsecure apps in your google settings. I'm a bit uncomfortable with that sad


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#18 2019-10-24 20:28:47

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

TeoBigusGeekus wrote:
Sector11 wrote:

That's using sound if greater than o "new mails"

OK deeper:  No sound here (headphone is watching a movie)
I would like the # of new mails  ie: 5 maube  :)

Create a folder in your home folder named conky_gmail.
Put the script in there and create another folder inside the conky_gmail folder called mail_sounds.
Put some wavs inside it (here, have some of mine).
The number of new mails is the number in the first line of the mails_number file.

Had reply written but like so many times hit [Preview] instead of [Submit]
DUMB DUMBER and SECTOR11  :lol:  :lol:

Made 2
/media/5/Conky/GMail_scripts/gmail_s11.sh
/media/5/Conky/GMail_scripts/gmail_s12.sh

made changes as needed and:
/media/5/Conky/GMail_scripts/mails_s11: 1

Now I wish I had speakers ... I like yoda.wav  :)


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#19 2019-10-26 03:26:54

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,019
Website

Re: GMAIL script for conky

damo wrote:

...enable unsecure apps in your google settings. I'm a bit uncomfortable with that sad

Isn't that just their way of scaring you away from using Linux systems, or anything they don't have full control of?


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#20 2019-10-26 04:59:35

Sector11
The Tpyo Knig Mod
From: 77345 ¡#
Registered: 2015-08-20
Posts: 5,653

Re: GMAIL script for conky

johnraff wrote:
damo wrote:

...enable unsecure apps in your google settings. I'm a bit uncomfortable with that sad

Isn't that just their way of scaring you away from using Linux systems, or anything they don't have full control of?

I think you hit it dead on John... from Using Claws Mail with Gmail

Claws mail site: wrote:

In your Gmail settings, turn on "Enable less secure app access". (Gmail's "enable less secure app access" is a euphemism for "apps that don't support OAUTH2", it does not mean programs such as Claws Mail, are less secure.)

Then I read this:

OAuth is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords.[1] This mechanism is used by companies such as Amazon,[2] Google, Facebook, Microsoft and Twitter to permit the users to share information about their accounts with third party applications or websites.

Yup, just what I want - a third party right there in the middle ... NOT!

Now if Claws would only do what they say it should do.  Meantime - thunderbird and the conky script works just fine.


BunsenLabs Forum Rules ---== I'm a Conky 1.9'er ==---
System:    Host: d67 Kernel: 4.9.0-9-amd64 x86_64 (64 bit gcc: 6.3.0)
Desktop: Openbox 3.6.1 Distro: Debian GNU/Linux 9 (stretch)

Offline

#21 2019-10-26 06:36:06

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,019
Website

Re: GMAIL script for conky

I've been using Thunderbird for long years - since Windows 98 days - and getting everything just the way you want it can take some time, but once you're there it works pretty well. But I guess the same would be said about Mutt or...


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#22 2019-10-26 06:57:34

ohnonot
...again
Registered: 2015-09-29
Posts: 4,129
Website

Re: GMAIL script for conky

johnraff wrote:
damo wrote:

...enable unsecure apps in your google settings. I'm a bit uncomfortable with that sad

Isn't that just their way of scaring you away from using Linux systems, or anything they don't have full control of?

It is exactly that.

Offline

#23 2019-10-26 10:25:52

damo
....moderator....
Registered: 2015-08-20
Posts: 5,198

Re: GMAIL script for conky

johnraff wrote:
damo wrote:

...enable unsecure apps in your google settings. I'm a bit uncomfortable with that sad

Isn't that just their way of scaring you away from using Linux systems, or anything they don't have full control of?

But in this case the script sends your credentials in plaintext, which is vulnerable to a packet sniffer, so it is definitely "unsecure" whether linux or not.


Be Excellent to Each Other...

FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#24 2019-10-27 03:01:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,019
Website

Re: GMAIL script for conky

damo wrote:
johnraff wrote:
damo wrote:

...enable unsecure apps in your google settings. I'm a bit uncomfortable with that sad

Isn't that just their way of scaring you away from using Linux systems, or anything they don't have full control of?

But in this case the script sends your credentials in plaintext, which is vulnerable to a packet sniffer, so it is definitely "unsecure" whether linux or not.

Ah yes, that script itself looks a bit insecure but I doubt if Google (yet) have any idea about what scripts people are proposing to use when they ask to "enable insecure apps". I still think it basically just means anything G don't have control of, rather than some specific encryption settings.


John
--------------------
( a boring Japan blog , Japan Links, idle twitterings  and GitStuff )
In case you forget, the rules.

Offline

#25 2019-10-27 12:00:44

ohnonot
...again
Registered: 2015-09-29
Posts: 4,129
Website

Re: GMAIL script for conky

damo wrote:

But in this case the script sends your credentials in plaintext, which is vulnerable to a packet sniffer, so it is definitely "unsecure" whether linux or not.

Ah, but that's the beauty of it: Google's arguments always seem to make so much sense!
You are right though: it has nothing to do with Linux.
It has everything to do with Google.

Generally speaking, if you can use SSL to access your mailbox, credentials are NOT sent as clear text, no matter whether you use the command line or thunderbird or the Browser - I think...

Offline

Board footer

Powered by FluxBB