4

Summary

How do I create a set of on-demand, mock/dummy/fake emails in numerous IMAP folders? Email content needs to be share-able in a public forum via a commonly-access IMAP-server account (typically for testers/developers trying to debug MUA problems/configurations), with no privacy risks.

I haven't yet found a solution to do this. Unless I can find something (I'm totally looking for suggestions), I'm relegated to writing my own software client. If so, I'd do it in Python, and I'm looking for general pointers on which tools/libraries/methods/approaches I should employ to most-quickly get a first, working prototype.

How should I solve the above, given the context below?

Purpose

I want to test various MUA deployments, sharing the same IMAP account between many users/testers/developers (of any MUA) in a public arena. Example: I might ask on a Notmuch email list:

"Why is my mbsync/Notmuch config not working? Here's a shared gmail.com account we can collectively use as a common IMAP server to minimize server-side variables and thus collectively help debug stuff."

IMAP-Client Requirements

The IMAP-client program:

  • must be able to create a variable number of nested IMAP folders with any number emails,

  • must prove all email content and folder names are share-able, with no privacy concerns (any reasonable content will do, and it doesn't have to make sense; eg #1: variants of Lorem ipsum might work; eg #1: provide input for 3 or more example emails, provided by the user/caller) so long as the emails can be opened and read by MUAs, and their attachments are "real" enough to be opened by the attachment-file's corresponding application,

  • will include some number of emails with 1 or more attachments,

  • will optimally (but not required for initial versions) be capable of generating GB's of content by creating many thousands of emails in hundreds of nested IMAP folders. The client can leverage many or large file attachments will help do this.

  • must be able to do all of the above on-demand, given any new/fresh IMAP-server account credentials.

As an implementation shortcut, it's ok for the client to duplicate much/most of the email conent, so long as there's significant variance in Date:, To:, From:, and Subject: headers and email-folder names (all of which are presumably easy to "randomize").

More Details

I've pondered trying to non-private-ize existing emails/folders from IMAP accounts I already have (that serve the above requirements), but that work appears way too hard. Too much personal, sensitive information would need to be "converted"/"private-ized." However, I'd like to hear options for ways to easily privatize (scramble, encrypt, something?) this existing email content. Such a path might save me having to write the software.

The only way I see to solve this properly: leverage an IMAP client program (again, I'm presumably writing it) that can create emails and email folders on any designated IMAP server/account. Program input can include example (presumably private) email content, number of folders and nesting levels, randomness, date ranges (of emails), etc.

I've not yet found anything that does this. GreenMail appears to setup the IMAP server, but not the IMAP server content--unless I'm overlooking something?

Community
  • 1
  • 1
Johnny Utahh
  • 2,389
  • 3
  • 25
  • 41
  • Logging to an IMAP server and managing folders should be easy with imaplib model of Python standard library. Generating messages with or without attachements can be done with the email module. In order to encrypt mail in a standard way, you may have a look to the M2Crypto module on pypi, but I have never tested that part. For the remaining, I'm afraid you question is way too broad... – Serge Ballesta Aug 18 '15 at 16:12
  • @SergeBallesta thanks. Do you know of any existing application (sans coding) which provides some or all of this functionality today? – Johnny Utahh Aug 18 '15 at 19:11
  • Instead of generating the emails, I would look at using the archives of public mailing lists and/or the https://en.wikipedia.org/wiki/Enron_Corpus. This is a more realistic test of the system anyway. – Jani Sep 30 '16 at 19:10
  • That seems like a excellent idea, thanks @Jani. – Johnny Utahh Oct 01 '16 at 15:14
  • Last time I looked, the https://en.wikipedia.org/wiki/Enron_Corpus email set had insufficient email headers for IMAP-server content. Similar idea with another dataset is great... and/or I auto-generate/supplement sufficient header content. – Johnny Utahh Apr 03 '18 at 23:37

0 Answers0