AS_IF([test "$is_pro_build" = "yes"], [
SET_PRO_DEFINES
AC_SUBST(DOVECOT_ASSET_URL, "doc.dovecotpro.com")
+ AC_DEFINE(DOVECOT_DOC_URL, "https://doc.dovecotpro.com/", [Documentation URL])
AC_SUBST(DOVECOT_PRO_BUILD, 1)
], [
AC_DEFINE_UNQUOTED(DOVECOT_NAME, "$PACKAGE_NAME", [Dovecot name])
AC_SUBST(DOVECOT_ASSET_URL, "doc.dovecot.org")
+ AC_DEFINE(DOVECOT_DOC_URL, "https://doc.dovecot.org/", [Documentation URL])
AC_SUBST(DOVECOT_PRO_BUILD, 0)
])
AC_DEFINE_UNQUOTED(DOVECOT_CONFIG_VERSION, "$DOVECOT_CONFIG_VERSION", [Dovecot configuration version])
#include "time-util.h"
#include "master-service-private.h"
#include "login-client.h"
+#include "doc.h"
#include <unistd.h>
#include <sys/stat.h>
if (conn->fd == -1) {
e_error(conn->event, "net_connect_unix(%s) failed: %m%s",
conn->path, errno != EAGAIN ? "" :
- " - https://doc.dovecot.org/admin_manual/errors/socket_unavailable/");
+ " - " DOC_LINK("core/admin/errors.html#unix-socket-resource-temporarily-unavailable"));
login_connection_deinit(&conn);
return;
}
#include "master-service-private.h"
#include "login-server.h"
#include "login-server-auth.h"
+#include "doc.h"
#include <sys/stat.h>
#include <unistd.h>
if (fd == -1) {
e_error(request->conn->event, "net_connect_unix(%s) failed: %m%s",
socket_path, errno != EAGAIN ? "" :
- " - https://doc.dovecot.org/admin_manual/errors/socket_unavailable/");
+ " - " DOC_LINK("core/admin/errors.html#unix-socket-resource-temporarily-unavailable"));
return -1;
}
#include "istream-raw-mbox.h"
#include "mail-copy.h"
#include "index-mail.h"
+#include "doc.h"
#include <sys/stat.h>
!S_ISDIR(st.st_mode)) {
*error_r = t_strdup_printf(
"mbox root directory can't be a file: %s "
- "(https://doc.dovecot.org/configuration_manual/mail_location/mbox/)",
+ "(" DOC_LINK("core/config/mailbox/mail_location.html#mbox") ")",
ns->list->mail_set->mail_path);
return -1;
}
#include "mail-namespace.h"
#include "mail-storage.h"
#include "mail-storage-service.h"
+#include "doc.h"
#include <sys/stat.h>
#include <time.h>
}
diff = -diff;
- const char *doc_ref = "https://doc.dovecot.org/admin_manual/errors/time_moved_backwards/";
+ const char *doc_ref = DOC_LINK("core/admin/errors.html#time-moved-backwards-error");
if ((diff / 1000) > MAX_TIME_BACKWARDS_SLEEP_MSECS) {
i_fatal("Time just moved backwards by %lld.%06lld seconds. "
"This might cause a lot of problems, "
cpu-limit.h \
crc32.h \
data-stack.h \
+ doc.h \
eacces-error.h \
env-util.h \
event-filter.h \
--- /dev/null
+#ifndef DOC_H
+#define DOC_H
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#define DOC_LINK(page) DOVECOT_DOC_URL "latest/" page
+
+#endif
#include "ipwd.h"
#include "restrict-access.h"
#include "eacces-error.h"
+#include "doc.h"
#include <sys/stat.h>
#include <unistd.h>
if (gid_origin != NULL)
str_printfa(errmsg, ", group based on %s", gid_origin);
str_append(errmsg,
- " - see https://doc.dovecot.org/admin_manual/errors/chgrp_no_perm/)");
+ " - see " DOC_LINK("core/admin/errors.html#change-group-operation-not-permitted") ")");
errno = orig_errno;
return str_c(errmsg);
}