Search K
Appearance
Appearance
General overview:
doveadm dump
.scality-keys(1)
script from the obox package.This is especially useful when trying to figure out if some object was created recently or not. For example with the Obox Troubleshooting: Object exists in dict, but not in storage errors whether the object was created before or after upgrading to a version that fixed it. (Although that's not perfect either, because already orphaned objects can be copied.)
See script fname-parse(1)
in the obox package.
Many places in Dovecot store UNIX timestamps. These can be converted to human-readable timestamps with for example:
#!/bin/sh
# unix2date.sh
date -d "1970-01-01 UTC $1 seconds"
To get the timestamps in another timezone, use e.g.: TZ=Japan unix2date.sh 1503848486
Dovecot stores a timestamp as part of the GUIDs it generates. For example OIDs, mail GUIDs, folder GUIDs, etc. As a special case, dsync+imapc uses truncated SHA1 of the folder name as the GUID for the migrated folders, because IMAP protocol doesn't support the concept of GUIDs. If a folder GUID timestamp appears to be impossible, it's most likely because it's not a real GUID but a migrated folder.
#!/bin/bash
# guid2date.sh
guid=$1
hex=`printf $guid|cut -c 9-16|sed 's/\(..\)\(..\)\(..\)\(..\)/\4\3\2\1/'`
dec=`printf "%d" 0x$hex`
time=`date -d "1970-01-01 UTC $dec seconds"`
printf "$guid\nhex: $hex\ndec: $dec\ntime: $time\n"
If a folder GUID doesn't seem to have a proper timestamp (as explained above), it most likely was created by dsync+imapc migration. That creates GUIDs based on the truncated 128bit SHA1 hash of folder names. So multiple users can be sharing these same "GUID"s. It's possible to verify whether a folder name results in such a GUID with:
echo -n "Folder name" | sha1sum | cut -c 9-
Remember not to include the linefeed when calculating the hash (use echo -n or printf).
For example: