Reply
Thread Tools
Posts: 5 | Thanked: 8 times | Joined on Jun 2010
#1
Since there is no native support and I could not find any other way to read my PGP encrypted emails on my N950 I like to share the work-around solution I find useful for me:
  • install less by apt-get install less (not sure if it is already pre-installed?)
  • put your OpenPGP keys into /home/user/.gnupg
  • put the following script to /home/user/decrypt:
    Code:
    MAXAGE=1
    
    # search for files with GnuPG pattern
    files=`find /home/user/.qmf/mail/ -mtime -$MAXAGE | xargs grep -l GnuPG`
    nr_files=`echo $files | wc -w`
    
    # search successful?
    if [ $nr_files -gt 0 ]
    then
        # we found OpenPGP encryted files
        echo "$nr_files encrypted emails found."
    
        # loop through all of them
        for mail in $files
        do
            # handle current file
            #echo "Found "$mail
    
            # check if encryption is inline PGP or PGP/MIME attachment
            if [ `echo $mail | grep parts` ]
            then
                # found PGP/MIME
                # determine main email file by removing -part/2 suffix
                mainfile=`echo $mail | cut -d'-' -f 1`
                grep -i -e from: -e subject: $mainfile
            else
                # found inline PGP email
                grep -i -e from: -e subject: $mail
            fi
    
            # ask user whether we decrypt this file
            read -p "Take this email (Y|n)?" -n1 choice
    
            if [ $choice != "n" ]
            then
                gpg -d $mail | less
                exit
            fi
        done
    else
        echo "No GnuPG encrypted emails found during last $MAXAGE days." | less
    fi
  • create a desktop icon by putting the following content into /usr/share/applications/decrypt.desktop:
    Code:
    [Desktop Entry]
    Encoding=UTF-8
    Type=Application
    Name=Decrypt
    Exec=/usr/bin/meego-terminal -n -e sh /home/user/decrypt
    Icon=icon-l-terminal

The script searches for all encrypted email you received during the last day. If you want to increase the period, just change MAXAGE in /home/user/decrypt.

I hope this is useful for somebody else...
 

The Following 6 Users Say Thank You to roman4 For This Useful Post:
Posts: 6 | Thanked: 0 times | Joined on Jan 2012 @ germany
#2
does this also work for the n9?
i didn't find a usable gpg-mail-decrypt-app for the n9 either.
 
Posts: 5 | Thanked: 8 times | Joined on Jun 2010
#3
Originally Posted by wirwe View Post
does this also work for the n9?
Yes, it should also work for the N9.
 
Posts: 112 | Thanked: 26 times | Joined on Sep 2009
#4
Thanks for this. I was looking for a solution.
 
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#5
Can I GPG-sign mails before i send them?
 
Reply

Tags
decrypt, email, gnupg, openpgp

Thread Tools

 
Forum Jump


All times are GMT. The time now is 09:51.