§2024-10-25

MongoDB Tables

$mongosh
....

test> show dbs
admin      40.00 KiB
config    108.00 KiB
local      80.00 KiB
wildduck   31.17 MiB
zone-mta  416.00 KiB
test> use wildduck
(To exit, press Ctrl+C again or Ctrl+D or type .exit)

wildduck> show tables
addresses
addressregister
archived
asps
attachments.chunks
attachments.files
audit.chunks
audit.files
audits
authlog
autoreplies
bimi
certs
dkim
domainaccess
domainaliases
filters
journal
mailboxes
messages
settings
storage.chunks
storage.files
tasks
threads
users
webhooks
wildduck> db.addresses.find()
[
  {
    _id: ObjectId('66f7a6501432923305d8e106'),
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'alexlai@yushei.net',
    addrview: 'alexlai@yushei.net',
    created: ISODate('2024-09-28T06:46:40.359Z')
  }
]
wildduck> db.addressregister.find().limit(10)
[
  {
    _id: ObjectId('66f7a6504a652c8b8f73a21b'),
    addrview: 'info@yushei.net',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'info@yushei.net',
    name: 'WildDuck Support',
    updated: ISODate('2024-09-28T06:46:40.644Z')
  },
  {
    _id: ObjectId('66f7a8984a652c8b8f73a948'),
    addrview: 'alexlai@yushei.net',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'alexlai@yushei.net',
    updated: ISODate('2024-10-22T07:59:07.688Z'),
    name: '頼宗佑'
  },
  {
    _id: ObjectId('66f7a8984a652c8b8f73a94a'),
    addrview: 'alexlai@h2jammy.yushei.net',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'alexlai@h2jammy.yushei.net',
    updated: ISODate('2024-10-22T06:27:05.724Z'),
    name: '頼宗佑'
  },
  {
    _id: ObjectId('66f7a8984a652c8b8f73a94c'),
    addrview: 'raisousuke@mac.com',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'rai.sousuke@mac.com',
    updated: ISODate('2024-10-22T07:59:55.825Z'),
    name: 'Tsung-yiu Lai'
  },
  {
    _id: ObjectId('66f7a8984a652c8b8f73a94e'),
    addrview: 'raisousuke@gmail.com',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'rai.sousuke@gmail.com',
    updated: ISODate('2024-10-22T08:00:16.471Z'),
    name: '頼宗佑'
  },
  {
    _id: ObjectId('66f7a8984a652c8b8f73a950'),
    addrview: 'sousukerai@hotmail.com',https://repo.mongodb.org/apt/ubuntu/dists/noble/mongodb-org/8.0/multiverse/binary-arm64/mongodb-org-server_8.0.1_arm64.deb
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'sousuke.rai@hotmail.com',
    updated: ISODate('2024-09-30T06:06:33.037Z')
  },
  {
    _id: ObjectId('66f8e8ccb9ec4e8a3edbd3d2'),
    user: ObjectId('66f7a6501432923305d8e100'),
    addrview: 'raisousuke@icloud.com',
    address: 'rai.sousuke@icloud.com',
    name: 'Tsung-yiu Lai',
    updated: ISODate('2024-10-22T07:15:27.004Z')
  },
  {
    _id: ObjectId('66fa0a7fb9ec4e8a3edeffd0'),
    addrview: 'reporting@dmarc25.jp',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'reporting@dmarc25.jp',
    name: 'docomo.ne.jp by DMARC/25',
    updated: ISODate('2024-09-30T02:18:39.288Z')
  },
  {
    _id: ObjectId('66fa3fe9b9ec4e8a3edf9536'),
    addrview: 'alexlai@yushei.me',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'alexlai@yushei.me',
    updated: ISODate('2024-10-22T06:27:05.727Z')
  },
  {
    _id: ObjectId('66fa3fe9b9ec4e8a3edf9538'),
    addrview: 'alexlai@munetaka.me',
    user: ObjectId('66f7a6501432923305d8e100'),
    address: 'alexlai@munetaka.me',
    updated: ISODate('2024-10-22T06:27:05.730Z')
  }
]
wildduck> db.archived.find().limit(1)
....
       '<img src="https://mail.yomiuri.co.jp/e3t/Cto/5E+113/d12Rwj04/VVQ5XL3tBshCW2N6MT531yh7gW5_BCzp5lDsmLW2XT6Sh3CLTwW142" alt="" width="1" height="1" border="0" style="display:none!important;min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important"></body></html>'
    ],
    mailbox: ObjectId('66f7a6501432923305d8e103'),
    user: ObjectId('66f7a6501432923305d8e100'),
    uid: 32,
    modseq: 24,
    searchable: true,
    thread: ObjectId('66fbbbfea2cd9c4881f39b84'),
    archived: ISODate('2024-10-01T10:08:44.868Z')
  }
]
wildduck> db.asps.find()   ---> none

wildduck> db.attachments.chunks.find().limit(1)
...
yN7UjJGPP+Wl1492Nr/8rnFRcXDAgwFMM6rLRhzEJJDRSGUEOSaTWZabdjEIBIO1bJEGgdYWCB0GgsIxsfuqj7vyteCaPfYr71rGeCn49CdrwK2bGbma9843dRaN2ix4gazZ8/ZjjsBONgk9gu1nd9RDecXoZqUYJoEExuogkFhUAJGojYLxLFEbCyQLtihVes+NFypviXR6cLQu7+wDPBTeR57zRico3DkrO2virT+Y9Zqr3TtRWkMQXcSAAYoBmBKemmNkGBBCFAA1yDYNIUcsAgHBNJ5i4WDMVp1g5QHaCYa1F7A8PBgrbDtvJvsnf98u/yLr2D98y98TgD8jKiDdccBUgVz9dEr84/ePRaFIrZhWRsmrTUdFeSSYqlqBKsq2CgPBwVqBKB5B1GKERYEOHG0D6eYP9RGreWcHhjZ1eTiRJtaa8K0MXb8yMGBcHzrGZd8SX/5/n//N7ucZD2FZ3ZPAlK8mVuff1trZN3f5wtlgoysKBUJpIWUCxNuTFyHqHYFc3OTYk4IN+/Aww5YjmDmHWpHNOaPt10jqDzuNmz4J6zZ/ElVqjTyBx8dZDN7VhLCNWZy01fhN0Avu+hnytl316cRF1ahVH8kh+P3rg1P7PkTte/IzWmtzhFKpDWLxoJGTYtD8ejaT7LNz/uHysbTH77wJbeYel/+2lfb/idTbDzrAV567vmz/4lp/q5fq82U/qr58M4oUTkYmW+aQuUzbsPZ/11c8+r/oAe/YS7+ld/G8nkGuegne57IXYRN4bs6SSu8/1hhouiKlfvF4Ognwy3P/0pSr5144fnngl1w3jKqz1YLvuvj38CZ8/97dKg+lXtsv2L89Ivj3DWv7Oid36Grrr5uGc3ls3yWz3+y8/8D3aKfhFekXhMAAAAldEVYdGRhdGU6Y3JlYXRlADIwMTctMDYtMjlUMDY6MjU6NTkrMDA6MDBI4xJqAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDE3LTA2LTI5VDA2OjI1OjU5KzAwOjAwOb6q1gAAAABJRU5ErkJggg==', 0)
  }
]
wildduck> db.attachments.files.find().limit(1)
[
  {
    _id: Binary.createFromBase64('qN0ophMqZAy9Dv8zX9pS/JCAGkAmGuVi3Fmxhap1RKE=', 0),
    length: 15754,
    chunkSize: 261120,
    uploadDate: ISODate('2024-09-28T06:46:40.515Z'),
    filename: null,
    contentType: 'image/png',
    metadata: {
      m: 42760,
      c: 1,
      cu: ISODate('2024-09-28T06:46:40.459Z'),
      esize: 21560,
      transferEncoding: 'base64',
      decoded: true,
      lineLen: 76
    }
  }
]
wildduck> db.audit.chunks.find().limit(1)

wildduck> db.audit.files.find().limit(1)  --> none
wildduck> db.audits.find().limit(1)

wildduck> db.authlog.find().limit(1)
[
  {
    _id: ObjectId('66f7a6504a652c8b8f73a220'),
    key: Binary.createFromBase64('BYtN8rn72BmolKSYAwmxxg==', 0),
    user: ObjectId('66f7a6501432923305d8e100'),
    action: 'account created',
    created: ISODate('2024-09-28T06:46:40.679Z'),
    events: 1,
    expires: ISODate('2024-10-28T06:46:40.679Z'),
    ip: '210.242.152.235',
    last: ISODate('2024-09-28T06:46:40.679Z'),
    result: 'success',
    sess: 'hHC640it-mp-f5lSfPIeS-sfJcqwAmid'
  }
]

wildduck> db.autoreplies.find().limit(1)  --> none

wildduck> db.bimi.find().limit(1)
...
     validHash: true,
      certificate: {
        subject: {
          jurisdictionCountryName: 'JP',
          businessCategory: 'Private Organization',
          serialNumber: '0127-01-012582',
          countryName: 'JP',
          stateOrProvinceName: '東京都',
          localityName: '中央区',
          street: '日本橋3-1-4',
          organizationName: '株式会社TwoFive',
          commonName: '株式会社TwoFive',
          '1.3.6.1.4.1.53087.1.13': 'Registered Mark',
          trademarkCountryOrRegionName: 'JP',
          trademarkRegistration: '6578326'
        },
        subjectAltName: [ 'marketing.twofive25.com', 'naritai.jp', 'dmarc25.jp' ],
        fingerprint: 'CA:98:C9:86:9D:DF:58:90:BE:B6:3A:25:72:00:97:33:91:A4:16:94',
        serialNumber: '0369A475791CFBD3CA4BED25DEF2E798',
        validFrom: '2024-07-12T00:00:00.000Z',
        validTo: '2025-07-11T23:59:59.000Z',
        issuer: {
          countryName: 'US',
          organizationName: 'DigiCert, Inc.',
          commonName: 'DigiCert Verified Mark RSA4096 SHA256 2021 CA1'
        }
      }
    }
  }
]
wildduck> db.certs.find().limit(1)
wildduck> db.dkim.find().limit(1)
[
  {
    _id: ObjectId('66f6549a04f6951feedbb321'),
    domain: 'yushei.net',
    selector: 'sep2024',
    privateKey: '$wd01$aes-256-gcm$334297ba0a6e31e6a3fce025f92e2791$5ccfaaabd189496e4a69eaeb$e616d39dadc2dc42e9d912d3389e4471$1e5e8293cfd00c841b1d74bbc10d6c7ec6efc6996a78ff981f0f2d31a0592859063719683660a983e6c252ab9976d0fdb3a799568ed367ba668f1f13f9e29367fe95b59adc14fb3b7655d1227b3d21fe5417a43033fe72ff16b529114a4b91a695ba90870c88acb2e2507e052b9da2718837d7ae438f4a55d4e2ab1329d17df335d916dccd5926aa2b59e7a1d10034034613fcd52c84f7137e5386e4bcc3e13430e38d0ec0fac98861066035dc1fe543253949513670695e8e65b5493368312ad0db13e17c3ea7f4caf6b411eea7cb6a8b94f0ffdf28eae49b2a0316fdba7ce52ccc517489a63130d8b9c2fa2c3d1f45fb23743e4a551e0312349e971c557ef1e9896742e5666b4f58376bf4fd4f3dc9745518cf4b988302d7f16962693855379b849c4913e1984d6241c673fbcb9eb04eeeb693bbb571b14aa5fffcb65036360a6f3939b221b71296810d4e3715f82e96f01df78a8e38fb83fbdb39f7686cd446d1ecaa09f0ed1721f47f8807bf9a27d5390762cc3b5011ad70ec2ef337c2b085f41b2ab7b77e95266afb5bf93c304252a9cb5fbffaec145c526a03afddf5cfc3d086f208798fcfea8639286e03e67c96c11675584c73531720251b976ca0a99676c7b9240b9de92fc98ba6d4c21fd3088edb891269540d8995f09e202f866748c59fc44818047be11c7490ca982b026588ba121adf41b1c728b27c6f2ad0f09171e6c96e71bec4388539cdf6519b0a32599d6d0a7ae7d538fcc2693a8e8533c4aebed739e49886d3b11e07e90df094d6bbe2e842a6ee2f2b64bb246056b785997910aa21b805bf4d2744b6a3e2b40ce1ba34d79960a75bfa25a4134585133a371ef75bd1841f254d84db2b40682f760c5a1986dd1beb38345774d9471869304ae04d67df8419173f2f333614fa7fcad6a02b8a766dd1e18b54b014b38b144596fa1d399b80369d858d9a22d23b8f96778216d29f68e2ab6e81650ee9feec8c0f080eee1aaaa3807b84e275aea5b65e009dc8518fe89f3d18021808e925704f52a127072413b126865d2684e9987138084296cf4b608877df97c02478f8ece3ce2064b6ed838dafa2db278a27acfb245ff63729b5e2e3c7857f2eb4d109b5eab864a6879c908f5ec166fc21a0070f87a889b5717fcbff1c98f80960ce03d452d530dfc82042775555fb16b2816a8a71ef386f8a2a995503d4511c330e13ffdf4c3e9592117d2b80c0a231514b7576ab8d961c482d46fac9e92579dcec56d22c9acd09dcb8dcc4242c60b4402cba9dbe486b50',
    publicKey: '-----BEGIN PUBLIC KEY-----\n' +
      'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDV5l36RwIQYzNsiQvXsMnhZpna\n' +
      'ltWluDkZcDSsViBQlaEROY5HiNB4AVY2I+F3c2vQ8CYtyPLecf7tQ3gcKcq1QdQk\n' +
      '1nliUQogc660DNce5VuQQ4S2UoIr6C9VFbvsAURDNgc659Fzk166/DDxcf+Nkexa\n' +
      'CefcyMM46L0NefnoGQIDAQAB\n' +
      '-----END PUBLIC KEY-----\n',
    publicKeyDer: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDV5l36RwIQYzNsiQvXsMnhZpnaltWluDkZcDSsViBQlaEROY5HiNB4AVY2I+F3c2vQ8CYtyPLecf7tQ3gcKcq1QdQk1nliUQogc660DNce5VuQQ4S2UoIr6C9VFbvsAURDNgc659Fzk166/DDxcf+NkexaCefcyMM46L0NefnoGQIDAQAB',
    fingerprint: '61:dc:e9:15:a7:25:74:23:fa:27:b3:42:91:8b:95:02:ec:96:d9:91:8e:f8:0e:5a:56:35:06:d3:d3:6f:13:11',
    created: ISODate('2024-09-27T06:45:46.672Z'),
    latest: true,
    description: 'Default DKIM key for yushei.net'
  }
]
wildduck> db.domainaccess.find().limit(1)
wildduck> db.filters.find().limit(1)
wildduck> db.journal.find().limit(1)
[
  {
    _id: ObjectId('671c5d36ba07fa1f42fe746f'),
    command: 'EXISTS',
    uid: 371,
    ignore: null,
    message: ObjectId('671c5d3609e7602b0b3af02a'),
    modseq: 794,
    unseen: true,
    idate: ISODate('2024-10-26T03:08:38.792Z'),
    thread: ObjectId('671c5d36ba07fa1f42fe746e'),
    created: ISODate('2024-10-26T03:08:38.841Z'),
    mailbox: ObjectId('66f7a6501432923305d8e101'),
    user: ObjectId('66f7a6501432923305d8e100')
  }
]
wildduck> db.mailboxes.find().limit(1)
[
  {
    _id: ObjectId('66f7a6501432923305d8e101'),
    path: 'INBOX',
    specialUse: null,
    uidValidity: 1727506000,
    uidNext: 372,
    modifyIndex: 797,
    subscribed: true,
    flags: [],
    user: ObjectId('66f7a6501432923305d8e100'),
    retention: 0
  }
]
...
       '\r\n' +
        '</html>'
    ],
    mailbox: ObjectId('66f7a6501432923305d8e101'),
    user: ObjectId('66f7a6501432923305d8e100'),
    uid: 1,
    modseq: 12,
    searchable: true,
    thread: ObjectId('66f7a6501432923305d8e109')
  }
]
wildduck> db.settings.find().limit(1)
wildduck> db.storage.chunks.find().limit(1)
wildduck> db.storage.files.find().limit(1)
wildduck> db.tasks.find().limit(1)
wildduck> db.threads.find().limit(1)
[
  {
    _id: ObjectId('66f7a6501432923305d8e109'),
    user: ObjectId('66f7a6501432923305d8e100'),
    subject: '頼宗佑, welcome to our awesome service!',
    ids: [ 'NM998y3dpFtobe+9FnqTBUCzCQM' ],
    updated: ISODate('2024-09-28T06:46:40.598Z')
  }
]
wildduck> db.users.find().limit(1)
[
  {
    _id: ObjectId('66f7a6501432923305d8e100'),
    username: 'alexlai',
    unameview: 'alexlai',
    name: '頼宗佑',
    password: '$pbkdf2-sha256$i=100000$Zo3gLMyaP+jEx9j7KJ193g$mJGLWzZ12OByHzn/sw13WZgQIpUyVj67BwZuUBScmN0',
    enabled2fa: [],
    seed: '',
    pendingSeed: '',
    pendingSeedChanged: false,
    webauthn: { credentials: [] },
    authVersion: 1,
    address: 'alexlai@yushei.net',
    language: null,
    storageUsed: 1808107,
    quota: 1073741824,
    recipients: 2000,
    forwards: 2000,
    filters: 0,
    imapMaxUpload: 0,
    imapMaxDownload: 0,
    pop3MaxDownload: 0,
    pop3MaxMessages: 0,
    imapMaxConnections: 0,
    receivedMax: 0,
    targets: [],
    autoreply: false,
    uploadSentMessages: false,
    pubKey: '',
    encryptMessages: false,
    encryptForwarded: false,
    spamLevel: 50,
    retention: 0,
    disabledScopes: [],
    lastLogin: {
      time: ISODate('2024-10-26T05:00:29.316Z'),
      authEvent: ObjectId('671c776dd30471ebef55e9c3'),
      ip: '210.242.152.235'
    },
    metaData: '',
    internalData: '',
    activated: true,
    disabled: false,
    suspended: false,
    featureFlags: {},
    created: ISODate('2024-09-28T06:46:40.329Z')
  }
]
wildduck> db.webhooks.find().limit(1)

Certainly! Here’s a brief overview of the collections in the Zone-MTA database:

This collection stores data in chunks for large email messages or attachments. By breaking messages into smaller pieces, it facilitates efficient storage and retrieval, particularly for emails that may exceed size limits.

This collection contains metadata about the files associated with emails, including information about attachments. It may include details such as filenames, sizes, and references to the corresponding messages in the mail.chunks collection.

This collection maintains a list of email addresses that should be suppressed from receiving emails. These may include addresses that have opted out of communications, bounced emails, or those flagged for other reasons. It helps ensure compliance with anti-spam regulations and protects sender reputation.

This collection manages the queue of emails waiting to be sent. It tracks messages that are in the process of being delivered, including their status and any retry attempts. This is crucial for managing the flow of outbound emails and ensuring they are sent efficiently.