Returns short commit ID of the revision dovecot was built from.
#include "imap-parser.h"
#include "imap-quote.h"
#include "imap-id.h"
+#include "dovecot-version.h"
#ifdef HAVE_SYS_UTSNAME_H
# include <sys/utsname.h>
return PACKAGE_NAME;
if (strcasecmp(key, "version") == 0)
return PACKAGE_VERSION;
+ if (strcasecmp(key, "revision") == 0)
+ return DOVECOT_REVISION;
if (strcasecmp(key, "support-url") == 0)
return PACKAGE_WEBPAGE;
if (strcasecmp(key, "support-email") == 0)
#ifndef DOVECOT_VERSION_H
#define DOVECOT_VERSION_H
-#define DOVECOT_VERSION_FULL VERSION" (${GITID})"
+#define DOVECOT_REVISION "${GITID}"
+#define DOVECOT_VERSION_FULL VERSION" ("DOVECOT_REVISION")"
#define DOVECOT_BUILD_INFO ${DOVECOT_BUILD_INFO}
#endif /* DOVECOT_VERSION_H */