Reply to topic
Question for jamie
comprug
Forum Regular

Joined: 15 Feb 2006
Posts: 341
Reply with quote
I am very baffled by email programs as many of them have a feature for read messages. Yet when i look at the APIs for interacting with email in CF, there is nothing about read messages, neither in PHP, and PHP has literally everything. Do email programs store read messages in a db or adjust the headers? Thanks...
dbodner


Joined: 21 Dec 2005
Posts: 112
Location: Philadelphia, Pa
Reply with quote
I'm not sure how SmarterMail does it, but on pretty much all unix/linux based mta's that use maildir/mbox (I believe) there's a header tag that's added, to the effect of:
Status: O
for unread, and:
Status: RO
for read.

Although that's primarily used when checking in IMAP/Webmail, as most pop clients will keep track of what they've downloaded locally.
jamie
HostMySite Sales Rep
HostMySite Sales Rep

Joined: 19 Mar 2004
Posts: 766
Location: Newark, De
Reply with quote
The actual method varies from program to program, but Derek's essentially right. The status for read/unread exists locally on the MTA though - i.e. Smartermail would track this itself - and it isn't added to the actual header of the message.
dbodner


Joined: 21 Dec 2005
Posts: 112
Location: Philadelphia, Pa
Reply with quote
Just to follow up, I was bored during lunch and went looking at a Maildir based system to compare.

Linux mta's essentially use two file storage format, mbox or maildir (maildir was actually created for qmail to replace mbox, although that hasn't completely happened). mbox stores all the messages for one folder in one file, and has the Status: RO and Status: O flags mentioned above to deisgnate read vs. unread. Maildir stores all messages as their own file, and actually designates the read/unread status onto the filename.

i.e. a message will be saved as:
timestamp.id.domain.com:2,S
(marked as read)
or
timestamp.id.domain.com:2,
(marked as unread)

The 'S' flag designates seen. There are also other flags (P for Passed, R for Replied, T for Trashed, D for Draft, F for Flagged), but that's the basic gist of it.
Question for jamie
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic