Questions tagged [maildir]

The Maildir e-mail format is a common way of storing e-mail messages, where each message is kept in a separate file with a unique name, and each folder is a directory.

The original Maildir specification was written by Daniel J. Bernstein, the author of qmail, djbdns, and other software. Although the original specification was written specifically for Bernstein's qmail, it is general enough to be implemented in many programs.

Read more at: https://en.wikipedia.org/wiki/Maildir

54 questions
2
votes
1 answer

Filename of a maildir message - mailbox.Maildir

How can I safely, and hopefully with the standard python tools for Maildir, find the complete filename and path of a Maildir message. I want to write the mail-message-file to a tarfile before I delete it. I'm importing mailbox and tarfile…
sastorsl
  • 2,015
  • 1
  • 16
  • 17
2
votes
1 answer

How can I get python's Maildir to read the updated state?

I've written some code in python that opens the Maildir, updates "new" messages to be in "cur", flushes and closes the mail dir. The problem is that when I read the very same Maildir again after this using the script, it's still reading all emails…
rui
  • 11,015
  • 7
  • 46
  • 64
1
vote
1 answer

How to parse emails saved with maildir?

I'm trying to parse emails using Mail. Emails saved in Maildir. As result I'm getting wrong data. Elements in hash that matches to email's headers are empty and body of the mail is parsed as raw data of mail. It's results: {:multipart=>false,…
Sergey Bezugliy
  • 580
  • 7
  • 23
1
vote
1 answer

How to delete messages from .maildir/new/ with custom subject?

I have new messages in my .maildir/new/. There are a lot of bug reports I would like to remove. I would like to remove messages with subject that contains Webkit. How can I do it? Thanks for any help.
sergzach
  • 6,578
  • 7
  • 46
  • 84
1
vote
1 answer

What is a "Maildir" in the context of git?

In the documentation for git am, it mentions a "Maildir". However, when I search the rest of the Git documentation for what a "Maildir" is I don't find anything. My gut feel is that this is some general, non-git concept that I should already be…
void.pointer
  • 24,859
  • 31
  • 132
  • 243
1
vote
3 answers

maildir headers problem

I have the followign bash script to update mtimes for maildir files: #!/bin/bash for i in /test/emailfile do date=$(sed -n '/Received: from/ { :a; n; /;/ {s/.*; //p;q}; b a }' "$i") newdate=$(date -d "$date" +'%Y%m%d%H%M.%S') touch -t…
Joshxtothe4
  • 4,061
  • 10
  • 53
  • 83
1
vote
2 answers

how to send email from thunderbird such that only one copy is uploaded?

I use Thunderbird with an IMAP server to access incoming email as well as for online storage of mail, and SMTP server for outgoing email. Every time I send an email, it first sends it via SMTP and then uploads it separately to my IMAP server's Sent…
jdpipe
  • 232
  • 1
  • 11
1
vote
0 answers

Access maildir inbox from Python

How do I access messages in the top-level folder of a maildir in Python? The top-level folder does not show iup in list_folders(), and iterating over the messages gives me messages in all folders, which I don't want. import mailbox import os dirpath…
Dietrich Epp
  • 205,541
  • 37
  • 345
  • 415
1
vote
1 answer

Offlineimap stops retrieving after first 20-30 messages

I have been trying to set up offlineimap to sync mail from gmail to the local folders on my mac machine. The issue with my current set-up is that, offlineimap will start to sync the mail from both accounts, I can see lines like - Copy message 3 (3…
Harish Ved
  • 560
  • 4
  • 17
1
vote
1 answer

Getting all new messages from a Maildir in python

I have a mail dir: foo@foo:~/Maildir$ ls -l total 288 drwx------ 2 foo foo 155648 2010-04-19 15:19 cur -rw------- 1 foo foo 440 2010-03-20 08:50 dovecot.index.log -rw------- 1 foo foo 112 2010-03-20 08:49 dovecot-uidlist -rw------- 1 foo foo …
Jesper
  • 670
  • 9
  • 16
1
vote
1 answer

Renaming Maildir Messages as "Read" or Not Read

i need to manage my server's maildir messages. i need to know how i can efficiently rename individual message files as already [R]ead, or vice versa, preferably using standard…
Gary Dean
  • 105
  • 1
  • 6
1
vote
1 answer

What format specification is the movemail account type of Thunderbird referring to

After a long confusing research I'm wondering what format specification the movemail account type in Thunderbird (version 24) is referring to. As far as I'm concerned, movemail is a program to move Mail between mbox files…
Kalle Richter
  • 8,008
  • 26
  • 77
  • 177
1
vote
0 answers

Opening & forwarding MailDir files

the domain I am working on recently moved from Squirrelmail to gmail. There are some old emails found in /home/user1/MailDir/ and I have to forward everything to gmail. All the mail files in this directory do not have a specific file extention. The…
Harris Geo
  • 239
  • 2
  • 4
  • 14
1
vote
1 answer

Determine unique "from" email addresses in Maildir folder

I want to find out a list of "From" addresses in a Maildir folder. Using the following script, it illustrates the varying formats that are valid in From: import mailbox mbox = mailbox.Maildir("/home/paul/Maildir/.folder") for message in mbox: …
Paul
  • 538
  • 6
  • 23
1
vote
1 answer

read mail out of maildir direcory with correct encoding and use in bash

I'm trying to implement some sort of spamreport for my Mail Server. Mails are sorted by sieve and are all in one folder called Spam. I loop through the folder with bash. With this i get the necessary informations from the mail: cat $f | grep '^From'…
Max
  • 502
  • 2
  • 4
  • 14