Getting rid of the p7m file extension











up vote
4
down vote

favorite
1












The internet has not been helpful this time. I have a zip archive that also has a p7m extension. How can I lose that extension so that I can view the files? Any help is appreciated.



Than you!










share|improve this question






















  • a p7m file is an encrypted attachment. decrypting it would make sense to me.
    – Elder Geek
    Feb 27 '15 at 21:01















up vote
4
down vote

favorite
1












The internet has not been helpful this time. I have a zip archive that also has a p7m extension. How can I lose that extension so that I can view the files? Any help is appreciated.



Than you!










share|improve this question






















  • a p7m file is an encrypted attachment. decrypting it would make sense to me.
    – Elder Geek
    Feb 27 '15 at 21:01













up vote
4
down vote

favorite
1









up vote
4
down vote

favorite
1






1





The internet has not been helpful this time. I have a zip archive that also has a p7m extension. How can I lose that extension so that I can view the files? Any help is appreciated.



Than you!










share|improve this question













The internet has not been helpful this time. I have a zip archive that also has a p7m extension. How can I lose that extension so that I can view the files? Any help is appreciated.



Than you!







files file-format extract






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Feb 27 '15 at 20:47









JaUnCpp

2315




2315












  • a p7m file is an encrypted attachment. decrypting it would make sense to me.
    – Elder Geek
    Feb 27 '15 at 21:01


















  • a p7m file is an encrypted attachment. decrypting it would make sense to me.
    – Elder Geek
    Feb 27 '15 at 21:01
















a p7m file is an encrypted attachment. decrypting it would make sense to me.
– Elder Geek
Feb 27 '15 at 21:01




a p7m file is an encrypted attachment. decrypting it would make sense to me.
– Elder Geek
Feb 27 '15 at 21:01










5 Answers
5






active

oldest

votes

















up vote
3
down vote



accepted










p7m is an encryption format that is often used for email attachments.



I was also not able to find a Linux tool that is able to open that file type after a quick google research. However, there exist some tools for Windows (e.g. Cryptigo p7mViewer) or OSX.



What you could try if you have no access to a computer running Windows/OSX is to install the Windows emulator wine and try to install a Windows viewer in there. I can't tell you whether this would work, but it is worth a try, if that file is important for you.



Another possible solution could be to install Claws Mail, a mail program for Ubuntu, and this plugin. I am not sure whether that allows you to view those .p7m files with that mail program either, I just got this hint from @Toroidal in the chat.






share|improve this answer

















  • 1




    Would you tell me which option you tried?
    – Byte Commander
    Feb 27 '15 at 21:11










  • I didn't try any, my mother tried Cryptigo and she said it's ok.
    – JaUnCpp
    Mar 5 '15 at 11:50










  • I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
    – Peter Flynn
    Nov 16 '17 at 15:35


















up vote
5
down vote













Create a small shell script like this one:



#!/bin/bash
openssl pkcs7 -inform DER -in "$1" -print_certs -out "$1.pem"
openssl smime -verify -in "$1" -inform der -noverify -signer "$1.pem" -out "$1.pdf" 2>/dev/null
rm "$1.pem"
evince "$1.pdf"
rm "$1.pdf



  1. Make it executable

  2. Select "open with other application"

  3. Choose the small script created above

  4. Done.






share|improve this answer























  • These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
    – ngm
    Mar 31 '17 at 19:56






  • 1




    unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
    – Peter Flynn
    Nov 16 '17 at 15:40


















up vote
3
down vote













Unfortunately, none of these answers worked for me. The attachment showed up in gmail's web interface as smime.p7m, and in Thunderbird (which I can now get rid of since it didn't help) as winmail.dat.



Quickly, as a list of commands, what worked for me was the following (assuming you downloaded the smime.p7m into ~/Downloads):



sudo apt install mpack tnef
cd ~/Downloads
munpack smime.p7m
tnef winmail.dat
ls -lt
rm mail.eml winmail.dat


To determine if this will even help you:




  • just install mpack

  • run munpack on the smime.p7m file

  • A new file should appear (perhaps named winmail.dat). If this is the case, run:


file winmail.dat # or whatever the new filename




  • if "winmail.dat: Transport Neutral Encapsulation Format" appears, install tnef and complete as listed above.

  • if that completes successfully, you should now have your zip archive in the same directory.

  • otherwise, this answer won't help:


sudo apt remove mpack tnef



Sources:



FIX Gmail smime.p7m and tnef open mail (with winmail.dat)



How to open winmail.dat files on Ubuntu and Debian Linux






share|improve this answer





















  • Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
    – Digger
    Nov 24 '16 at 21:06




















up vote
0
down vote













This is how S/Mime works, it enc/sign a mail, and sends it as an attachment.
Thunderbird and Evolution mail clients are both famous clients that are able to show s/mime attachments.
Also there are good informations on this question How to obtain a S/MIME certificate for e-mail encryption?






share|improve this answer






























    up vote
    0
    down vote













    Another solution, inspired from the previous user3801675's script.



    Create a small shell script, in ~/bin directory named p7m.sh like this one:



    #!/bin/bash
    #set -x
    outdir="$1.out"
    filename="${1##*/}" #extract filename, without path
    outfile=$outdir/${filename/.p7m/}
    mkdir $outdir
    openssl pkcs7 -inform DER -in "$1" -print_certs -out "$outdir/signer.pem"
    openssl smime -verify -in "$1" -inform der -noverify -signer "$outdir/signer.pem" -out "$outfile" 2>/dev/null
    xdg-open "$outfile"
    #if you don't need extracted file uncoment the following line
    #rm "$outdir/signer.pem"; rm "$outfile"; rmdir $outdir



    1. Make it executable chmod +x ~/bin/p7m.sh

    2. from a shell use the command ~/bin/p7m.sh filename.pdf.p7m


    or




    1. From the file manager select filename.pdf.p7m and using mouse right click choose "open with other application"

    2. Choose the small script created above
      Done.


    Usually the received file (attachment) has the extension p7m as in



    filename.pdf.p7m 


    The proposed script first creates the subdirectory



    filename.pdf.p7m.out/


    then extracts the key-file signer.pem and the file filename.pdf removing the extension .p7m



    The two file are saved in the previously created folder.



    The extracted file filename.pdf is opened using xdg-open instead of evince, because xdg-open can open all kind of file using the correct application based on file type.






    share|improve this answer























    • Where do I get pkcs7?
      – Peter Flynn
      Nov 16 '17 at 15:45










    • @PeterFlynn what do you mean? pkcs7 is a standard, not a software
      – raffamaiden
      Nov 22 at 11:04











    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f590795%2fgetting-rid-of-the-p7m-file-extension%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    5 Answers
    5






    active

    oldest

    votes








    5 Answers
    5






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    3
    down vote



    accepted










    p7m is an encryption format that is often used for email attachments.



    I was also not able to find a Linux tool that is able to open that file type after a quick google research. However, there exist some tools for Windows (e.g. Cryptigo p7mViewer) or OSX.



    What you could try if you have no access to a computer running Windows/OSX is to install the Windows emulator wine and try to install a Windows viewer in there. I can't tell you whether this would work, but it is worth a try, if that file is important for you.



    Another possible solution could be to install Claws Mail, a mail program for Ubuntu, and this plugin. I am not sure whether that allows you to view those .p7m files with that mail program either, I just got this hint from @Toroidal in the chat.






    share|improve this answer

















    • 1




      Would you tell me which option you tried?
      – Byte Commander
      Feb 27 '15 at 21:11










    • I didn't try any, my mother tried Cryptigo and she said it's ok.
      – JaUnCpp
      Mar 5 '15 at 11:50










    • I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
      – Peter Flynn
      Nov 16 '17 at 15:35















    up vote
    3
    down vote



    accepted










    p7m is an encryption format that is often used for email attachments.



    I was also not able to find a Linux tool that is able to open that file type after a quick google research. However, there exist some tools for Windows (e.g. Cryptigo p7mViewer) or OSX.



    What you could try if you have no access to a computer running Windows/OSX is to install the Windows emulator wine and try to install a Windows viewer in there. I can't tell you whether this would work, but it is worth a try, if that file is important for you.



    Another possible solution could be to install Claws Mail, a mail program for Ubuntu, and this plugin. I am not sure whether that allows you to view those .p7m files with that mail program either, I just got this hint from @Toroidal in the chat.






    share|improve this answer

















    • 1




      Would you tell me which option you tried?
      – Byte Commander
      Feb 27 '15 at 21:11










    • I didn't try any, my mother tried Cryptigo and she said it's ok.
      – JaUnCpp
      Mar 5 '15 at 11:50










    • I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
      – Peter Flynn
      Nov 16 '17 at 15:35













    up vote
    3
    down vote



    accepted







    up vote
    3
    down vote



    accepted






    p7m is an encryption format that is often used for email attachments.



    I was also not able to find a Linux tool that is able to open that file type after a quick google research. However, there exist some tools for Windows (e.g. Cryptigo p7mViewer) or OSX.



    What you could try if you have no access to a computer running Windows/OSX is to install the Windows emulator wine and try to install a Windows viewer in there. I can't tell you whether this would work, but it is worth a try, if that file is important for you.



    Another possible solution could be to install Claws Mail, a mail program for Ubuntu, and this plugin. I am not sure whether that allows you to view those .p7m files with that mail program either, I just got this hint from @Toroidal in the chat.






    share|improve this answer












    p7m is an encryption format that is often used for email attachments.



    I was also not able to find a Linux tool that is able to open that file type after a quick google research. However, there exist some tools for Windows (e.g. Cryptigo p7mViewer) or OSX.



    What you could try if you have no access to a computer running Windows/OSX is to install the Windows emulator wine and try to install a Windows viewer in there. I can't tell you whether this would work, but it is worth a try, if that file is important for you.



    Another possible solution could be to install Claws Mail, a mail program for Ubuntu, and this plugin. I am not sure whether that allows you to view those .p7m files with that mail program either, I just got this hint from @Toroidal in the chat.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Feb 27 '15 at 21:02









    Byte Commander

    62.1k26167279




    62.1k26167279








    • 1




      Would you tell me which option you tried?
      – Byte Commander
      Feb 27 '15 at 21:11










    • I didn't try any, my mother tried Cryptigo and she said it's ok.
      – JaUnCpp
      Mar 5 '15 at 11:50










    • I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
      – Peter Flynn
      Nov 16 '17 at 15:35














    • 1




      Would you tell me which option you tried?
      – Byte Commander
      Feb 27 '15 at 21:11










    • I didn't try any, my mother tried Cryptigo and she said it's ok.
      – JaUnCpp
      Mar 5 '15 at 11:50










    • I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
      – Peter Flynn
      Nov 16 '17 at 15:35








    1




    1




    Would you tell me which option you tried?
    – Byte Commander
    Feb 27 '15 at 21:11




    Would you tell me which option you tried?
    – Byte Commander
    Feb 27 '15 at 21:11












    I didn't try any, my mother tried Cryptigo and she said it's ok.
    – JaUnCpp
    Mar 5 '15 at 11:50




    I didn't try any, my mother tried Cryptigo and she said it's ok.
    – JaUnCpp
    Mar 5 '15 at 11:50












    I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
    – Peter Flynn
    Nov 16 '17 at 15:35




    I would take issue with "often used"...in 30 years of using email I just came across my first p7m attachment today.
    – Peter Flynn
    Nov 16 '17 at 15:35












    up vote
    5
    down vote













    Create a small shell script like this one:



    #!/bin/bash
    openssl pkcs7 -inform DER -in "$1" -print_certs -out "$1.pem"
    openssl smime -verify -in "$1" -inform der -noverify -signer "$1.pem" -out "$1.pdf" 2>/dev/null
    rm "$1.pem"
    evince "$1.pdf"
    rm "$1.pdf



    1. Make it executable

    2. Select "open with other application"

    3. Choose the small script created above

    4. Done.






    share|improve this answer























    • These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
      – ngm
      Mar 31 '17 at 19:56






    • 1




      unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
      – Peter Flynn
      Nov 16 '17 at 15:40















    up vote
    5
    down vote













    Create a small shell script like this one:



    #!/bin/bash
    openssl pkcs7 -inform DER -in "$1" -print_certs -out "$1.pem"
    openssl smime -verify -in "$1" -inform der -noverify -signer "$1.pem" -out "$1.pdf" 2>/dev/null
    rm "$1.pem"
    evince "$1.pdf"
    rm "$1.pdf



    1. Make it executable

    2. Select "open with other application"

    3. Choose the small script created above

    4. Done.






    share|improve this answer























    • These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
      – ngm
      Mar 31 '17 at 19:56






    • 1




      unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
      – Peter Flynn
      Nov 16 '17 at 15:40













    up vote
    5
    down vote










    up vote
    5
    down vote









    Create a small shell script like this one:



    #!/bin/bash
    openssl pkcs7 -inform DER -in "$1" -print_certs -out "$1.pem"
    openssl smime -verify -in "$1" -inform der -noverify -signer "$1.pem" -out "$1.pdf" 2>/dev/null
    rm "$1.pem"
    evince "$1.pdf"
    rm "$1.pdf



    1. Make it executable

    2. Select "open with other application"

    3. Choose the small script created above

    4. Done.






    share|improve this answer














    Create a small shell script like this one:



    #!/bin/bash
    openssl pkcs7 -inform DER -in "$1" -print_certs -out "$1.pem"
    openssl smime -verify -in "$1" -inform der -noverify -signer "$1.pem" -out "$1.pdf" 2>/dev/null
    rm "$1.pem"
    evince "$1.pdf"
    rm "$1.pdf



    1. Make it executable

    2. Select "open with other application"

    3. Choose the small script created above

    4. Done.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Jun 21 '16 at 14:45









    grooveplex

    2,16611432




    2,16611432










    answered Jun 21 '16 at 14:04









    user3801675

    5112




    5112












    • These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
      – ngm
      Mar 31 '17 at 19:56






    • 1




      unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
      – Peter Flynn
      Nov 16 '17 at 15:40


















    • These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
      – ngm
      Mar 31 '17 at 19:56






    • 1




      unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
      – Peter Flynn
      Nov 16 '17 at 15:40
















    These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
    – ngm
    Mar 31 '17 at 19:56




    These commands worked for me. Although the output wasn't a PDF file - it was just plain text.
    – ngm
    Mar 31 '17 at 19:56




    1




    1




    unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
    – Peter Flynn
    Nov 16 '17 at 15:40




    unable to load PKCS7 object 140140624967320:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1197: 140140624967320:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:374:Type=PKCS7
    – Peter Flynn
    Nov 16 '17 at 15:40










    up vote
    3
    down vote













    Unfortunately, none of these answers worked for me. The attachment showed up in gmail's web interface as smime.p7m, and in Thunderbird (which I can now get rid of since it didn't help) as winmail.dat.



    Quickly, as a list of commands, what worked for me was the following (assuming you downloaded the smime.p7m into ~/Downloads):



    sudo apt install mpack tnef
    cd ~/Downloads
    munpack smime.p7m
    tnef winmail.dat
    ls -lt
    rm mail.eml winmail.dat


    To determine if this will even help you:




    • just install mpack

    • run munpack on the smime.p7m file

    • A new file should appear (perhaps named winmail.dat). If this is the case, run:


    file winmail.dat # or whatever the new filename




    • if "winmail.dat: Transport Neutral Encapsulation Format" appears, install tnef and complete as listed above.

    • if that completes successfully, you should now have your zip archive in the same directory.

    • otherwise, this answer won't help:


    sudo apt remove mpack tnef



    Sources:



    FIX Gmail smime.p7m and tnef open mail (with winmail.dat)



    How to open winmail.dat files on Ubuntu and Debian Linux






    share|improve this answer





















    • Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
      – Digger
      Nov 24 '16 at 21:06

















    up vote
    3
    down vote













    Unfortunately, none of these answers worked for me. The attachment showed up in gmail's web interface as smime.p7m, and in Thunderbird (which I can now get rid of since it didn't help) as winmail.dat.



    Quickly, as a list of commands, what worked for me was the following (assuming you downloaded the smime.p7m into ~/Downloads):



    sudo apt install mpack tnef
    cd ~/Downloads
    munpack smime.p7m
    tnef winmail.dat
    ls -lt
    rm mail.eml winmail.dat


    To determine if this will even help you:




    • just install mpack

    • run munpack on the smime.p7m file

    • A new file should appear (perhaps named winmail.dat). If this is the case, run:


    file winmail.dat # or whatever the new filename




    • if "winmail.dat: Transport Neutral Encapsulation Format" appears, install tnef and complete as listed above.

    • if that completes successfully, you should now have your zip archive in the same directory.

    • otherwise, this answer won't help:


    sudo apt remove mpack tnef



    Sources:



    FIX Gmail smime.p7m and tnef open mail (with winmail.dat)



    How to open winmail.dat files on Ubuntu and Debian Linux






    share|improve this answer





















    • Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
      – Digger
      Nov 24 '16 at 21:06















    up vote
    3
    down vote










    up vote
    3
    down vote









    Unfortunately, none of these answers worked for me. The attachment showed up in gmail's web interface as smime.p7m, and in Thunderbird (which I can now get rid of since it didn't help) as winmail.dat.



    Quickly, as a list of commands, what worked for me was the following (assuming you downloaded the smime.p7m into ~/Downloads):



    sudo apt install mpack tnef
    cd ~/Downloads
    munpack smime.p7m
    tnef winmail.dat
    ls -lt
    rm mail.eml winmail.dat


    To determine if this will even help you:




    • just install mpack

    • run munpack on the smime.p7m file

    • A new file should appear (perhaps named winmail.dat). If this is the case, run:


    file winmail.dat # or whatever the new filename




    • if "winmail.dat: Transport Neutral Encapsulation Format" appears, install tnef and complete as listed above.

    • if that completes successfully, you should now have your zip archive in the same directory.

    • otherwise, this answer won't help:


    sudo apt remove mpack tnef



    Sources:



    FIX Gmail smime.p7m and tnef open mail (with winmail.dat)



    How to open winmail.dat files on Ubuntu and Debian Linux






    share|improve this answer












    Unfortunately, none of these answers worked for me. The attachment showed up in gmail's web interface as smime.p7m, and in Thunderbird (which I can now get rid of since it didn't help) as winmail.dat.



    Quickly, as a list of commands, what worked for me was the following (assuming you downloaded the smime.p7m into ~/Downloads):



    sudo apt install mpack tnef
    cd ~/Downloads
    munpack smime.p7m
    tnef winmail.dat
    ls -lt
    rm mail.eml winmail.dat


    To determine if this will even help you:




    • just install mpack

    • run munpack on the smime.p7m file

    • A new file should appear (perhaps named winmail.dat). If this is the case, run:


    file winmail.dat # or whatever the new filename




    • if "winmail.dat: Transport Neutral Encapsulation Format" appears, install tnef and complete as listed above.

    • if that completes successfully, you should now have your zip archive in the same directory.

    • otherwise, this answer won't help:


    sudo apt remove mpack tnef



    Sources:



    FIX Gmail smime.p7m and tnef open mail (with winmail.dat)



    How to open winmail.dat files on Ubuntu and Debian Linux







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Oct 19 '16 at 6:33









    rcollins0618

    514




    514












    • Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
      – Digger
      Nov 24 '16 at 21:06




















    • Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
      – Digger
      Nov 24 '16 at 21:06


















    Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
    – Digger
    Nov 24 '16 at 21:06






    Using Debian 6 (Squeeze), I was able to open up an "smime.p7m" file that had been zipped by a Windows sender. First, I unzipped said zip file using unzip, then, from the above-mentioned "mpack" package, I used the above-mentioned mumpack command on the resultant "smime.p7m" file. Out popped the two enclosed jpg files, immediately suitable for viewing in my jpg viewer.
    – Digger
    Nov 24 '16 at 21:06












    up vote
    0
    down vote













    This is how S/Mime works, it enc/sign a mail, and sends it as an attachment.
    Thunderbird and Evolution mail clients are both famous clients that are able to show s/mime attachments.
    Also there are good informations on this question How to obtain a S/MIME certificate for e-mail encryption?






    share|improve this answer



























      up vote
      0
      down vote













      This is how S/Mime works, it enc/sign a mail, and sends it as an attachment.
      Thunderbird and Evolution mail clients are both famous clients that are able to show s/mime attachments.
      Also there are good informations on this question How to obtain a S/MIME certificate for e-mail encryption?






      share|improve this answer

























        up vote
        0
        down vote










        up vote
        0
        down vote









        This is how S/Mime works, it enc/sign a mail, and sends it as an attachment.
        Thunderbird and Evolution mail clients are both famous clients that are able to show s/mime attachments.
        Also there are good informations on this question How to obtain a S/MIME certificate for e-mail encryption?






        share|improve this answer














        This is how S/Mime works, it enc/sign a mail, and sends it as an attachment.
        Thunderbird and Evolution mail clients are both famous clients that are able to show s/mime attachments.
        Also there are good informations on this question How to obtain a S/MIME certificate for e-mail encryption?







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 13 '17 at 12:24









        Community

        1




        1










        answered Mar 27 '15 at 14:34









        Mostafa Shahverdy

        3,33821230




        3,33821230






















            up vote
            0
            down vote













            Another solution, inspired from the previous user3801675's script.



            Create a small shell script, in ~/bin directory named p7m.sh like this one:



            #!/bin/bash
            #set -x
            outdir="$1.out"
            filename="${1##*/}" #extract filename, without path
            outfile=$outdir/${filename/.p7m/}
            mkdir $outdir
            openssl pkcs7 -inform DER -in "$1" -print_certs -out "$outdir/signer.pem"
            openssl smime -verify -in "$1" -inform der -noverify -signer "$outdir/signer.pem" -out "$outfile" 2>/dev/null
            xdg-open "$outfile"
            #if you don't need extracted file uncoment the following line
            #rm "$outdir/signer.pem"; rm "$outfile"; rmdir $outdir



            1. Make it executable chmod +x ~/bin/p7m.sh

            2. from a shell use the command ~/bin/p7m.sh filename.pdf.p7m


            or




            1. From the file manager select filename.pdf.p7m and using mouse right click choose "open with other application"

            2. Choose the small script created above
              Done.


            Usually the received file (attachment) has the extension p7m as in



            filename.pdf.p7m 


            The proposed script first creates the subdirectory



            filename.pdf.p7m.out/


            then extracts the key-file signer.pem and the file filename.pdf removing the extension .p7m



            The two file are saved in the previously created folder.



            The extracted file filename.pdf is opened using xdg-open instead of evince, because xdg-open can open all kind of file using the correct application based on file type.






            share|improve this answer























            • Where do I get pkcs7?
              – Peter Flynn
              Nov 16 '17 at 15:45










            • @PeterFlynn what do you mean? pkcs7 is a standard, not a software
              – raffamaiden
              Nov 22 at 11:04















            up vote
            0
            down vote













            Another solution, inspired from the previous user3801675's script.



            Create a small shell script, in ~/bin directory named p7m.sh like this one:



            #!/bin/bash
            #set -x
            outdir="$1.out"
            filename="${1##*/}" #extract filename, without path
            outfile=$outdir/${filename/.p7m/}
            mkdir $outdir
            openssl pkcs7 -inform DER -in "$1" -print_certs -out "$outdir/signer.pem"
            openssl smime -verify -in "$1" -inform der -noverify -signer "$outdir/signer.pem" -out "$outfile" 2>/dev/null
            xdg-open "$outfile"
            #if you don't need extracted file uncoment the following line
            #rm "$outdir/signer.pem"; rm "$outfile"; rmdir $outdir



            1. Make it executable chmod +x ~/bin/p7m.sh

            2. from a shell use the command ~/bin/p7m.sh filename.pdf.p7m


            or




            1. From the file manager select filename.pdf.p7m and using mouse right click choose "open with other application"

            2. Choose the small script created above
              Done.


            Usually the received file (attachment) has the extension p7m as in



            filename.pdf.p7m 


            The proposed script first creates the subdirectory



            filename.pdf.p7m.out/


            then extracts the key-file signer.pem and the file filename.pdf removing the extension .p7m



            The two file are saved in the previously created folder.



            The extracted file filename.pdf is opened using xdg-open instead of evince, because xdg-open can open all kind of file using the correct application based on file type.






            share|improve this answer























            • Where do I get pkcs7?
              – Peter Flynn
              Nov 16 '17 at 15:45










            • @PeterFlynn what do you mean? pkcs7 is a standard, not a software
              – raffamaiden
              Nov 22 at 11:04













            up vote
            0
            down vote










            up vote
            0
            down vote









            Another solution, inspired from the previous user3801675's script.



            Create a small shell script, in ~/bin directory named p7m.sh like this one:



            #!/bin/bash
            #set -x
            outdir="$1.out"
            filename="${1##*/}" #extract filename, without path
            outfile=$outdir/${filename/.p7m/}
            mkdir $outdir
            openssl pkcs7 -inform DER -in "$1" -print_certs -out "$outdir/signer.pem"
            openssl smime -verify -in "$1" -inform der -noverify -signer "$outdir/signer.pem" -out "$outfile" 2>/dev/null
            xdg-open "$outfile"
            #if you don't need extracted file uncoment the following line
            #rm "$outdir/signer.pem"; rm "$outfile"; rmdir $outdir



            1. Make it executable chmod +x ~/bin/p7m.sh

            2. from a shell use the command ~/bin/p7m.sh filename.pdf.p7m


            or




            1. From the file manager select filename.pdf.p7m and using mouse right click choose "open with other application"

            2. Choose the small script created above
              Done.


            Usually the received file (attachment) has the extension p7m as in



            filename.pdf.p7m 


            The proposed script first creates the subdirectory



            filename.pdf.p7m.out/


            then extracts the key-file signer.pem and the file filename.pdf removing the extension .p7m



            The two file are saved in the previously created folder.



            The extracted file filename.pdf is opened using xdg-open instead of evince, because xdg-open can open all kind of file using the correct application based on file type.






            share|improve this answer














            Another solution, inspired from the previous user3801675's script.



            Create a small shell script, in ~/bin directory named p7m.sh like this one:



            #!/bin/bash
            #set -x
            outdir="$1.out"
            filename="${1##*/}" #extract filename, without path
            outfile=$outdir/${filename/.p7m/}
            mkdir $outdir
            openssl pkcs7 -inform DER -in "$1" -print_certs -out "$outdir/signer.pem"
            openssl smime -verify -in "$1" -inform der -noverify -signer "$outdir/signer.pem" -out "$outfile" 2>/dev/null
            xdg-open "$outfile"
            #if you don't need extracted file uncoment the following line
            #rm "$outdir/signer.pem"; rm "$outfile"; rmdir $outdir



            1. Make it executable chmod +x ~/bin/p7m.sh

            2. from a shell use the command ~/bin/p7m.sh filename.pdf.p7m


            or




            1. From the file manager select filename.pdf.p7m and using mouse right click choose "open with other application"

            2. Choose the small script created above
              Done.


            Usually the received file (attachment) has the extension p7m as in



            filename.pdf.p7m 


            The proposed script first creates the subdirectory



            filename.pdf.p7m.out/


            then extracts the key-file signer.pem and the file filename.pdf removing the extension .p7m



            The two file are saved in the previously created folder.



            The extracted file filename.pdf is opened using xdg-open instead of evince, because xdg-open can open all kind of file using the correct application based on file type.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Nov 22 at 19:56









            raffamaiden

            1127




            1127










            answered Sep 6 '17 at 13:17









            Ing. Salvatore Picerno

            165




            165












            • Where do I get pkcs7?
              – Peter Flynn
              Nov 16 '17 at 15:45










            • @PeterFlynn what do you mean? pkcs7 is a standard, not a software
              – raffamaiden
              Nov 22 at 11:04


















            • Where do I get pkcs7?
              – Peter Flynn
              Nov 16 '17 at 15:45










            • @PeterFlynn what do you mean? pkcs7 is a standard, not a software
              – raffamaiden
              Nov 22 at 11:04
















            Where do I get pkcs7?
            – Peter Flynn
            Nov 16 '17 at 15:45




            Where do I get pkcs7?
            – Peter Flynn
            Nov 16 '17 at 15:45












            @PeterFlynn what do you mean? pkcs7 is a standard, not a software
            – raffamaiden
            Nov 22 at 11:04




            @PeterFlynn what do you mean? pkcs7 is a standard, not a software
            – raffamaiden
            Nov 22 at 11:04


















             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f590795%2fgetting-rid-of-the-p7m-file-extension%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局