edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] [PATCH] simplify raw email filenames
@ 2011-04-06 18:05 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2011-04-06 18:05 UTC (permalink / raw)
  To: edbrowse-dev

---
 doc/usersguide.html |    6 +++---
 src/fetchmail.c     |    7 +++----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/doc/usersguide.html b/doc/usersguide.html
index 754a2bb..8d27bf1 100644
--- a/doc/usersguide.html
+++ b/doc/usersguide.html
@@ -3559,11 +3559,11 @@ in the unformatted message. 
 When you use the w command to write a formatted message to a file, edbrowse
 now writes an unformatted copy for you. 
 These copies are placed in the directory $HOME/.Trash/rawmail,
-with file names ending in the extension ".eml".
+with file names consisting of 5 digit numbers. 
 When you save a formatted message, you'll notice some text like
-"original 12345" at the end of the file. 
+"Unformatted 12345" at the end of the file. 
 This tells you where to find the original, unformatted message:
-$HOME/.Trash/rawmail/12345.eml.
+$HOME/.Trash/rawmail/12345.
 As mentioned previously, it's a good idea to run a weekly cron job to clean
 out the trash bin; if that cron job removes subdirectories, it will insure
 that raw mail does not accumulate indefinitely. 
diff --git a/src/fetchmail.c b/src/fetchmail.c
index 6fe0703..25b9eb8 100644
--- a/src/fetchmail.c
+++ b/src/fetchmail.c
@@ -636,8 +636,7 @@ fetchMail(int account, bool fetch)
 /* I want a fairly easy filename, in case I want to go look at the original.
  * Not a 30 character message ID that I am forced to cut&paste.
  * 4 or 5 digits would be nice.
- * So the filename looks like /home/foo/.Trash/rawmail/36921.eml
- * Note that eml is a standard suffix for a mail file.
+ * So the filename looks like /home/foo/.Trash/rawmail/36921
  * I pick the digits randomly.
  * Please don't accumulate 100,000 emails before you empty your trash.
  * It's good to have a cron job empty the trash early Sunday morning.
@@ -648,7 +647,7 @@ fetchMail(int account, bool fetch)
 /* Try 20 times, then give up. */
 			    for(j = 0; j < 20; ++j) {
 				int rn = rand() % 100000;	/* random number */
-				sprintf(rmf, "%s/%05d.eml", mailStash, rn);
+				sprintf(rmf, "%s/%05d", mailStash, rn);
 				if(fileTypeByName(rmf, false))
 				    continue;
 /* dump the original mail into the file */
@@ -682,7 +681,7 @@ fetchMail(int account, bool fetch)
 
 			if(stashNumber >= 0) {
 			    char addstash[60];
-			    sprintf(addstash, "\nOriginal %05d\n", stashNumber);
+			    sprintf(addstash, "\nUnformatted %05d\n", stashNumber);
 			    k = strlen(addstash);
 			    if(write(fh, addstash, k) < k)
 				goto badsave;
-- 
1.7.4


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-04-06 18:20 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-06 18:05 [Edbrowse-dev] [PATCH] simplify raw email filenames Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).