exim: Completely review the exim configuration.
[matthijs/servers/drsnuggles.git] / etc / exim4 / conf.d / rewrite / 10_ldap
diff --git a/etc/exim4/conf.d/rewrite/10_ldap b/etc/exim4/conf.d/rewrite/10_ldap
new file mode 100644 (file)
index 0000000..f994d65
--- /dev/null
@@ -0,0 +1,12 @@
+################################
+# Any outgoing mail sent by a user from a domain in local_hosts has its From:
+# address and envelope From address rewritten to use his primary mail address
+# from ldap.
+#
+#################################
+
+*@+real_domains \
+       "${lookup ldap {LDAPURL?mail?sub?(uid=${quote_ldap:$local_part})} \
+       {$value}fail}" Ff
+
+# vim: set sts=2 expandtab sw=2 ai: