[Solved] gpg --list-public-keys (removed duplicate - see my last post)

I followed https://wiki.archlinux.org/index.php/GnuPG#Create_key and https://wiki.archlinux.org/index.php/Talk:Pacman-key, but I have ended up with my public key being listed twice. It's both first and last in the full list of public keys. Here is just mine:
/home/colin% gpg --list-public-keys colin
pub   4096R/0940E3F9 2014-11-18 [expires: 2015-11-18]
uid       [ultimate] Colin Keenan <[email protected]>
uid       [ultimate] [jpeg image of size 6283]
sub   4096R/EDA19F9C 2014-11-18 [expires: 2015-11-18]
pub   4096R/0940E3F9 2014-11-18 [expires: 2015-11-18]
uid       [ultimate] Colin Keenan <[email protected]>
uid       [ultimate] [jpeg image of size 6283]
sub   4096R/EDA19F9C 2014-11-18 [expires: 2015-11-18]
How do I remove just the 2nd entry so that my public key is only listed one time?
I am afraid to start signing my packages (https://wiki.archlinux.org/index.php/De … ge_signing) before I fix this issue.
Edit to add what I've tried so far:
gpg -o colin.gpg --export colin            # to create a backup of my public key in a file called colin.gpg
cp pubring.gpg pubring-backup.gpg   # in case I screw up pubring.gpg
gpg --import colin.gpg                          # hoping it will magically merge the duplicate, but it left both unchanged
gpg --delete-key colin                           # hoping it would delete both copies of the public key so I could import it again
It refused to delete the public key until I delete the private key which I don't want to do.
I also realized the export may have the duplicate as well. I tested that with:
gpg colin.gpg
And, sure enough, it listed my key twice.
Another edit: I have tried a lot and exposed a bug that I will try to submit upstream. Here is what I have done:
gpg --edit-key colin                              # this selected the first of the duplicate keys to be edited
gpg> adduid
Real name: Colin N Keenan
Email address: [email protected]
Comment:
You selected this USER-ID:
    "Colin N Keenan <[email protected]>"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
You need a passphrase to unlock the secret key for
user: "Colin Keenan <[email protected]>"
4096-bit RSA key, ID 0940E3F9, created 2014-11-18
pub  4096R/0940E3F9  created: 2014-11-18  expires: 2015-11-18  usage: SC 
                     trust: ultimate      validity: ultimate
sub  4096R/EDA19F9C  created: 2014-11-18  expires: 2015-11-18  usage: E   
[ultimate] (1)  Colin Keenan <[email protected]>
[ultimate] (2)  [jpeg image of size 6283]
[ unknown] (3). Colin N Keenan <[email protected]>
gpg> save
gpg --edit-key "Colin N Keenan"
Secret key is available.
pub  4096R/0940E3F9  created: 2014-11-18  expires: 2015-11-18  usage: SC 
                     trust: ultimate      validity: ultimate
sub  4096R/EDA19F9C  created: 2014-11-18  expires: 2015-11-18  usage: E   
[ultimate] (1). Colin N Keenan <[email protected]>
[ultimate] (2)  Colin Keenan <[email protected]>
[ultimate] (3)  [jpeg image of size 6283]
gpg> 2
pub  4096R/0940E3F9  created: 2014-11-18  expires: 2015-11-18  usage: SC 
                     trust: ultimate      validity: ultimate
sub  4096R/EDA19F9C  created: 2014-11-18  expires: 2015-11-18  usage: E   
[ultimate] (1). Colin N Keenan <[email protected]>
[ultimate] (2)* Colin Keenan <[email protected]>
[ultimate] (3)  [jpeg image of size 6283]
gpg> deluid
Really remove this user ID? (y/N) y
pub  4096R/0940E3F9  created: 2014-11-18  expires: 2015-11-18  usage: SC 
                     trust: ultimate      validity: ultimate
sub  4096R/EDA19F9C  created: 2014-11-18  expires: 2015-11-18  usage: E   
[ultimate] (1). Colin N Keenan <[email protected]>
[ultimate] (2)  [jpeg image of size 6283]
gpg> quit
Save changes? (y/N) y
And now the bug:
/home/colin% gpg --delete-key "Colin Keenan"
gpg (GnuPG) 2.0.26; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gpg: there is a secret key for public key "Colin Keenan"!
gpg: use option "--delete-secret-keys" to delete it first.
/home/colin% gpg --delete-secret-key "Colin Keenan"
gpg (GnuPG) 2.0.26; Copyright (C) 2013 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
gpg: key "Colin Keenan" not found: Unknown system error
gpg: Colin Keenan: delete key failed: Unknown system error
So, --delete-key fails because there is a secret key, and --delete-secret-key fails because it can't find the secret key!
Last edited by colinkeenan (2014-11-19 16:26:31)

I have solved the issue. Since I had made a backup of .gnupg while there was a duplicate of the public key for "Colin Keenan", I realized the secret key in the backup was also for "Colin Keenan", so I didn't want to delete that one. I should delete "Colin N Keenan" by deleting the secret and public key matching it, then copy the resulting public key file to the backup, then restore the backup. That solved the issue, as follows:
gpg --delete-secret-key "Colin N Keenan"
gpg --delete-key "Colin N Keenan"
cp .gnupg/pubring.gpg .gnupg-backup
rm -r .gnupg
cp -r .gnupg-backup .gnupg
Here is a full outline of the commands I ran to eliminate the duplicate public key, in case anyone else runs into this very unusual problem:
cd                                     # just making sure I'm in home directory so don't have to type dreaded ~
cp -r .gnupg .gnupg-backup
gpg --edit-key colin
gpg> adduid (added Colin N Keenan, original was Colin Keenan)
gpg> save
gpg --edit-key "Colin N Keenan"
gpg> 2 (because "Colin Keenan" was the 2nd uid)
gpg> deluid
gpg> save
gpg --delete-secret-key "Colin N Keenan"
gpg --delete-key "Colin N Keenan"
cp .gnupg/pubring.gpg .gnupg-backup
rm -r .gnupg
cp -r .gnupg-backup .gnupg
Last edited by colinkeenan (2014-11-19 16:41:03)

Similar Messages

  • [solved]gpg: listing keys in keyfile before import

    Alice runs
    gpg --export -a -o pub.asc
    to export her public keys to pub.asc.
    How can Bob list the keys in pub.asc without importing them?
    So far the best solution that I've found is
    gpg --list-only --import pub.asc
    but that seems kludgy because it's still running through the entire import process. Is there any way to inspect the keyfile directly (and maybe extract a subset of keys from it to another file)?
    Last edited by Xyne (2012-03-20 04:10:14)

    Thanks.
    What search terms did you use? I tried several variations of:
    gpg list keys in key file (and keyfile)
    gpg list before import
    gpg inspect key file
    gpg examine key file
    gpg show me the keyfile's secrets
    gpg just list the *%$#%^ keys already
    Nowhere in the man page do I see anything that indicates that "--with-fingerprint" would accept a file argument.
    --fingerprint
    List all keys (or the specified ones) along with their finger‐
    prints. This is the same output as --list-keys but with the
    additional output of a line with the fingerprint. May also be
    combined with --list-sigs or --check-sigs. If this command is
    given twice, the fingerprints of all secondary keys are listed
    too.
    --with-fingerprint
    Same as the command --fingerprint but changes only the format of
    the output and may be used together with another command.
    EXAMPLES
    gpg --list-keys user_ID
    show keys
    gpg --fingerprint user_ID
    show fingerprint
    I had tried "gpg --list-keys <file>" but that doesn't work, so I had no reason to think that --with-fingerprint  would work, as it is really just a modified version of "--list-keys".
    Last edited by Xyne (2012-03-20 04:10:53)

  • Pulling My Hair Out! K7N2 Delta2 & MSI NX6200AX (solved, see link last post)

    Posted about the troubles more then a month ago here: https://forum-en.msi.com/index.php?topic=96306.0 . Quick history, Built my Teens a PC with the Delta2 MB, an old XP1700 CPU, some old DDR, and my old (OC'd for 3 years and still running great) Gainward GF2-Ti. It worked fine. Ran most games just fine and they were happy. Then Son #2 wanted Battlefield 2. Hmmm...it needed Dx9c shader support...which the old card didn't do. So I got (Newegg) a MSI NX6200AX (GF6200 - 128MB - 9c shader support) and its been nothing but nitemares ever since.
    It will boot up (did a clean copy of XP even!) in Windows. But as soon as I open a program that does any crunching (Like say trying to load nVidia drivers) the Monitor screen goes "black"....and the little lites go back and forth like Kit the car on Nightrider!!!!! Meaning it has lost signal.
    Put the old card in and it fine!!!!!!!
    Things I've done trying to fix it:
    Reloaded Windows XP SP2 (right now SP2 is not installed yet)
    RMA'd the Card for another one.
    Bought a new 450W Rosewill PS. (was a nice old Enermax)
    Swapped in my 19" Trinitron (thinking maybe the monitor couldn't support the card since thier monitor is a cheapo 17" CRT. Same thing happened to my monitor!)
    Dug through the Bios with a fine tooth comb.
    Today I added new Kingston DDR I mentioned in another post. Premium HyperX 1GB in Dual Channel. I also re-seated the CPU with new AS5, cleaned out everthing. PC booted up much faster.......
    So I tried to load the drivers......AND IT STILL HAS THE SAME PROBLEM!
    This is an AGP card, like my old one. I'm at a lost here. I'm about to re-install the old card just so I can get them off my PC. (I took a month off working on thiers so they've been living on mine) 
    Any ideas? The MB is Fine, Memory is fine, Power Supply is fine, CPU fine.........
    Thanks for listening, I'm open to ideas.

    Please don't cross post in the forums, it is very confusing
    The 350 watt enermax, what does it say on the sticker on the side of the power supply?
    I'm curious to how much the amps are on the +12v rail..
    Quote
    My quetion now, why would that AGP slot be fine with the old card and overclocking? (sure it was only agp 4x I think, new one is 8x. Dont know what the D.O.T. is......)
    Because you are using a card that has higher power requirements for starters, there could be other factors involved, but that would be the first thing I look at. DOT is Dynamic Overclocking Technology and it's integrated in MSI's drivers. I have a sticky topic about it in the VGA section.
    Without being able to try the card in another PC, and/or trying a more powerful PSU, the troubleshooting is going to be hampered.
    You may consider taking the card to a local shop to see if they can test it for you, and see if the problem follows the card.
    I can't count how many times products are RMA'd becuase of the inablity to properly troubleshoot a problem.
    I am locking this thread and posting the exact same thing in the other one in the VGA forum here https://forum-en.msi.com/index.php?topic=96306.0 <---This issue was solved, by removing overclock settings (Seargent) in the BIOS.

  • Problem with UTL_FILE (please see my last post on this thread)

    Hi all,
    I'm trying to get the code (procedures, functions, etc) of my schemas. I've tried it using DBMS_METADATA.GET_DDL but it fails with many objects. Finally, I'm trying to create a procedure to extract the code.
    I've created this two procedures:
    CREATE OR REPLACE PROCEDURE spool_code (code IN varchar2, propi IN varchar2) is
    CURSOR codigo is
    select text from dba_source where name = code and owner = propi order by line;
    line varchar2(4000);
    BEGIN
    open codigo;
    loop
    fetch codigo into line;
    exit when codigo%notfound;
    dbms_output.put_line(line);
    end loop
    close;
    END;
    CREATE OR REPLACE PROCEDURE ext_codigo is
    CURSOR objeto is
    select object_name, owner from dba_objects where object_type in ('PROCEDURE','FUNCTION','PACKAGE')
    and owner not in ('OUTLN','DBSNMP','SYSTEM','SYS','REPADMIN','PERFSTAT','SPOTLIGHT','MONITOR','PRUEBAS','TOAD')
    and status='VALID';
    nom varchar2(128);
    owner varchar2(30);
    BEGIN
    open objeto;
    loop
    fetch objeto into nom, owner;
    exit when objeto%notfound;
    spool_code(nom, owner);
    end loop;
    close objeto;
    END;
    And I'm calling from sqlplus to spool it:
    SQL> spool Users_code.sql
    SQL> exec ext_codigo;
    But it don't bring me results...
    where is the problem??
    Thanks in advance for your support!
    dbajug
    Edited by: dbajug on Aug 29, 2012 6:36 AM

    Hi,
    yes guys, I've set serverout on using the max limit but, always fails with:
    ERROR at line 1:
    ORA-20000: ORU-10027: buffer overflow, limit of 1000000 bytes
    ORA-06512: at "SYS.DBMS_OUTPUT", line 35
    ORA-06512: at "SYS.DBMS_OUTPUT", line 198
    ORA-06512: at "SYS.DBMS_OUTPUT", line 139
    ORA-06512: at "SYS.SPOOL_CODE", line 15
    ORA-06512: at "SYS.EXT_CODIGO", line 17
    ORA-06512: at line 1
    I'm working with a 9i version trying to extract the code to migrate it to a 11g.
    In order to avoid the buffer error, I've decide use the UTL_FILE package but I'm having another problem: my procedure now is this
    CREATE OR REPLACE PROCEDURE spool_code (code IN varchar2, propi IN varchar2) is
    CURSOR codigo is
    select text from dba_source where name = code and owner = propi order by line;
    line varchar2(4000);
    out_file UTL_FILE.File_Type;
    BEGIN
    begin
    out_file := UTL_FILE.Fopen('/export/home/oracle', 'Users_code.sql', 'w');
    exception
    when others then
    dbms_output.put_line('Error opening file');
    end;
    open codigo;
    loop
    fetch codigo into line;
    exit when codigo%notfound;
    UTL_FILE.Put_Line(out_file, line);
    end loop;
    close codigo;
    UTL_FILE.Fclose(out_file);
    END;
    The directory exists and the file too but fails with this error:
    ERROR at line 1:
    **ORA-29282: invalid file ID**
    ORA-06512: at "SYS.UTL_FILE", line 714
    ORA-06512: at "SYS.SPOOL_CODE", line 23
    ORA-06512: at "SYS.EXT_CODIGO", line 17
    ORA-06512: at line 1
    any idea? about the reason? The file is a text file on the server:
    ls -lrt /export/home/oracle/Users_code.sql
    -rw-rw-r-- 1 oracle dba 0 Aug 29 14:43 /export/home/oracle/Users_code.sql
    best regards,
    dbajug

  • Removing duplicate values from selectOneChoice bound to List Iterator

    I'm trying to remove duplicate values from a selectOneChoice that i have. The component binds back to a List Iterator on the pageDefinition.
    I have a table on a JSF page with 5 columns; the table is bound to a method iterator on the pageDef. Then above the table, there are 5 separate selectOneChoice components each one of which is bound to the result set of the table's iterator. So this means that each selectOneChoice only contains vales corresponding to the columns in the table which it represents.
    The selectOneChoice components are part of a search facility and allow the user to select values from them and restrict the results that are returned. The concept is fine and i works. However if i have repeating values in the selectOneChoice (which is inevitable given its bound to the table column result set), then i need to remove them. I can remove null values or empty strings using expression language in the rendered attribute as shown:
    <af:forEach var="item"
    items="#{bindings.XXXX.items}">
    <af:selectItem label="#{item.label}" value="#{item.label}"
    rendered="#{item.label != ''}"/>
    </af:forEach>
    But i dont know how i can remove duplicate values easily. I know i can programatically do it in a backing bean etc.... but i want to know if there is perhaps some EL that might do it or another setting that ADF gives which can overcome this.
    Any help would be appreciated.
    Kind Regards

    Hi,
    It'll be little difficult removing duplicates and keeping the context as it is with exixting standard functions. Removing duplicates irrespective of context changes, we can do with available functions. Please try with this UDF code which may help you...
    source>sort>UDF-->Target
    execution type of UDF is Allvalues of a context.
    public void UDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
    ArrayList aList = new ArrayList();
    aList.add(var1(0));
    result.addValue(var1(0));
    for(int i=1; i<var1.length; i++){
    if(aList.contains(var1(i)))
         continue;
    else{
    aList.add(var1(i));
    result.addValue(var1(i));
    Regards,
    Priyanka

  • HT2905 How to remove duplicate songs from the iPhone when the duplicates are not listed in the iTunes library on the computer.

    How can I remove duplicate songs from the iPhone4. The duplicates are not listed in the computer iTunes library.

    The simplest thing may be to back-up and then restore the iPhone. If you don't fancy that then remove all media that is currently synced to it, then double check and manually remove any media that remains on the device, before reselecting your sync options.
    If you've been manually managing the device and your library doesn't contain copies of all your media then see Recover your iTunes library from your iPod or iOS device.
    tt2

  • HT2905 My itunes looks nothing like the examples in this tutorial.  I do not have "display exact duplicates" or "date added".  Can someone please help me remove duplicate songs?  Also, I downloaded two audio books and they are showing up in my song list.

    My itunes looks nothing like the examples in this tutorial.  I do not have "display exact duplicates" or "date added".  Can someone please help me remove duplicate songs?  Also, I downloaded two audio books and they are showing up in my song list. Why???

    'Show duplicates' is now under the 'View' menu. To see the 'Date added' column go to 'View options' from the 'View' menu and check it in the section under 'Stats'.
    Click an audiobook once to select it and hit command-i (Mac) or control-i (Windows). Go to the 'Options' tab and set 'Media Kind' to 'Audiobook'.

  • Help needed in removing duplicate items of list box  in java

    How to remove duplicate items of list box while dynamically inserting (on-click event)
    It is not identifying duplicate data
    Variable name is HP_G1
    HP_dmg1 = (DefaultListModel) HP_G1.getModel();
    int a = HP_G1.getModel().getSize();
    System.out.println("HP list no--------> "+a);
    if(a!=0)
    for (int j=0; j<a; j++)
    String item1 = String.valueOf(HP_List.getModel().getElementAt(j));
    System.out.println("HP list added--------> "+item1);
    if(HP_dmg1.equals(item1)){
    HP_dmg1.remove(j);
    else
    HP_dmg1.addElement(GPL);
    }

    Your code is unreadable, so I'll ignore it. In the future please press the message editor's CODE button to format code.
    As to your problem, to the point you normally use a Set instead of List when you don't want duplicates in a collection.

  • Remove duplicates for list object

    Hi,
    I have retrieved all the xml node values in List<object>. Now, I want to remove all the duplicates objects from that list.
    Example:
    If the object has n properties, I should remove only duplicate objects that have same values in all the n properties not just one property as ID or name. Please let me know how to achieve this. Preferably using LINQ. 
    Thank you.
    Regards,
    Kiran

    You can use a GroupBy.  I took the code from last posting
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Xml;
    using System.Xml.Linq;
    using System.IO;
    namespace ConsoleApplication1
    class Program
    static void Main(string[] args)
    string file1 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "<Method>" +
    "<ID>1234</ID>" +
    "<Name>manager</Name>" +
    "<Path>path1</Path>" +
    "</Method>" +
    "<Method>" +
    "<ID>5678</ID>" +
    "<Name>manager</Name>" +
    "<Path>path2</Path>" +
    "</Method>" +
    "<Method>" +
    "<ID>5678</ID>" +
    "<Name>manager</Name>" +
    "<Path>path2</Path>" +
    "</Method>" +
    "</Methods>";
    string file2 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "<Method>" +
    "<Path>path1</Path>" +
    "<Description>text</Description>" +
    "</Method>" +
    "<Method>" +
    "<Path>path2</Path>" +
    "<Description>text</Description>" +
    "</Method>" +
    "</Methods>";
    string file3 = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>" +
    "<Methods>" +
    "</Methods>";
    StringReader reader = new StringReader(file1);
    XDocument doc1 = XDocument.Load(reader);
    reader = new StringReader(file2);
    XDocument doc2 = XDocument.Load(reader);
    reader = new StringReader(file3);
    XDocument newXDoc = XDocument.Load(reader);
    var results = from e1 in doc1.Descendants().Elements("Method")
    join e2 in doc2.Descendants().Elements("Method")
    on e1.Element("Path").Value equals e2.Element("Path").Value
    select new XElement("Method", new object[] { e1.Element("ID"), e1.Element("Name"), e2.Element("Description") });
    var results2 = results.AsEnumerable()
    .GroupBy(x => x.Element("ID").Value);
    var results3 = results2.AsEnumerable()
    .Select(x => x.Take(1));
    newXDoc.Descendants("Methods").Last().Add(results3);
    jdweng

  • Ot - removing duplicates in lists

    hi
    sorry for the ot question.
    i created a very long list of keywords (for seo).
    anyone knows of a tool to remove duplicates? it's really a
    very long list
    thanks
    lenny

    hi
    thank you all
    lenny
    "Walt F. Schaefer" <[email protected]> wrote in
    message
    news:g80fba$9ng$[email protected]..
    > If the list is that long you have at least 10X too many
    words for a single
    > site. You cannot successfully optimize for a gazillion
    keywords. It's all
    > about keyword density.
    >
    > --
    >
    > Walt
    >
    >
    > "lenny" <[email protected]> wrote in message
    > news:g7vot2$h1u$[email protected]..
    >> hi murray
    >>
    >> i need the list for adwords, for creating content
    etc.
    >>
    >> thanks
    >>
    >> lenny
    >>
    http://www.big-t-shirts.com
    >>
    >>
    >>
    >> "Murray *ACE*"
    <[email protected]> wrote in message
    >> news:g7vn9p$fd3$[email protected]..
    >>>> i created a very long list of keywords (for
    seo).
    >>>
    >>> This is not a worthwhile thing to do. The
    keywords meta is ignored by
    >>> the major search engines.
    >>>
    >>> --
    >>> Murray --- ICQ 71997575
    >>> Adobe Community Expert
    >>> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >>> ==================
    >>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>> ==================
    >>>
    >>>
    >>> "lenny" <[email protected]> wrote in
    message
    >>> news:g7vmt6$f1t$[email protected]..
    >>>> hi
    >>>>
    >>>> sorry for the ot question.
    >>>>
    >>>> i created a very long list of keywords (for
    seo).
    >>>>
    >>>> anyone knows of a tool to remove duplicates?
    it's really a very long
    >>>> list
    >>>>
    >>>> thanks
    >>>>
    >>>> lenny
    >>>>
    >>>
    >>
    >>
    >
    >

  • Ho to remove duplicate element in the List ?

    It seem to be very basic, but it not working, even I try different way.
    This my List [10, 10, 11, 11, 12, 12, 13, 13, 14, 14],
    now to remove duplicate elements to have at the end [10, 11, 12, 13, 14]
    my code seem to be perfect but...
    for(int i = 0; i < listA.size(); i++){
         if(i%2 == 0){
              System.out.println("ce i est un nombre pair "+i);
              listA.remove(i);
    System.out.println(listA);

    senore100 wrote:
    The problem is that every single time an element is removed, the whole ArrayList is re-shuffled, with all the elements to the right moved to the left on spot. That's why.Yes, that's right. However if you had used an Iterator over the list, you could easily have removed every other element. It's only when you use an array index that you run into this (very common) problem.

  • [SOLVED] razercfg, AUR and public keys.

    Hello!
    I am wandering about AUR package razercfg, recently is failed to build with error:
    ==> Verifying source file signatures with gpg...
    razercfg-0.31.tar.bz2 ... FAILED (unknown public key 5FB027474203454C)
    ==> ERROR: One or more PGP signatures could not be verified!
    ==> ERROR: Makepkg was unable to build razercfg.
    In the comments to the package I read maintainer's note:
    Import the author's key if you want makepkg to verify the source tarball:
    http://bues.ch/cms/resources/contact.html#gnupg_pgp_key
    So I went to http://bues.ch/cms/resources/contact.html#gnupg_pgp_key and found:
    My PGP key has got the ID number 908D8B0E. It can be obtained from most public key servers like keys.gnupg.net or directly from this site.
    So I imported it like that:
    $ gpg --keyserver hkp://keys.gnupg.net/ --recv-key 908D8B0E
    gpg: key 908D8B0E: public key "Michael Büsch <[email protected]>" imported
    gpg: no ultimately trusted keys found
    gpg: Total number processed: 1
    gpg: imported: 1
    The package is still failing to build with the same error. Afterwards I read notes by other users suggesting to import (another?) key:
    gpg --keyserver hkp://keys.gnupg.net/ --recv-key 5FB027474203454C
    I as understand 5FB027474203454C is the key mentioned in pkgbuild. But the author's page from the package maintainer's note suggests to import 908D8B0E not 5FB027474203454C. Could anyone help me please figure this out?
    Last edited by Ajunta (2015-03-15 19:58:14)

    Thy not use pacman-key? https://wiki.archlinux.org/index.php/Pacman-key
    Edit: Is it because you've read https://wiki.archlinux.org/index.php/Ma … e_checking ?
    I just googled the last 8 chars of validpgpkeys mentioned in the PKGBUILD in the AUR and got http://bues.ch/cms/resources/git.html - it's the key the author uses for git projects.
    Edit:
    $ sudo pacman-key -r 4203454C
    gpg: key 4203454C: public key "Michael Büsch (Git tag signing key) <[email protected]>" imported
    gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
    <snip>
    Last edited by karol (2015-03-14 13:34:58)

  • Server 2008R2 - SSL Certificate Weak Public Key Strength

    Hello -
    I'm using a Windows 2008R2 server and am working on locking the system down. We use the BeyondTrust Retina Network Security Scanner, the scanner returns two results that I'm having trouble solving.
    The first is finding is:
    'SSL Certificate Weak Public Key Strength'
    "Retina has detected that the certificate on the target supports a  cryptographically weak public key strength. An attacker may be able to leverage weaknesses in the public key strength to gain access to sensitive information."
    "Replace the current certificate with one using a high-grade public key strength of 2048 bits of higher"
    **Does anyone have any ideas how to find all the certificates loaded on the machine that aren't at 2048 bits or higher, the system is a standalone machine without internet access**
    The second finding is:
    'SSL Certificate Self-Signed'
    "Retina has detected that the certificate on target is self-signed. Self-signed certificates can provide underlying cryptographic functionality, but cannot guarantee the origin of the certificate is trusted."
    "Verify the certificate is trusted to ensure the confidentiality and integrity of prior encrypted communications. Replace the current self-signed certificate with one signed by a trusted root certificate authority."
    **Anyone have any ideas how to find 'self-signed' certificates? I've tried searching through the certificates store on the local computer, but I can't seem to find a self-issued certificate, but Retina sure found some.**
    Any help would be greatly appreciated!!
    Thanks,
    Ryan

    A self signed certificate is a certificate which Subject attribute equals Issuer attribute. You can use below script to find selfsigned certificates which is selfsigned and public key is less than 2048 bits.
    Be aware that if you search in all possible certificate stores (including Trusted Root CA store) you will find a lot of self signed certificates. Please see my notes in powershell code.
    #Find self-signed certificate which keysize less than 2048. Uncomment one of the lines below
    #$myCerts = Get-Item Cert:\CurrentUser\My #search in Current User Store - Personal - this is the place to look in
    #$myCerts = Get-Item Cert:\LocalMachine\My #search in Local Machine Store - Personal - this is the place to look in
    #$myCerts = Get-Item Cert:\CurrentUser\* #search in Current User Store - this will bring a lot of cert list
    #$myCerts = Get-Item Cert:\LocalMachine\* #search in Local Machine Store - this will bring a lot of cert list
    $myCerts.Open([System.Security.Cryptography.X509Certificates.OpenFlags]::ReadWrite)
    $myCertsList = Get-ChildItem $myCerts.PSPath
    $myCertsList | where {$_.Subject -like $_.Issuer -and $_.PublicKey.Key.KeySize -lt 2048} | select * #self-signed and less then 2048
    $myCerts.Close()
    Did my post help you or make you laugh? Don't forget to click the Helpful vote :) If I answered your question please mark my post as an Answer.

  • Please Help::How to display a Map with LIsts as Keys and Values using JSTL

    Hi,
    I need some assistance on how to display a Map in JSP using struts or core JSTL. I have a HashMap which has a List of keys and each key maps to a value of an ArrayList.i.e I have an ArrayList of taxCodes and each taxCode maps to a value of taxDetails which is an ArrayList of details for for that particular taxCode. I have some trouble to display each taxCode then display taxDetails for each taxCode. Here is my code below:
    OrderDetails.java
    package orderitems;
    import java.sql.*;
    import java.util.*;
    public class OrderDetails {
        private LineOder lineOrder;
        private Map lineItems;
        //returns an item number, key_item, from its unique keys
        public int getItemNumber(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            int itmNum = 0;
             * key_item a unique number for an item.
             * key_year,key_office,key_client,key_company unique keys
             * for each order where this key_item is taken
             * from.
            String select = "SELECT key_item FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + key_item +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                if(rst.next()){
                    itmNum = Integer.parseInt(rst.getString("key_item"));
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itmNum;
        //get a list of item number(item codes)
        public List getAllItemNumbers(String key_year,
                String key_office,String key_client,String key_company){
            List itemNumbers = new ArrayList();
            LineItem itemNumber = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            String select = "SELECT key_item FROM "+ Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    itemNumber = new LineItem();
                    itemNumber.setKey_item(Integer.parseInt(rst.getString("key_item")));
                    itemNumbers.add(itemNumber);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemNumbers;
        //get a list of tax codes
        public List getAllTaxCodes(int key_item, String key_year,
                String key_office,String key_client,String key_company){
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            ItemTax taxCode;
            List taxCodes = new ArrayList();
            int itemNum = getItemNumber(key_item, key_year,
                    key_office,key_client,key_company);
            String select = "SELECT key_tax_code FROM "+
                    Constants.WEB_TABLE +" WHERE key_item = " + itemNum +
                    " AND key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company +"'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    taxCode = new ItemTax();
                    taxCode.setKey_tax_code(rst.getString("key_tax_code"));
                    taxCodes.add(taxCode);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return taxCodes;
        /////This methode returns a Map which am trying to display in JSP
        //use tax code to get tax details
        public Map getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
                System.out.println();
                System.out.println("*********CONSOLE OUTPUT*************");//display on console
                Set set = itemTaxDetails.keySet();
                Iterator iter = set.iterator();
                System.out.println("Key\t\tValue\r\n");
                while (iter.hasNext()) {
                    Object taxCode=iter.next();
                    Object details=itemTaxDetails.get(taxCode);
                    System.out.println(taxCode +"\t" + details);
                System.out.println("************************************");
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return itemTaxDetails;
        //details of an item with all its taxes
        public List getAllItemDetails(String key_year,
                String key_office,String key_client,String key_company){
            List lineItems = new ArrayList();
            List itemNumbers = new ArrayList();
            Map taxDetails = new HashMap();
            LineItem item = null;
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //A list of all item numbers in the declaration
            itemNumbers = getAllItemNumbers(key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator itemIter= itemNumbers.iterator(); itemIter.hasNext();){
                    LineItem itemNum = (LineItem)itemIter.next();
                    int itemNumber = itemNum.getKey_item();
                    String select = "SELECT item_description,item_mass," +
                            "item_cost" +
                            " FROM " + Constants.WEB_TABLE +
                            " WHERE key_year = '"+key_year+"'" +
                            " AND key_office = '"+key_office+ "'"+
                            " AND key_client = '"+key_client+ "'"+
                            " AND key_company = '"+key_company+ "'"+
                            " AND key_item = " + itemNumber;
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        item = new LineItem();
                        item.setItem_description(rst.getString("item_description"));
                        item.setItem_mass(Float.parseFloat(rst.getString("item_mass")));
                        item.setKey_item(Integer.parseInt(rst.getString("item_cost")));
                        //////other details records ommited//////////////////////////
                        /* A HashMap of all itemTaxeCodes as its keys and an
                         * ArrayList of itemTaxedetails as its values
                        taxDetails = getItemTaxDetails(item.getKey_year(),item.getKey_office(),
                                item.getKey_client(),item.getKey_company(),item.getKey_item());
                        //item tax details
                        item.setItmTaxes(taxDetails);
                        //list of items with tax details
                        lineItems.add(item);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineItems;
        public Set getOrders(String key_year,String key_office,
                String key_client,String key_company){
            List lineItems = new ArrayList();
            Set lineOrders = new HashSet();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            LineOder lineOrder = null;
            String select = "SELECT * FROM " + Constants.WEB_TABLE +
                    " WHERE key_year = '" + key_year + "'" +
                    " AND key_office = '" + key_office + "'" +
                    " AND key_client = '" + key_client + "'" +
                    " AND key_company = '" + key_company + "'";
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                rst = stat.executeQuery(select);
                while(rst.next()){
                    lineOrder = new LineOder();
                    lineOrder.setKey_year(rst.getString("key_year"));
                    lineOrder.setKey_office(rst.getString("key_office"));
                    lineOrder.setKey_client(rst.getString("key_client"));
                    lineOrder.setKey_company(rst.getString("key_company"));
                    ////list of items with all their details
                    lineItems = getAllItemDetails(lineOrder.getKey_year(),lineOrder.getKey_office(),
                            lineOrder.getKey_client(),lineOrder.getKey_company());
                    //setting item details
                    lineOrder.setItems(lineItems);
                    //a list of order with all details
                    lineOrders.add(lineOrder);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            return lineOrders;
    Controller.java
    package orderitems;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Controller extends HttpServlet {
        private Map taxDetails = new HashMap();
        private OrderDetails orderDetails = null;
        protected void processRequest(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            response.setContentType("text/html;charset=UTF-8");
            String key_year = "2007";
            String key_office = "VZX00";
            String key_company = "DG20";
            String key_client =  "ZI001";
            int key_item = 1;
            String nextView = "/taxdetails_list.jsp";
            orderDetails = new OrderDetails();
            taxDetails = orderDetails.getItemTaxDetails(key_year,key_office,
                    key_company,key_client,key_item);
            //Store the collection objects into HTTP Request
            request.setAttribute("taxDetails", taxDetails);
            RequestDispatcher reqstDisp =
                    getServletContext().getRequestDispatcher(nextView);
            reqstDisp.forward(request,response);
        protected void doGet(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
        protected void doPost(HttpServletRequest request,
                HttpServletResponse response)throws
                ServletException, IOException {
            processRequest(request, response);
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <title>Simple Tax Detail Diaplay ::</title>
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <jsp:useBean id="taxDetails" class="java.util.HashMap" scope="request"/>
            <table>
                <c:forEach items="${taxDetails}" var="hMap">
                    <tr>
                        <td><c:out value="${hMap.key}" /></td>
                        <!--td><%--c:out value="${hMap.value}" /--%></td-->
                    </tr>
                </c:forEach>
            </table>
        </body>
    </html>am displaying taxCodes(in this case i have VAT and ICD) fine but cant figure out how to display a list of value for each taxCode.Here is the output am getting
    both in my JSP and on the console:
    *******************************CONSOLE OUTPUT****************************
    Key          Value
    ICD     [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    VAT [orderItems.ItemTax@13e6226, orderItems.ItemTax@9dca26]
    Edited by: aiEx on Oct 8, 2007 6:54 AM

    hi evnafets,
    yes i need a nested for loop.I have tried your advice but my bean properties are not found.Am getting this error:
    javax.servlet.ServletException: Unable to find a value for "key_item" in object of class "java.lang.String" using operator "."
    I have tried this as stated earlier in the post:I have tried to make the method getItemTaxDetails return a List and get the returned list value as taxDetails. I then tested to display this list on JSP and its displaying fine.
    public List getItemTaxDetails(String key_year,String key_office,
                String key_client,String key_company,int key_item){
            ItemTax taxDetail = null;
            List taxDetails = new ArrayList();
            List itemTaxCodes = new ArrayList();
            Map itemTaxDetails = new HashMap();
            Connection conn = null;
            Statement stat = null;
            ResultSet rst = null;
            //get a list of all tax codes of an item with a
            //given item number
            itemTaxCodes = getAllTaxCodes(key_item,key_year,
                    key_office,key_client,key_company);
            DbConnection dbConn = new DbConnection();
            try {
                conn = dbConn.getDbConnection(Constants.WEB_JNDI);
                stat = conn.createStatement();
                for(Iterator taxCodeIter= itemTaxCodes.iterator(); taxCodeIter.hasNext();){
                    ItemTax itemTaxCode = (ItemTax)taxCodeIter.next();
                    String taxCode = itemTaxCode.getKey_tax_code();
                    String select = "SELECT tax_type,tax_value," +
                            "tax_limit_val FROM "+ Constants.WEB_TABLE +
                            " WHERE key_item = "+ key_item +
                            " AND key_year = '" + key_year + "'" +
                            " AND key_office = '" + key_office + "'" +
                            " AND key_client = '" + key_client + "'" +
                            " AND key_company = '" + key_company +"'" +
                            " AND key_tax_code = '" + taxCode + "'";
                    rst = stat.executeQuery(select);
                    while(rst.next()){
                        taxDetail = new ItemTax();
                        //records to be displayed only
                        taxDetail.setKey_item(Integer.parseInt(rst.getString("key_item")));
                        taxDetail.setTax_value(rst.getString("tax_value"));
                        taxDetail.setTax_limit_val(Float.parseFloat(rst.getString("tax_limit_val")));
                        //////other details records ommited//////////////////////////
                        taxDetails.add(taxDetail);////An ArrayList of taxDetails for each taxCode
                     * A HashMap which has all taxCodes of an item as its keys
                     * and an ArrayList of taxdetails as its values.
                     * I return this for display in a JSP.
                    itemTaxDetails.put(taxCode,taxDetails);
            } catch (SQLException ex) {
                ex.printStackTrace();
            } finally{
                SQLHelper.cleanUp(rst, stat, conn);
            //return itemTaxDetails;
            return taxDetails;
        }And my JSP
    taxdetails_list.jsp
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" type="text/css" href="imgs/orders.css"/>
        </head>
        <body>
            <table>
                <c:forEach var="curRecord" items="${taxDetails}" varStatus="rowCounter">
                        <c:choose>
                            <c:when test="${rowCounter.count % 2 == 0}">
                                <c:set var="rowStyle" scope="page" value="odd" />
                            </c:when>
                            <c:otherwise>
                                <c:set var="rowStyle" scope="page" value="even" />
                            </c:otherwise>
                        </c:choose>
                        <tr class="${rowStyle}">
                            <td>${curRecord.key_item}</td>
                            <td>${curRecord.tax_value}</td>
                            <td>${curRecord.tax_limit_val}</td>
                        </tr>
                    </c:forEach>
            </table>
        </body>
    </html>I can't see where am going wrong even with your advice.Please help.
    Thnx.

  • How to remove duplicate POP messages in Mail under Mavericks

    Hello
    I'm having some significant problems with Apple Mail, and despite having researched widely, I haven't been able to find a solution yet. Here is my tale of woe...
    My set up is that I use Mail with 5 separate accounts, downloading all messages using POP. I keep ALL my mail (even the trash) so that I have a permanent record of all conversations, going back more than 10 years - this is about 250,000 emails in around 250 subfolders. I'm running the latest version of Mavericks on a 2010 MBP. I have no intention of moving to IMAP - I need to keep a local archive of all my mail.
    A few months ago I was having problems with Mail being very slow to load and search emails. I decided to rebuild the mailboxes, but afterwards discovered that thousands of messages in the inbox of one of my accounts (and some of the sub-folders) had disappeared. Once I realised I tried to go back to a recent Time Machine back up, but, for whatever reason, that part of the back up hadn't worked properly and I was unable to recover the previous status. I left it while I decided what to do, and had time to deal with it...
    The last 2 years worth of emails on that account were still archived on gmail, so last week I decided to try redownloading the whole lot (something like 72,000 messages), and then planned to use one of the scripts I was aware of to remove the duplicates to the trash, and then remove any duplicates in the trash forever. That ought to mean I at least had an archive of the last two years of missing messages, even if I had no record of which ones had been flagged or replied to, etc.
    The downloading took about 24 hours to complete, and I now have almost 70,000 messages in the inbox of that account. I also rebuilt all the folders again, which doesn't seem to have resulted in any further loss of messages as far as I can tell. However, I hadn't figured on two things:
    1. Mail 'hides' duplicate messages, meaning that all of the messages I've downloaded are showing as unread, and I can't differentiate the ones I already had in my Inbox, and the new downloads. When I click on those apparently unread messages I can see if they have been replied to or forwarded, etc, but there's no obvious way for me to remove the ones I have already dealt with to the trash, without going through them all manually, which is clearly impossible.
    2. The scripts I'd found for removing duplicates don't work. Andreas Amann's Remove Duplicates script doesn't work under Mavericks, and he has abandoned the project. I've also tried the remove-duplicate-messages.scpt made by Jolly Roger (http://jollyroger.kicks-***.org/software/), and while it *sometimes* works on individual subfolders on my Mac (but as far as I can tell removes the duplicate in that folder, rather than the newly downloaded version), mostly it doesn't work at all - it creates a 'Remove Duplicate Messages' folder on my desktop, a log inside it and a folder for removed messages, but nothing appears in the duplicates folder.
    So, I'm left in a position where I have 70,000 apparently unread messages in my Inbox, a massively bloated Mail library (which has pretty much doubled in size, because of the 'hidden' messages), a slow and unresponsive Mail program. I've come to the conclusion that there must be some corrupted email somewhere, which probably caused the original email haemorrhage, and may still be causing the inability to remove duplicates. Mail is so slow as to be almost unuseable.
    I figure I have a number of options:
    1. I could live with the situation and just archive most of the Mail in my inbox, with the side effect that there will be a bunch of messages I have never replied to that are missed.
    2. I could abandon the last week's efforts and revert to the version of Mail I was using a week ago, and then redownload the recent emails from my various accounts. That would still leave me without those thousands of emails I lost on my local machine.
    3. I could find another way to deal with this. Can I get the remove duplicates script working? Should I revert to the version of Mail from a week ago, download ALL the messages again, but do it in a way that allows me to find the duplicates and remove them? Should I move to another email program altogether (which would presumably be massively disruptive to my work!)
    Anyway, apologies for the essay length of this request, and thanks in advance for any help you may be able to offer!

    hi Eric
    thanks for the tip, but I don't think that solves my problem, which is that Mail apparently hides the duplicates, so they're still there, you just can't differentiate or remove them. I actually *need* the duplicates there so I know I've got everything, but then I need to be able to move the ones I know I've dealt with from my inbox to an archive/trash, and/or remove them completely so Mail isn't totally bloated

Maybe you are looking for