forked from titusjose/postfix_redis
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREDIS_README.html
105 lines (69 loc) · 2.64 KB
/
REDIS_README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Postfix Redis Howto</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix Redis Howto</h1>
<hr>
<h2>Introduction</h2>
<p> The Postfix redis map type allows you to hook up Postfix to a
Redis database. </p>
<h2>Building Postfix with Redis support</h2>
<p> These instructions assume that you build Postfix from source
code as described in the <a href="INSTALL.html">INSTALL</a> document. Some modification may
be required if you build Postfix from a vendor-specific source
package. </p>
<p> In order to build Postfix with redis map support, you specify
-DHAS_REDIS, the directory with the hiredis header files, and
the location of the hiredis library file. </p>
<p> For example: </p>
<blockquote>
<pre>
% make tidy
% make -f Makefile.init makefiles \
'CCARGS=-DHAS_REDIS $(pkg-config --cflags hiredis)' \
'<a href="REDIS_README.html">AUXLIBS_REDIS</a>=$(pkg-config --libs hiredis)'
</pre>
</blockquote>
<blockquote>
<p> Failure to use the <a href="REDIS_README.html">AUXLIBS_REDIS</a> variable will defeat the purpose
of dynamic database client loading. Every Postfix executable file
will have Redis database library dependencies. And that was exactly
what dynamic database client loading was meant to avoid. </p>
</blockquote>
<p> Then just run 'make'. </p>
<h2>Configuring Redis lookup tables</h2>
<p> Once Postfix is built with redis support, you can specify a
map type in <a href="postconf.5.html">main.cf</a> like this: </p>
<blockquote>
<pre>
/etc/postfix/<a href="postconf.5.html">main.cf</a>:
<a href="postconf.5.html#alias_maps">alias_maps</a> = <a href="redis_table.5.html">redis</a>:/etc/postfix/redis-aliases.cf
</pre>
</blockquote>
<p> The file /etc/postfix/redis-aliases.cf specifies how to reach the redis database.
For a complete description, see the <a href="redis_table.5.html">redis_table(5)</a> manual page. </p>
<h2>Example: virtual mailbox domain </h2>
<pre>
#
# redis config file for <a href="virtual.8.html">virtual(8)</a> lookups
#
#
# The hosts that Postfix will try to connect to
host = 127.0.0.1
# The prefix added to the query to check with redis
prefix = VDOM:
</pre>
<h2>Using mirrored databases</h2>
<p> Sites that have a need for multiple mail exchangers can setup a redis cluster
if needed, for fallover capability. </p>
<h2>Credits</h2>
<ul>
<li> This code is originaly by Titus T Jose.</li>
<li> It has been updated by Duncan Bellamy.</li>
</ul>
</body>
</html>