<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
 <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <META NAME="GENERATOR" CONTENT="lfparser_2.52">
 <META NAME="LFCATEGORY" CONTENT="Applications">
 <link rel="icon" href="../../common/images/lf-16.png" type="image/png">
 <TITLE>lf364, Applications: Checking gpg mail signatures with Sylpheed-Claws</TITLE>
<style type="text/css">
<!--
 td.top {font-family: Arial,Geneva,Verdana,Helvetica,sans-serif; font-size:12 }
 pre { font-family:monospace,Courier }
 pre.code { font-family:monospace,Courier;background-color:#aedbe8; }
 p.cl { color:#EE9500 }
 table.left { margin-right:0.3cm }
 a.nodec { text-decoration:none }
 p.trans { font-size:8pt; text-align:right }
 p.clbox { width:50%; alignment:center; background-color:#FFD700; 
           border-style:none; border-width:medium; border-color:#FFD700; 
           padding:0.5cm;  text-align:center }
 p.code { width:80%; alignment:center; background-color:#aedbe8; 
          border-style:none; border-width:medium; border-color:#aedbe8; 
          padding:0.1cm;  text-align:left }
 p.foot { background-color:#AAAAAA; color:#FFFFFF; border-style:none; 
          border-width:medium; border-color:#AAAAAA; padding:0.5cm ; 
          margin-top:0.1cm; margin-right:1cm; margin-left:1cm; 
          text-align:center }
 div.tbbutton {
   background: #ddd;
   border-right: 1px solid #aaa;
   border-bottom: 1px solid #aaa;
   margin: 2px 5px 2px 5px;
   text-align: center;
   width: 20em;
   line-height: 1.2em;
   padding: 2px;
   font-size: 12px;
   white-space: nowrap;
   color: #555;
 }
 div.bbutton {
   background: #ddd;
   border-right: 1px solid #aaa;
   border-bottom: 1px solid #aaa;
   float: left;
   margin: 2px 5px 2px 5px;
   text-align: center;
   line-height: 1.2em;
   padding: 2px;
   font-size: 12px;
   white-space: nowrap;
   color: #555;
 }
-->
</style>
 
</HEAD>
<BODY bgcolor="#ffffff" text="#000000">
 <!-- this is generated html code. NEVER use this file for your
 translation work. Instead get the file with the same article number
 and .meta.shtml in its name. Translate this meta file and then
 use lfparser program to generate the final article -->
 <!-- lfparser can be obtained from http://main.linuxfocus.org/~guido/dev/lfparser.html -->

<!-- this is used by a number of tools:
 =LF=AUTHOR: Iznogood
 =LF=CAT___: Applications
 =LF=TITLE_: Checking gpg mail signatures with Sylpheed-Claws
 =LF=NUMBER: 364
 =LF=ANAME_: article364.shtml
 =LF=PARSER: 2.52
 -->

<!-- 2pdaIgnoreStart -->

<!-- start navegation bar, current, style=2 -->
 <!-- top navegation bar -->
 <TABLE summary="topbar_1" cellspacing="0" cellpadding="0" border="0" align="center" width="90%">
   <TR bgcolor="#2e2292">
     <TD class="top"><TABLE summary="topbar_1_logo" cellspacing="0" cellpadding="0" border="0" width=
       "100%">
         <TR><TD width="319"><a href="../../index.shtml"><IMG src="../../common/images/logolftop_319x45.gif"
           alt="[LinuxFocus-icon]" width="319" height="45" align="left" 
           border="0"></a></TD>

           <TD class="top">
             <TABLE summary="topbar_1_links" width="100%">
               <TR align="right">
                 <TD class="top">
                 
                 <A class="nodec" href="../../index.shtml"><FONT color=
                 "#DDDDDD" size="2">&lt;--</FONT></A> &nbsp;| 
                 <A class="nodec" href="../map.html"><FONT color=
                 "#DDDDDD" size="2">Map</FONT></A> &nbsp;| 
                 <A class="nodec" href="../indice.html"><FONT color=
                 "#DDDDDD" size="2">Index</FONT></A> &nbsp;| 
                 <A class="nodec" href="../Search/index.html"><FONT color=
                 "#DDDDDD" size="2">Search</FONT></A> </TD>
                 
               </TR>

               <TR align="right">
                 <TD class="top">
                   <HR width="100%" noshade size="1">
                 </TD>
               </TR>
             </TABLE>
           </TD>
         </TR>
       </TABLE>
     </TD>
   </TR>
 </TABLE>
 <!-- end top navegation bar -->
 <!-- blue bar -->
 <TABLE summary="topbar_2" cellspacing="0" cellpadding="0" border="0" align="center"
 width="90%">
   <TR bgcolor="#00ffff">
     <TD><IMG src="../../common/images/transpix.gif" width="1" height=
     "2" alt=""></TD>
   </TR>
 </TABLE>
 <!-- end blue bar -->
 <!-- bottom navegation bar -->
 <TABLE summary="topbar_3" cellspacing="0" cellpadding="0" border="0" align="center"
 width="94%">
   <TR bgcolor="#000000">
     <TD>
       <TABLE summary="topbar_3_links" cellspacing="0" cellpadding="1" border="0" width=
       "100%">
         <TR align="center">
           <TD WIDTH="20%"><A class="nodec" href="../News/index.html"><FONT color=
           "#FFFFFF">News</FONT></A> </TD>
           <TD WIDTH="5%"><FONT color="#FFFFFF">|</FONT> </TD>
           <TD WIDTH="20%"><A class="nodec" href="../Archives/index.html"><FONT color=
           "#FFFFFF">Archives</FONT></A> </TD>
           <TD WIDTH="5%"><FONT color="#FFFFFF">|</FONT> </TD>
           <TD WIDTH="20%"><A class="nodec" href="../Links/index.html"><FONT color=
           "#FFFFFF">Links</FONT></A> </TD>
           <TD WIDTH="5%"><FONT color="#FFFFFF">|</FONT> </TD>
           <TD WIDTH="20%"><A class="nodec" href="../aboutus.html"><FONT color=
           "#FFFFFF">About LF</FONT></A> </TD>
         </TR>
       </TABLE>
     </TD>
   </TR>
 </TABLE>
 <!-- end bottom navegation bar -->
<!-- stop navegation bar -->

<!-- SSI_INFO -->

<!-- tr_staticssi include virtual -->
<!-- tr_staticssi exec cmd -->
<!-- addedByLfdynahead ver 1.5 --><TABLE ALIGN="right" border=0><TR><TD ALIGN="right"><FONT SIZE="-1" FACE="Arial,Helvetica">This document is available in: <A href="../../English/January2005/article364.shtml">English</a> &nbsp;<A href="../../ChineseGB/January2005/article364.shtml">ChineseGB</a> &nbsp;<A href="../../Deutsch/January2005/article364.shtml">Deutsch</a> &nbsp;<A href="../../Francais/January2005/article364.shtml">Francais</a> &nbsp;<A href="../../Indonesian/January2005/article364.shtml">Indonesian</a> &nbsp;<A href="../../Turkce/January2005/article364.shtml">Turkce</a> &nbsp;</FONT></TD></TR></TABLE><br>
 


<!-- SSI_INFO STOP -->
<!-- 2pdaIgnoreStop -->

<!-- SHORT_BIO_ABOUT_THE_AUTHOR_AND_INDEX_START -->
<TABLE ALIGN="LEFT" BORDER="0" WIDTH="195" summary="about the author" class="left">
<TR>
<TD>

<img src="../../common/images2/iznoT2.png" alt="[Photo of the Author]" height="100" width="100">
<BR>by  Iznogood <br> <small>&lt;iznogood/at/iznogood-factory.org&gt;</small>
<BR><BR>
<I>About the author:</I><BR>
<!-- aboutauthor_start -->
<p>
Involved in GNU/Linux for a while, I'm now running a Debian
system. Despite electronic studies, I've mostly done a french translation
work for the GNU/Linux community available on
<a href="http://iznogood-factory.org">Iznogood-Factory</a>.
</p>
<!-- aboutauthor_stop -->
<!-- TRANSLATED_TO en -->
<!-- TRANSLATED_TO_STOP -->
<!-- INDEX_START -->
<BR><i>Content</i>:
<UL>
  <LI><A HREF="#364lfindex0">Why check signatures?</A></LI>
  <LI><A HREF="#364lfindex1">About Sylpheed</A></LI>
  <LI><A HREF="#364lfindex2">How to make a signature checker?</A></LI>
  <LI><A HREF="#364lfindex3">Conclusion</A></LI>
  <LI><A HREF="http://cgi.linuxfocus.org/cgi-bin/lftalkback?anum=364">Talkback form for this article</A></LI>
</UL>

</TD></TR></TABLE>
<!-- INDEX_STOP -->
<!-- SHORT_BIO_ABOUT_THE_AUTHOR_AND_INDEX_STOP -->
<!-- HEAD_OF_THE_ARTICLE_START -->
<br>&nbsp;
<table border="0"><tr><td>
<!-- tr_staticssi include virtual -->
<!-- tr_staticssi exec cmd -->
<!-- addedByLfPdf ver 0.1 -->
<TABLE style="border-style:outset; border-width:1px" align="right" bgcolor="#ff9616" cellspacing="1"><TR><TD bgcolor="#ff9616">
        <a href="../Archives/lf-2005_01-0364.pdf"><small>PDF</small></a>
        </TD></TR></TABLE>
         

<H2>Checking gpg mail signatures with Sylpheed-Claws</H2>
 <img src="../../common/images2/article364/syl-gnupg.png" alt="[Illustration]" height="100" hspace="10" width="100">
<!-- ABSTRACT OF THE ARTICLE -->
<P><i>Abstract</i>:
<P>
<!-- articleabstract_start -->

I will try to show how to install a gpg plugin and check a mail
signature within Sylpheed-Claws using some bash pipes commands.


<!-- articleabstract_stop -->

<br><!-- HR divider --><center><font color="#8282e0"><b>_________________ _________________ _________________</b></font></center><br>
</td></tr></table>
<!-- HEAD_OF_THE_ARTICLE_STOP -->
<!-- BODY_OF_THE_ARTICLE_START -->


<A NAME="364lfindex0">&nbsp;</A>
<H3>Why check signatures?</H3>


 <p>I received an email from a friend who ask me : "Why have you send
 me a email with a virus program attached ?" Huuu! Someone had caught
 my email address and sent him a email with my address... He was lucky
 because the virus was detected. But what would have happened if there
 was only a date for a meeting in a town, 150 kms far from his house, as we are
 used to do... or a patch for a program under development. It would be
 a bad day!</p>
<p>
From this time I always sign my emails. And I verify the email signature
when the email have one. One more security against intruders.
But sometimes, I receive a email from a new person with an gpg signature
I haven't yet checked. Since I'm a very lazy guy and I don't want to open
a xterm, write the gpg command to have the public key on my computer
and then verify the signature for each new email address. That's why I
have done it as an action in Sylpheed-Claws.

</p>

<A NAME="364lfindex1">&nbsp;</A>
<H2>About Sylpheed</H2>

Sylpheed is a light, fast graphical GTK mailer and news reader.
It is released in two flavours: Sylpheed, the main branch and
Sylpheed-Claws, the bleeding edge application. Sylpheed-Claws
support GPG with a plugin named PGP/MIME. <br>
You need to have sylpheed-claws, sylpheed-claws-plugins,
sylpheed-claws-pgpmime and gpg compiled on you machine. For Debian
Sarge users, it's easier with aptitude, you just have to download the
packages above (among others but make a search) or you make an <br>

<pre class="code">apt-get install sylpheed-claws sylpheed-claws-plugins sylpheed-claws-pgpmime gpg</pre>

To make it working, you need to go to Configuration -&gt; Plugins then
Load Plugin named pgpmime.so as shown on the images (of course,
you can choose some others plugins to help you using Sylpheed-Claws).<br>

<br>
<center> <img src="../../common/images2/article364/detailplugins.png" alt="[Illustration]"></center><br>

This will show you PGP/MIME on the left. Now, you can close the window.
Then, go to Preferences in the Configuration menu.
<br>
<br>
<center><img src="../../common/images2/article364/config-gpg.png" alt="[Illustration]"></center>
<br>

<p>Then, go to Preferences in the Configuration menu.
On the left you have Confidentiality -&gt; GPG.
Clicking on it will show 4 check boxes. You need to quote at least
the first one (Automatic signature check). Check your messages.
The others are intersting if you sign yours messages: the second
keep your passphrase in memory during the session, the third
gives the focus on the keyboard and the last one warns you if
gpg doesn't work.</p>


If there is one with a signature, you will see a logo on the right of the
message body:<br><br>

<center> <img src="../../common/images2/article364/detailcrtl.png" alt="[Illustration]"></center>
<br>

This icon with a pen shows gpg control is active but the author isn't
in your database or the signature is wrong.




<A NAME="364lfindex2">&nbsp;</A>
<H2>How to make a signature checker?</H2>


<p>

In Sylpheed-Claws, you can do actions with Tools -&gt; Actions when you
are on the email you want to check.
But, first, you must program it in Configuration -&gt; Actions. You open it: <br><br>

<center> <img src="../../common/images2/article364/config-action.png" alt="[Illustration]"></center>
<br>

<p>On menu name, you put the command name (you can choose the one you
wan) and the command in Command (very difficult!) and you Add it.
Here is the command piped to do the gpg check:<p/>
<br>

<pre class="code">
 ID=`cat %f | grep "From" | grep "&lt;" | grep "&gt;" | cut -f2 -d\&lt; | cut -f1 -d\&gt; `;
 xterm -e gpg --keyserver wwwkeys.ch.pgp.net --search-key $ID </pre>

in one line.

The normal gpg command is :

<pre class="code">
 gpg --keyserver servername --search-key email-address </pre>

 with sylpheed-claws, we open it in a xterm with "xterm -e" because
 we always need to choose one name option.

 To have the email-address, the $ID:

 <li>we read the message with the cat %f</li>
 <li>we search the From line with "&lt;" and "&gt;"</li>
 <li>we keep everything before "&lt;" and after "&gt;"</li>
 and we have the address.

 When we check an email address with Actions, it goes on the
 wwwkeys.ch.pgp.net keyserver but you can replace it by yours or
 have two different actions with two different keyservers, as I do.<br>
 You will have this xterm:<br>
<br>

<center> <img src="../../common/images2/article364/xterm.png" alt="[Illustration]"></center>
<br>

Choose the right address and the xterm window exits. You just have to
check again the icon on the right that will open a button on the bottom
to reverify. It's done!

 You will have this icon window:<br><br>

<center> <img src="../../common/images2/article364/detailcrtl2.png" alt="[Illustration]"></center>
<br>

If not, that mean the signature is wrong and you can put it in Trash.<br>
<br>

If you have this icon box that mean the sender is a friend or a
trusted person on your gpg database because he/she needs to have
been trusted by you.

<br><br>

<center> <img src="../../common/images2/article364/detailcrtl3.png" alt="[Illustration]"></center>
<br>

 You will only have to do it one time for a new email identity then
 all emails will be automatically checked and your security will be
 improved.


 <A NAME="364lfindex3">&nbsp;</A>
<H2>Conclusion</H2>


 It will be easy to adapt the bash pipes commands to another mailer
 graphical or not.
 It is quite easy to check your emails automatically. One other
 advantage: theses controlled emails don't need to pass the spam
 process because you have checked the address one time and,
 as far as I know, spams don't use gpg signature. There is undoubtedly
 a way to put a control over signed mails directly in the input with
 procmail to validate them directly but it will be another story you will
 find on <a href="http://iznogood-factory.org">Iznogood-Factory</a>.


 <br>
 <br>
 You can find more informations about gpg and email signatures on:<br><br>
 <a href="http://www.gnupg.org/">http://www.gnupg.org/</a>
 <br><br>

 and for Sylpheed-Claws, it is
 <a href="http://sylpheed-claws.sourceforge.net/">here</a>.
 <br>
 <br>



<!-- vim: set sw=2 ts=2 et tw=74: -->

<!-- BODY_OF_THE_ARTICLE_STOP -->
<!-- 2pdaIgnoreStart -->
<A NAME="talkback">&nbsp;</a>
<h2>Talkback form for this article</h2>
Every article has its own talkback page. On this page you can submit a comment or look at comments from other readers:
<center>
    <table width="250" border=0><tr><td>
    <div class="tbbutton"><A class="nodec" href="http://cgi.linuxfocus.org/cgi-bin/lftalkback?anum=364">&nbsp;talkback page&nbsp;</a></div>
    </td></tr></table>
</center>

<br clear="all">
<HR size="2" noshade>
<table width="250" border=0><tr><td>
<div class="bbutton"><a class="nodec" href="../../index.shtml">&lt;--, LF Home</a></div>
</td><td>
<div class="bbutton"><a class="nodec" href="index.shtml">Go to the index of this issue</a></div>
</td></tr></table>
<br clear="all">
<HR size="2" noshade>
<!-- ARTICLE FOOT -->
<CENTER><TABLE WIDTH="98%" summary="footer">
<TR><TD ALIGN=CENTER BGCOLOR="#bdc6d5" WIDTH="50%">
<A HREF="../../common/lfteam.html">Webpages maintained by the LinuxFocus Editor team</A>
<BR><FONT COLOR="#1111aa"><a href="../../common/copy.html">&copy; Iznogood</a><br>&quot;some rights reserved&quot; see <a href="../../license/index.shtml">linuxfocus.org/license/</a><br><a href="http://www.linuxfocus.org">http://www.LinuxFocus.org</a></FONT>
</TD>
<TD BGCOLOR="#bdc6d5">
<!-- TRANSLATION INFO -->
<font size=2>Translation information:</font>
<TABLE summary="translators">
  <tr><td><font size="2">en --&gt; -- : Iznogood <small>&lt;iznogood/at/iznogood-factory.org&gt;</small></font></td></tr>
  <tr><td><font size="2">en --&gt; fr: Iznogood &lt;iznogood/at/iznogood-factory.org&gt;</font></td></tr>
</TABLE>
</TD>
</TR></TABLE></CENTER>
<p><font size=1>2005-04-08, generated by lfparser version 2.52</font></p>
<!-- 2pdaIgnoreStop -->
</BODY>
</HTML>