Results 1 to 10 of 438

Thread: Conky SSL Email Python Script

Threaded View

  1. #1
    Join Date
    Feb 2008

    Conky SSL Email Python Script

    ArchLinux : Package support is present in the AUR. All my packages can be seen here:

    Ubuntu/Debian : All the script packages have now been copied into the Conky Companions PPA. Any package updates will be provided by the team through this new ppa. The ppa can be found here: To use this ppa first delete the old ppa files using this:
    sudo rm /etc/apt/sources.list.d/m-buck* && sudo rm /etc/apt/sources.list.d/conkyhardcore*
    Then follow the modified first post instructions for the scripts


    This is a simple script to return the count of emails in an inbox, it supports SSL (secure) and standard connections to IMAP and POP3 services on the standard port numbers.

    Currently a mail message count of unread emails is returned for IMAP accounts, for POP3 accounts I still need to figure out how I will provide this, currently the total email count is returned. POP3 is a very old and limited protocol, hence the issues.

    There is a README with the install, I suggest you give it atleast a quick once over! It can be found in the installation folder, normally following the path of /usr/share/conky<scriptname>/

    Basic Install

    Method 1: Using apt

    1) Add the repository to your OS install:
    sudo add-apt-repository ppa:conky-companions/ppa
    * Note if you are running 9.10 or below then refer to the PPA link at the end of this post for help on installing from the ppa, good guidance can be found on the launchpad site

    2) Now that is done simply run the following to update your repo cache and install the script:

    sudo apt-get update && sudo apt-get install conkyemail
    Method 2: Using deb file

    Run the .deb file available at the Conky Companions PPA site here:

    Warning, this will not ensure you are kept up-to-date. Only method 1 will do that

    Method 3: Using tar.gz file

    Extract all the contents of the tar.gz file to an appropriate folder, and edit the conkyEmail script to point to the correct location where is. The tar.gz file is available at the Conky Companions PPA site here:

    Unless you are using a non-Debian based OS I don't suggest this. Users of Debian/Ubuntu flavour OS's should ideally use method 1.

    Again will will not receive updates using this method. ONLY method 1 can do this for you

    All further details on setup are orientated around the deb package based install, so may differ from what you choose your setup to be, if done using the tarball.

    Usage Help

    You can get the current help options at any time by running (change the path as necessary):

    conkyEmail -h

    conkyEmail --help
    Usage: conkyEmail [options]
      -h, --help            show this help message and exit
      -m SERVERTYPE, --servertype=SERVERTYPE
                            servertype to check [default: POP] The server type
                            options are POP or IMAP
      -s SERVERNAME, --servername=SERVERNAME
                            server name to access [default:]
                            The server name should be either a domain name or ip
      -o NUMBER, --port=NUMBER
                            Define an alternative port number to use other than
                            the default for the protocol/ssl
      -f FOLDER, --folder=FOLDER
                            [default: Inbox] IMAP folder to check, not applicable
                            for POP mail checks
      -e, --ssl             Use an SSL based connection.
      -u USERNAME, --username=USERNAME
                            username to login with
      -p PASSWORD, --password=PASSWORD
                            Password to login with, if not set the username is
                            used to fetch a 'conky' password from the keyring
      -t FILE, --template=FILE
                            define a template file to generate output in one call.
                            A displayable item in the file is in the form
                            [--servertype=IMAP --ssl
                            --folder=Inbox --username=joebloggs
                            --password=letmein, --connectiontimeout=10]. Note that
                            the short forms of the options are not currently
                            supported! None of these options are applicable at
                            command line when used in templates.
      -i NUMBER, --mailinfo=NUMBER
                            [default: 0] The number of newest emails to output
                            'from' and 'subject' information for. Not applicable
                            at command line when using templates.
      -w NUMBER, --maxwidth=NUMBER
                            [default: 80] Define the number of characters to
                            output per line
      -l NUMBER, --linelimit=NUMBER
                            [default: 0] If above zero this limits the number of
                            lines output for mail info
      -q CHAR, --quote=CHAR
                            [default: "] The character to use for quotations
                            around the subject line
      -c NUMBER, --connectiontimeout=NUMBER
                            [default: 10] Define the number of seconds before a
                            connection timeout can occur. Not applicable at
                            command line when using templates.
      -v, --verbose         request verbose output, not a good idea when running
                            through conky!
      -V, --version         Displays the version of the script.
      --errorlogfile=FILE   If a filepath is set, the script appends errors to the
      --infologfile=FILE    If a filepath is set, the script appends info to the
    The important thing to note now is that the script is called using this in Conky:

    {execi 1800 conkyEmail ...options...}
    Rather than something like this as before:

    {execi 1800 python /path/to/file/ ...options...}
    Development History

    Development history going forwards can be seen here
    All packages available from me can be found here:
    Attached Images Attached Images
    Last edited by kaivalagi; February 26th, 2011 at 10:40 AM. Reason: Updated script, see dev history

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts