Re: [NTLK] Change "date sent" tag in SimpleMail?

From: William Pociengel (hseldon_at_my.wgu.edu)
Date: Sun Oct 23 2005 - 19:59:37 PDT


Michael C. Wittmann wrote:
> I am laughing at the way this story is developing...
>
>>B) you would have learned that if your mail system is mbox
<snip>
> You see, I have known that I can simply edit my mbox formatted email.
> At the moment, it's "emlx" mail, meaning individual messages with
> Apple's weird new .four ending. Whatever. Point is, I can open the

hmmm I'm running Panther and I fired up apple mail and went to the drfts
folder where this message was:

 From wpociengel_at_yahoo.com Sun Aug 14 21:46:42 2005
Mime-Version: 1.0 (Apple Message framework v622)
X-Apple-Mail-Signature:
Content-Type: text/plain
X-Apple-Auto-Saved: 1
Message-Id: <ed8194f95d5c9ff48997c955f18ab8d0_at_yahoo.com>
Content-Transfer-Encoding: 7bit
From: William Pociengel <wpociengel_at_yahoo.com>
Subject:
Date: Sun, 21 Aug 2005 21:46:42 -0500
To: helpdesk_at_pressenter.com

hey there ;-)

I exited mail
I hacked mbox

as you notice I hacked one of the dates to be the 21st and not the 14th.

I restarted mail
the date shown was Aug 21 2005

I did the following to do the hack

terminal
cd ~/Library/Mail/POP-wpociengel_at_mail.yahoo.com/Drafts.mbox
vi mbox
R (to put it in over write mode then cursored over and typed the new date)

:wq (colon, write, quit)(this exists comand mode)
or
:q! (colon, quit, discard changes)

or you could use some other editor or script. but you won't be doing
this from the gui as it blocks your access to the files in question :-(

so:
exit mail

open textedit and set it's prefs for text file not rtf or anything but
text!!!!!!!!!!!!!!

open terminal

browse to where the mbox file is that you want to edit (use the above
path as an example)
(so you can see the mbox file waiting there to be hacked ;-)

cp mbox mbox.save.for.when.i.screw.up.my.mail.file (make a backup)

execute the following:

/Applications/TextEdit.app/Contents/MacOS/TextEdit mbox

edit away

save file

exit textedit

go back to terminal

ls (your basic directory lister ;-)

is mbox there without any .txt on it? good

open mail

enjoy the fruits of your labor.

OR

you mucked up and your screaming your head off ;-)

rm mbox
cp mbox.save.for.when.i.screw.up.my.mail.file mbox (this will put it all
back

oh and now that you've read all of the way down here I think I ought to
point out that unix doesn't offer any helpful warnings it just does what
you ask. so something like, hmm no nevermind I'll NOT show you how to
wipe out your system ;-)

this is really quite straight forward now that I've shown you how to use
a gui editor on your mbox. you could also write a sed/awk script to do
the work. or if you are one of the newer *nix people you could write it
in perl.

real sysadmins know /bin/ed ;-)

william

-- 
special knowledge can be a terrible disadvantage if it leads you too far 
along a path that you cannot explain anymore.
mentat admonition
-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/


This archive was generated by hypermail 2.1.5 : Mon Oct 24 2005 - 06:30:05 PDT