forked from jasontibbitts/majordomo
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.POSTFIX
120 lines (81 loc) · 4.34 KB
/
README.POSTFIX
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
Information for Postfix users
Overview
--------
Majordomo2 can generate the necessary postfix aliases required to run a
list by itself. It can also maintain alias files for each domain run at
your site and generate the necessary virtual_maps files required to run
the lists in separate virtual domains. It will not, however, modify your
master configuration file (usually, /etc/postfix/master.cf).
When Makefile.PL is run, you will be prompted for what MTA you are running
and (assuming it's Postfix) whether or not you want Majordomo to maintain
the alias_database files for you and whether or not you want virtual_maps
entries maintained as well.
If you don't want Mj2 maintaining the files itself then it will simply
suggest aliases and do nothing to collect them. Otherwise they will be
accumulated in a directory called 'ALIASES' in files named after the domain
being served.
Makefile.PL Questions Explained
-------------------------------
* Should Majordomo maintain your aliases automatically?
Answering 'no' will cause Mj2 to suggest aliases but not do anything with
them. You will be responsible for pasting these aliases into the
appropriate file and rebuilding the alias database.
Answering 'yes' will cause Mj2 to accumulate the aliases in a directory
called ALIASES under the list directory. See 'Configuring Postfix' section
below on how to configure postfix to use these aliases.
* Should Majordomo maintain virtual_maps files as well?
If you are using the virtual_maps function of postfix to support virtual
domains, Majordomo can generate special aliases and the necessary
entries to go with them. Answer 'yes' to this question if you are running
virtual domains and want virtual_maps support; otherwise answer 'no' and
Mj2 will generate aliases appropriate for a single domain.
If you answer 'yes', Majordomo will generate aliases that include the
domain name in each address, like so:
majordomo-your.site.com: "|/path/to/mj_email -options"
The corresponding virtual_maps entry will map majordomo@your.site.com to
this address appropriately:
majordomo@your.site.com majordomo-your.site.com
See 'Configuring Postfix' section below on how to configure postfix to use
these virtual maps.
Note that there will be one virtual_maps file per domain.
Configuring Postfix
--------------------
First locate the postfix main configuration file. This is usually
/etc/postfix/main.cf
* Adding alias_database support
In the main configuration file Search for a line that looks like:
alias_database = hash:/etc/aliases
and add the appropriate paths to the end like so:
alias_database = hash:/etc/aliases
hash:/path/to/lists/ALIASES/mj-alias-domain1
hash:/path/to/lists/ALIASES/mj-alias-domain2
Substituting "/path/to/lists", "domain1" and "domain2" with the appropriate
path to the ALIASES directory.
Run postfix's 'newaliases' command as root.
Then make sure the generated alias map files are owned by the
majordomo user and group. If they are not (and they won't be in
earlier postfix versions), you have to chown and chrgrp them to the
majordomo user and group. You will only have to do this once, as
'newaliases' preserves the existing user for existing database files.
* Adding virtual_maps support
In the main configuration file Search for a line that looks like:
virtual_maps = hash:/etc/postfix/virtual
and add the appropriate paths to the end like so:
virtual_maps = hash:/etc/postfix/virtual
hash:/path/to/lists/ALIASES/mj-vut-domain1
hash:/path/to/lists/ALIASES/mj-vut-domain2
Substituting "/path/to/lists", "domain1" and "domain2" with the
appropriate path to the ALIASES directory. Don't forget to run
'postmap' on the virtual_maps files and restart postfix.
Like the alias files, you'll probably want to change the owners of the
generated virtual map files from root to the majordomo user and group
(though for virtual maps this is not strictly necessary).
* Making postfix and majordomo interact
Postfix has to be able to read the alias and virtual maps files. So
you should at least do "chmod o+x" on the lists/ALIASES and lists
directories.
Then make sure you changed the owner of the alias and virtual map
database files to the majordomo user and group (the files created by
'newaliases' and 'postmap' in the lists/ALIASES directory). This will
cause Postfix's local delivery agent to run the majordomo commands as
the majordomo user, instead of the 'nobody' user.