diff --git a/Makefile.am b/Makefile.am
index bcf53d7561bb3755cc21c8442f6336a34bba7457..0a1c959a1d6c18940d6e852f3f49b3b8643902a8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,27 +1,10 @@
-SUBDIRS = src
-
-unfinished = doc/man/sieve-filter.1
-
-if BUILD_UNFINISHED
-unfinished_mans = $(unfinished)
-else
-unfinished_dist = $(unfinished)
-endif
+SUBDIRS = src doc
 
 EXTRA_DIST = \
 	tests \
-	examples/* \
-	doc/rfc \
-	doc/devel \
+	examples \
 	COPYING.LGPL \
-	ChangeLog \
-	$(unfinished_dist)
-
-dist_man_MANS = \
-	doc/man/sievec.1 \
-	doc/man/sieved.1 \
-	doc/man/sieve-test.1 \
-	$(unfinished_mans)
+	ChangeLog
 
 if MAINTAINER_MODE
 ChangeLog: .hg/dirstate
diff --git a/configure.in b/configure.in
index 37db2abded6cee0b2caf1ac916ff454c3f3a6aa0..61467b8a326c9d29eea684e082b9e1fbf882d21a 100644
--- a/configure.in
+++ b/configure.in
@@ -99,6 +99,10 @@ AC_SUBST(moduledir)
 
 AC_CONFIG_FILES([
 Makefile
+doc/Makefile
+doc/man/Makefile
+doc/example-config/Makefile
+doc/example-config/conf.d/Makefile
 src/Makefile
 src/lib-sieve/Makefile
 src/lib-sieve/plugins/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..12877437d545892f706b277e4fc92208109e9192
--- /dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = man example-config
+
+EXTRA_DIST = rfc devel
+
diff --git a/doc/example-config/Makefile.am b/doc/example-config/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..861daae16b225b2577edfa45d91e6ecc187392fd
--- /dev/null
+++ b/doc/example-config/Makefile.am
@@ -0,0 +1,2 @@
+SUBDIRS = conf.d
+
diff --git a/doc/example-config/conf.d/Makefile.am b/doc/example-config/conf.d/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..175992957b0f0e05f30b6a59555a7bd2569568e9
--- /dev/null
+++ b/doc/example-config/conf.d/Makefile.am
@@ -0,0 +1,8 @@
+pkgsysconfdir = $(sysconfdir)/dovecot
+
+exampledir = $(docdir)/example-config/conf.d
+example_DATA = \
+	sieve.conf 
+
+EXTRA_DIST = \
+	$(example_DATA)
diff --git a/doc/example-config/conf.d/sieve.conf b/doc/example-config/conf.d/sieve.conf
new file mode 100644
index 0000000000000000000000000000000000000000..c2a25f4896e888c64908da63685bce9ab704c31b
--- /dev/null
+++ b/doc/example-config/conf.d/sieve.conf
@@ -0,0 +1,42 @@
+##
+## Settings for the Sieve interpreter
+## 
+
+# Do not forget to enable the Sieve plugin in lda.conf and lmtp.conf
+# by adding it to the mail_plugins= settings.
+
+plugin {
+  # The path to the user's main active script. 
+  sieve = ~/.dovecot.sieve
+
+  # A path to a global sieve script file, which gets executed ONLY
+  # if user's private Sieve script doesn't exist. Be sure to 
+  # pre-compile this script manually using the sievec command line 
+  # tool.
+  #sieve_global_path = /var/lib/dovecot/sieve/default.sieve
+
+  # Directory for :personal include scripts for the include extension. 
+  sieve_dir = ~/sieve
+
+  # Directory for :global include scripts for the include extension. 
+  #sieve_global_dir =
+
+  # Which Sieve language extensions are available to users. By default,
+  # all supported extensions are available, except for deprecated
+  # extensions or those that are still under development. Some system
+  # administrators may want to disable certain Sieve extensions or 
+  # enable those that are not available by default. This setting can 
+  # use '+' and '-' to specify differences relative to the default. 
+  # For example `sieve_extensions = +imapflags' will enable the 
+  # deprecated imapflags extension in addition to all extensions 
+  # enabled by default. 
+  #sieve_extensions = +notify +imapflags
+
+  # The separator that is expected between the :user and :detail 
+  # address parts introduced by the subaddress extension. This may also 
+  # be a sequence of characters (e.g. '--'). The current implementation
+  # looks for the separator from the left of the localpart and uses the
+  # first one encountered. The :user part is left of the separator and
+  # the :detail part is right. 
+  #sieve_subaddress_sep = +
+}
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
new file mode 100644
index 0000000000000000000000000000000000000000..156e434e4dd1abe1c719461ee538199a4de5af3a
--- /dev/null
+++ b/doc/man/Makefile.am
@@ -0,0 +1,17 @@
+unfinished = sieve-filter.1
+
+if BUILD_UNFINISHED
+unfinished_mans = $(unfinished)
+else
+unfinished_dist = $(unfinished)
+endif
+
+EXTRA_DIST = \
+	$(unfinished_dist)
+
+dist_man_MANS = \
+	sievec.1 \
+	sieved.1 \
+	sieve-test.1 \
+	$(unfinished_mans)
+