View compressed Maildir folder or decompress files - dovecot

I have an inbox (cur) folder of a Maildir user where I need to view or decompress the files so they become readable.
I only have the mail files and nothing else and I can't figure out how to do this.
Is it possible, and if so, how?

Related

Editing .json files in a zip folder, without unzipping

I am in the process of uploading a huge number of tests for my school (I am a computer science teacher). These come in the form of .h5p files. I need to parse information into the .h5p files from .txt documents, ready for uploading to Moodle courses. To do this, I have built an app to push the data from .txt files into the .json files in the .h5p file.
The problem is that my app converts the h5p to a zip, unzips it and then parses the information, rezips and then changes the extension again to h5p. Would you mind watching this video https://youtu.be/FTyQddAcWa8 and letting me know how I might be able to edit the .json files and then rezip ready for uploading to the Moodle courses? The files throw up errors once unzipped and then zipped again.
I think the unzipping process is altering the relative links.
Bottom line is, these tests are critical in my school of 1,274 children mitigating the impact of COVID-19 lockdown.
The unzipping process is not the problem, but the zipping is.
When you upload the file, H5P is complaining because it expects some flags to be set when zipping:
-D do not add directory entries
-X eXclude eXtra file attributes
I assume that at some point your script is calling zip. That call would need to pass the correct flags. On a command line, you'd use
zip -rDX myNewFile.h5p *
to pack all files in the current directory into a valid H5P content file named myNewFile.h5p. Just "translate" that into your script.

How to extract files from saz file?

I exported a session from Fiddler to saz files.
This session includes only jpg files and I'm wondering - how can I extract the jpg files from saz quickly and easily?
Thanks!
The easiest way to extract the JPEG files is to use Fiddler itself. Fiddler allows you to load a SAZ file (under File/Load Archive..).
Once loaded, just right-click on the HTTP message with the JPEG and select Save/Response/Response Body....
If you want to do it the hard way, a SAZ file is just a zip file. Below is from the Fiddler FAQ page
SAZ files are simply specially formatted .ZIP files. If you rename a
.SAZ file to .ZIP, you can open it for viewing using standard ZIP
viewing tools.
According to the FAQ, the HTTP payload data is stored in a directory called raw. The JPEG data will be in one of the sessid#_s.txt files, but embedded in a HTTP response message. Strip the HTTP headers to get the JPEG (assuming there is no extra encoding in the HTTP message).
sessid#_s.txt - contains the raw server request
Fiddler now requires a password to work, and I'm not willing to register.
First, I create a folder and put the .saz file inside
Second, I change to that directory and use unzip to extract the files because a saz file is a standard archive
Third, I open _index.htm with any browser and click the links in the index file
Have fun.

CozyRoc SSIS, reading email attachment filename?

In a package where I harvest all mail attachments (example found here:cozyroc documentation), I would like to read the attachment filename and according to that, store attachments in different folders.
Anyone knows if and how can I do this using Cozyroc?
It doesn't look like there's an easy way to extract the attachment file names from the CozyRoc email object. What I would do is save all attachments to a single "staging" folder, then create a For Each Loop to loop through all the files in that staging folder, and then use File System tasks to move the files.

How to load all files in a folder with as3

I need to load a large number of pictures (around 30) in a sequence as a short movie, each .png has the size 960X540.
I don't want the loader depend on the name of each picture as I will make changes frequently.
Is there any suggestions?
Are you trying to load images from a local file system, or a remote web server?
If you want to load images from a local file system folder, you can use AIR's File/getDirectoryListing().
If you want to load images from a remote server, and you do not want to rely on a pre-defined file naming pattern, the server will need to be able to provide directory information, for example a PHP script that reads the directory contents and outputs XML or JSON. There's no general way for a client to probe a web server for files in a directory. Some web servers do have a default web directory listing script that shows when there is no "default" file in a folder (index.html, etc), but that probably won't be quite good enough for what you're trying to do.
As a final note, if you don't mind manually updating a file on the server that lists all the files as XML or JSON, you could create a simple AIR app to process a local file directory and generate the necessary XML or JSON and upload that to your server.

Choose Directory with JSP

I'm creating UI for backup and restore database in my J2EE app. I need to allow user to select a directory in his PC hard drive to save database backup.
I can select sql file to carry out restoration by this. <input type="file" accept=".sql">.
But i'm unable to find a way to select directory to save database backup file. I have google about this and found that there is no any way to select directories with jsp/html file.
Is there any way to achieve this ?
For security reasons browser will not allow you to select a folder on the users local drive to store files in.
What you can do is set the Content-Disposition header at the moment the file is sent to the client (browser). In that case the browser will show as 'Save as' dialog. With this the user can select the folder to store the files in.
See this page on how to set the content disposition header.
res.setHeader("Content-Disposition", "attachment; filename=\"" + filename +"\"");
res.setContentType("application/octet-stream");