Showing posts with label evolution. Show all posts
Showing posts with label evolution. Show all posts

Monday, April 27, 2009

The Evolution plugin for Mail Notification doesn't work/exist (LP#355209)

In mail-notification 5.4 in Ubuntu Jaunty (9.04), the following files are installed to /usr/lib/evolution/2.24/plugins/ instead of /usr/lib/evolution/2.26/plugins/:
liborg-jylefort-mail-notification.so
org-jylefort-mail-notification.eplug


    A simple workaround:
  1. Copy or link the files to the correct directory:
    sudo ln -s /usr/lib/evolution/2.24/plugins/org-jylefort-mail-notification.eplug /usr/lib/evolution/2.26/plugins/
    sudo ln -s /usr/lib/evolution/2.24/plugins/liborg-jylefort-mail-notification.so /usr/lib/evolution/2.26/plugins/
  2. Restart evolution and go to Edit -> Plugins -> Jean-Yves Lefort's Mail Notification. Check the box.
  3. Right-click on the Mail-Notification icon -> Properties. Add your evolution e-mailbox.

Thursday, July 24, 2008

Creating an Evolution e-mail from the command line and python

Evolution is intended as a GUI e-mail client, so the scripting options are limited. Also, it looks like you cannot autosend e-mail from a script, there's so script command equivalent to the 'send' button.


But that's a good thing; I can autosend from nail when I want to. So a script will compose the e-mail, which will sit on my desktop until I review it and click to send it. Nice.


shell command source

This command creates a window with To:, From:, Subject:, and Body filled in. 'From:' is already known by Evolution, the rest is parsed from the following command:

evolution mailto:person@example.com?subject=Test\&body=Some%20crazy%20story%20stuff%0D%0Acolumn1%09%09column2%09%09column3%0D%0A%0D%0ASincerely,%0D%0A%0D%0AMe


Another (easier) way:
evolution mailto:person@example.com?cc="second_person@example.com"\&subject="This Is The Subject"\&body="This is the body of the message"\&attach=Desktop/test_file.xml
  • evolution mailto:person@example.com - Launches Evolution's e-mail composer and To: line
  • ?cc="Person@example.com" - CC: Line
  • \&subject="Subject" or ?subject="Subject" - Subject line
  • \&body="Body" - Body of the e-mail is everything after this line
  • \&attach=/path/file - Files to attach
  • %20 - Space
  • %0D%0A - CR/LF (new line)
  • %09 - Tab

python command

Python 2.x has it's own smtp module for creating e-mail, it's far more useful in most circumstances. But in this case, we want the composed evolution window.

import os
body_string = 'This is the body of the e-mail message'
body_string = body_string.replace(' ','%20')
os.popen('evolution mailto:person@example.com?subject=Test\&body=' + body_string)
  • import os - Use python's os module
  • body_string = 'This is the body of the e-mail message' - The body in normal text
  • body_string = body_string.replace(' ','%20') - Encode the spaces (evolution will decode them). Tabs, newlines, and other reserved strings need to be encoded.
  • os.popen('evolution mailto:person@example.com?subject=Test\&body=' + body_string) - The 'os.popen(cmd)' executes shell cmd. Note that cmd is just a python string, and you can use all the string tools on it, like adding body_string.
>>> import os
>>> to = 'person@example.com'
>>> cc = '"second_person@example.com"'
>>> subject = '"This is the subject"'
>>> body = '"This is the body"'
>>> attachment = 'Desktop/rss_test.xml'
>>> os.popen('evolution mailto:'+to+'?cc='+cc+'\&subject='+subject+'\&body='+body+'\&attachment='+attachment)

Monday, July 14, 2008

Installing DOD CLASS 3 CA-7 security certificate into Firefox 3.0

Superseded by http://cheesehead-techblog.blogspot.com/2015/10/cac-on-firefox-using-ubuntu-1504.html

The US Army has a plethora of websites to keep it's mighty bureaucracy chugging along. Unfortunately, the security certificate they all require is not included in Firefox 3.0 (under Ubuntu 8.04). Here's how to get it and install it.
NOTE: The certificate is worthless to non-DOD people. It doesn't give you access, you still need an account. It's really boring, anyway, and none of the cool secret stuff is in these websites. All the certificate really does for most people is prevent the annoying message: This website has a certificate that I don't trust.
  1. Download the following three files to the desktop:
    • http://dodpki.c3pki.chamb.disa.mil/rel3_dodroot_1024.p7b
    • http://dodpki.c3pki.chamb.disa.mil/rel3_dodroot_2048.p7b
    • http://dodpki.c3pki.chamb.disa.mil/dodeca.p7b


    The easy way in linux is to use curl -O http://dodpki.c3pki.chamb.disa.mil/rel_dodroot_1024.p7b -O http://dodpki.c3pki.chamb.disa.mil/rel3_dodroot_1024.p7b -O http://dodpki.c3pki.chamb.disa.mil/dodeca.p7b

  2. Go to the Firefox Certificate Manager
    • Open Firefox
    • Edit Menu --> Preferences
    • Advanced settings
    • Encryption tab
    • View Certificates button

  3. Import the three new certificates
    (Repeat for each certificate)
    • Authorities tab
    • Click the 'Import' button
    • Show firefox where the downloaded certificate is and click 'OK'

  4. Fix a bug with the CLASS 3 CA-7 Certificate
    • In the Certificate Manager, Authorities Tab, scroll down to the new 'US Government' entries
    • Select DOD CLASS 3 CA-7, and click the 'Edit' button
    • Two of the certificate boxes should be checked. Check them if they are not:

      This certificate can identify web sites

      This certificate can identify mail users

  5. Whew. You're done. Close the windows, restart Firefox and test it.
Importing the same certificates to Evolution is a similar method.