Skip to content

Instantly share code, notes, and snippets.

@dominikgehl
Forked from critzjm/non_imap_info.rb
Created November 5, 2012 16:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dominikgehl/4017996 to your computer and use it in GitHub Desktop.
Save dominikgehl/4017996 to your computer and use it in GitHub Desktop.
nonImapInfo and msi
"nonImapInfo" : {
"username::ds" : {
folders : {
"Folder_Name" : {
"serverId" : "asdf-1234",
"parentId" : "asdf-5678",
"orig_name" : "Decoded Folder Name",
"exists" : 10
}
},
"lastSyncStart" : 0,
"lastSyncStop" : 0,
"folderSyncKey" : "asdf-1234",
"emailSyncKey" : "asdf-5678"
}
}
{
"_id" : ObjectId("507eca52b2c6840741007fdd"),
"emailMessageId" : "<27582462.2617081309964864847.JavaMail.em-build@massmail-sender-na-1009.vdc.amazon.com>",
"indexDate" : 1350486610, #when did we actually index the message - i.e. time when the message was added to database
"dateReceived" : 1309964866, #extracted from Received headers
"labels" : [
"Archive"
],
"archiveHeaders" : {
"server" : "username::ds",
"serverId" : "",
"folderId" : "",
"mbox" : "Archive",
"uid" : 2,
"path" : "<serverId>/<folderId>/username::ds"
},
"emailAddresses" : [
{
"email" : "store-news@amazon.ca",
"type" : "from",
"personal" : "Amazon.ca",
"name" : [
"store-news@amazon.ca",
"amazon",
"amazon.ca"
]
},
{
"email" : "fist.last@gmail.com",
"type" : "to",
"personal" : "first.last@gmail.com",
"name" : [
"first.last@gmail.com",
"last",
"gmail"
]
}
],
"srcHeaders" : {
"mime-version" : "1.0",
"delivered-to" : "first.last@gmail.com",
"return-path" : "<20110706150744c0cfb083ac9f40cfabb351570d0d8948-C3B0B22NBJ35MX@bounces.amazon.com>",
"date" : "Wed, 6 Jul 2011 15:07:44 +0000",
"from" : "Amazon.ca <store-news@amazon.ca>",
"to" : "\"first.last@gmail.com\" <first.last@gmail.com>",
"message-id" : "<27582462.2617081309964864847.JavaMail.em-build@massmail-sender-na-1009.vdc.amazon.com>",
"subject" : "Amazon.ca: Deals on Watches, Movies, Electronics & More",
"content-type" : "multipart/mixed; boundary=\"----=_Part_523014_3433400.1309964864845\"",
"bounces-to" : "20110706150744c0cfb083ac9f40cfabb351570d0d8948-C3B0B22NBJ35MX@bounces.amazon.com",
"x-amazon-mail-relay-type" : "merchandizing",
"x-amazon-rte-version" : "2.0"
},
"subject" : "Amazon.ca: Deals on Watches, Movies, Electronics & More",
"msgDate" : 1309964864, #extracted from Date header
"txtSections" : [
{
"bodySection" : "1.1",
"type" : "text/plain",
"charset" : "utf-8"
},
{
"bodySection" : "1.2",
"type" : "text/html",
"charset" : "utf-8"
}
],
"fromEmail" : "store-news@amazon.ca"
}
User Info
{
"_id" : ObjectId("4fdf2af1a260370c17000000"),
"created" : 1340025584,
"emails" : [
{
"email" : "dominik@dokdok.com",
"validated" : 1340025584,
"primary" : 1
}
],
"firstName" : "Dominik",
"flags" : {
"adminUser" : 1,
"syncLabels" : true
},
"imapInfo" : {
"dominik@dokdok_com::imap_googlemail_com" : {
"Administration" : { [...] },
"anotherFolder" : { [...] }
}
},
"imapServers" : [
{
"type" : "gmail",
"server" : "imap.googlemail.com",
"label" : "dominik@dokdok.com::imap.googlemail.com",
"username" : "dominik@dokdok.com",
"usessl" : true,
"port" : 993,
"syncPeriod" : 1440,
"serviceLevel" : 1,
"credentials" : {
"type" : "oauth",
"oauthConsumerName" : "GOOGLE_CONTEXTIO",
"token" : <hidden>,
"tokenSecret" : <hidden>
}
}
],
"lastName" : "Gehl",
"owner" : "4e57982ba26037ce28000078",
"password" : null,
"passwordExpired" : 0,
"msiHost" : "MSISTORE2",
"suspended" : 0,
}
And then, we have a database configuration file which contains
define('DOKDOKDB_MSISTORE2_CONNECTION_STRING', 'mongodb://mongoserver11:28017,mongoserver12:28017');
define('DOKDOKDB_MSISTORE2_REPLICASET','contextio12');
define('DOKDOKDB_MSISTORE2_NAME','dokdoksrv_msi47');
[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment