Projet

Général

Profil

Serveur Mail tetalab » Historique » Version 1

iku jam, 09/01/2012 17:28

1 1 iku jam
h1. Serveur Mail tetalab
2 1 iku jam
3 1 iku jam
h2. installation sous debian
4 1 iku jam
5 1 iku jam
h3. paquets requis : 
6 1 iku jam
7 1 iku jam
<pre>
8 1 iku jam
ii  courier-authdaemon                0.63.0-3.1                       Courier authentication daemon
9 1 iku jam
ii  courier-authlib                   0.63.0-3.1                       Courier authentication library
10 1 iku jam
ii  courier-authlib-ldap              0.63.0-3.1                       LDAP support for the Courier authentication library
11 1 iku jam
ii  courier-authlib-postgresql        0.63.0-3.1                       PostgreSQL support for the Courier authentication library
12 1 iku jam
ii  courier-authlib-userdb            0.63.0-3.1                       userdb support for the Courier authentication library
13 1 iku jam
ii  courier-base                      0.66.1-1                         Courier mail server - base system
14 1 iku jam
ii  courier-imap                      4.9.1-1                          Courier mail server - IMAP server
15 1 iku jam
ii  courier-imap-ssl                  4.9.1-1                          Courier mail server - IMAP over SSL
16 1 iku jam
ii  courier-pop                       0.66.1-1                         Courier mail server - POP3 server
17 1 iku jam
ii  courier-ssl                       0.66.1-1                         Courier mail server - SSL/TLS Support
18 1 iku jam
19 1 iku jam
ii  postfix                           2.8.3-1                          High-performance mail transport agent
20 1 iku jam
ii  postfix-pgsql                     2.8.3-1                          PostgreSQL map support for Postfix
21 1 iku jam
ii  postfixadmin                      2.3.2                            Virtual mail hosting interface for Postfix
22 1 iku jam
ii  postgresql                        9.0.4-1                          object-relational SQL database (supported version)
23 1 iku jam
rc  postgresql-8.4                    8.4.5-0squeeze2                  object-relational SQL database, version 8.4 server
24 1 iku jam
ii  postgresql-9.0                    9.0.4-1+b1                       object-relational SQL database, version 9.0 server
25 1 iku jam
ii  postgresql-client-9.0             9.0.4-1+b1                       front-end programs for PostgreSQL 9.0
26 1 iku jam
ii  postgresql-client-common          118                              manager for multiple PostgreSQL client versions
27 1 iku jam
ii  postgresql-common                 118                              PostgreSQL database-cluster manager
28 1 iku jam
ii  postgresql-contrib                9.0.4-1                          additional facilities for PostgreSQL (supported version)
29 1 iku jam
ii  postgresql-contrib-9.0            9.0.4-1+b1                       additional facilities for PostgreSQL
30 1 iku jam
ii  postgrey                          1.34-1                           greylisting implementation for Postfix
31 1 iku jam
32 1 iku jam
ii  sasl2-bin                         2.1.24~rc1.dfsg1+cvs2011-05-23-4 Cyrus SASL - administration programs for SASL users database
33 1 iku jam
34 1 iku jam
ii  squirrelmail                      2:1.4.21-1                       Webmail for nuts
35 1 iku jam
ii  squirrelmail-locales              1.4.18-20090526-1                Translations for the SquirrelMail Webmail package
36 1 iku jam
ii  squirrelmail-viewashtml           3.8-3                            SquirrelMail plugin: View mails as HTML
37 1 iku jam
</pre>
38 1 iku jam
39 1 iku jam
h3. config
40 1 iku jam
41 1 iku jam
/etc/postfix/main.cf
42 1 iku jam
43 1 iku jam
_attention, copier-coller de tetalab.org (derriere un nat => proxy etc...)_
44 1 iku jam
45 1 iku jam
<pre>
46 1 iku jam
smtpd_banner = $myhostname ESMTP $mail_name
47 1 iku jam
biff = no
48 1 iku jam
append_dot_mydomain = no
49 1 iku jam
readme_directory = no
50 1 iku jam
smtp_use_tls=yes
51 1 iku jam
smtpd_use_tls=yes
52 1 iku jam
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
53 1 iku jam
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
54 1 iku jam
myhostname = tetalab.org
55 1 iku jam
alias_maps = hash:/etc/aliases,hash:/var/lib/mailman/data/aliases
56 1 iku jam
alias_database = hash:/etc/aliases
57 1 iku jam
myorigin = /etc/mailname
58 1 iku jam
mydestination = web.tetalab.org, www.tetalab.org, localhost.tetalab.org, localhost
59 1 iku jam
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.23.0/24
60 1 iku jam
mailbox_command = procmail -a "$EXTENSION"
61 1 iku jam
mailbox_size_limit = 0
62 1 iku jam
recipient_delimiter = +
63 1 iku jam
inet_interfaces = all
64 1 iku jam
smtpd_sasl_authenticated_header = yes
65 1 iku jam
smtpd_sasl_auth_enable = yes
66 1 iku jam
smtp_sasl_auth_enable = yes
67 1 iku jam
smtpd_sasl_security_options = noanonymous
68 1 iku jam
broken_sasl_auth_clients = yes
69 1 iku jam
smtpd_sender_restrictions = permit_sasl_authenticated
70 1 iku jam
smtpd_recipient_restrictions =
71 1 iku jam
        permit_mynetworks,
72 1 iku jam
        permit_sasl_authenticated,
73 1 iku jam
        reject_unauth_destination,
74 1 iku jam
        check_policy_service inet:127.0.0.1:10023
75 1 iku jam
smtp_tls_note_starttls_offer = yes
76 1 iku jam
smtpd_sasl_local_domain = tetalab.org
77 1 iku jam
smtp_tls_policy_maps = hash:/etc/postfix/tls_policy
78 1 iku jam
smtp_tls_note_starttls_offer = yes 
79 1 iku jam
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.pem
80 1 iku jam
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.pem
81 1 iku jam
smtpd_tls_CAfile = /etc/postfix/ssl/smtpd.pem
82 1 iku jam
smtp_tls_loglevel = 1
83 1 iku jam
smtp_sasl_path = smtpd
84 1 iku jam
smtpd_sasl_path = smtpd
85 1 iku jam
smtp_sasl_tls_security_options = $smtpd_sasl_security_options
86 1 iku jam
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
87 1 iku jam
relay_domains = proxy:pgsql:/etc/postfix/pgsql/relay_domains.cf, lists.tetalab.org, lists.mixart-myrys.org, lists.toulouserb.org
88 1 iku jam
virtual_alias_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf
89 1 iku jam
virtual_mailbox_domains = proxy:pgsql:/etc/postfix/pgsql/virtual_domain_maps.cf
90 1 iku jam
virtual_mailbox_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
91 1 iku jam
smtp_sasl_password_maps = proxy:pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf
92 1 iku jam
virtual_mailbox_base = /var/mail/vmail
93 1 iku jam
virtual_mailbox_limit = 51200000
94 1 iku jam
virtual_minimum_uid = 8
95 1 iku jam
virtual_transport = virtual
96 1 iku jam
virtual_uid_maps = static:8
97 1 iku jam
virtual_gid_maps = static:8
98 1 iku jam
local_transport = virtual
99 1 iku jam
local_recipient_maps = $virtual_mailbox_maps
100 1 iku jam
transport_maps = hash:/etc/postfix/transport
101 1 iku jam
mailman_destination_recipient_limit = 1
102 1 iku jam
smtp_sasl_mechanism_filter = plain, login
103 1 iku jam
proxy_interfaces = 88.191.126.74
104 1 iku jam
</pre>
105 1 iku jam
106 1 iku jam
Dans @/etc/postfix/pgsql@
107 1 iku jam
108 1 iku jam
*relay_domains.cf*  :
109 1 iku jam
<pre>
110 1 iku jam
user = postfixadmin
111 1 iku jam
password = PASSWORD
112 1 iku jam
hosts = localhost
113 1 iku jam
dbname = postfixadmin
114 1 iku jam
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = true
115 1 iku jam
</pre>
116 1 iku jam
117 1 iku jam
*virtual_alias_maps.cf*  :
118 1 iku jam
<pre>
119 1 iku jam
user = postfixadmin
120 1 iku jam
password = PASSWORD
121 1 iku jam
hosts = localhost
122 1 iku jam
dbname = postfixadmin
123 1 iku jam
query = SELECT goto FROM alias WHERE address='%s' AND active = true
124 1 iku jam
</pre>
125 1 iku jam
126 1 iku jam
*virtual_domain_maps.cf*  :
127 1 iku jam
<pre>
128 1 iku jam
user = postfixadmin
129 1 iku jam
password = PASSWORD
130 1 iku jam
hosts = localhost
131 1 iku jam
dbname = postfixadmin
132 1 iku jam
#query = SELECT domain FROM domain WHERE domain='%s'
133 1 iku jam
#optional query to use when relaying for backup MX
134 1 iku jam
query = SELECT domain FROM domain WHERE domain='%s' and backupmx = false and active = true
135 1 iku jam
</pre>
136 1 iku jam
137 1 iku jam
*virtual_mailbox_limits.cf*  :
138 1 iku jam
<pre>
139 1 iku jam
# Used for QUOTA!
140 1 iku jam
user = postfixadmin
141 1 iku jam
password = PASSWORD
142 1 iku jam
hosts = localhost
143 1 iku jam
dbname = postfixadmin
144 1 iku jam
query = SELECT quota FROM mailbox WHERE username='%s'
145 1 iku jam
</pre>
146 1 iku jam
147 1 iku jam
*virtual_mailbox_maps.cf*  :
148 1 iku jam
<pre>
149 1 iku jam
user = postfixadmin
150 1 iku jam
password = PASSWORD
151 1 iku jam
hosts = localhost
152 1 iku jam
dbname = postfixadmin
153 1 iku jam
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = true
154 1 iku jam
</pre>
155 1 iku jam
156 1 iku jam
157 1 iku jam
h3. courier
158 1 iku jam
159 1 iku jam
Dans @/etc/courier@
160 1 iku jam
161 1 iku jam
*authdaemonrc*  :
162 1 iku jam
<pre>
163 1 iku jam
authmodulelist="authpgsql"
164 1 iku jam
authmodulelistorig="authuserdb authpam authpgsql authldap authmysql authcustom authpipe"
165 1 iku jam
daemons=5
166 1 iku jam
authdaemonvar=/var/run/courier/authdaemon
167 1 iku jam
DEBUG_LOGIN=1
168 1 iku jam
DEFAULTOPTIONS=""
169 1 iku jam
LOGGEROPTS=""
170 1 iku jam
</pre>
171 1 iku jam
172 1 iku jam
*authldaprc*  :
173 1 iku jam
<pre>
174 1 iku jam
LDAP_URI                ldap://localhost
175 1 iku jam
LDAP_PROTOCOL_VERSION   3
176 1 iku jam
LDAP_BASEDN             ou=People,dc=tetalab,dc=org
177 1 iku jam
LDAP_TIMEOUT            5
178 1 iku jam
LDAP_MAIL               mail
179 1 iku jam
LDAP_HOMEDIR            homeDirectory
180 1 iku jam
LDAP_MAILDIR            mailbox
181 1 iku jam
LDAP_DEFAULTDELIVERY    defaultDelivery
182 1 iku jam
LDAP_FULLNAME           cn
183 1 iku jam
LDAP_CLEARPW            clearPassword
184 1 iku jam
LDAP_CRYPTPW            userPassword
185 1 iku jam
LDAP_DEREF              never
186 1 iku jam
LDAP_TLS                0
187 1 iku jam
</pre>
188 1 iku jam
189 1 iku jam
*authpgsqlrc*  :
190 1 iku jam
<pre>
191 1 iku jam
PGSQL_HOST              localhost
192 1 iku jam
PGSQL_PORT              5432
193 1 iku jam
PGSQL_USERNAME          postfixadmin
194 1 iku jam
PGSQL_PASSWORD          PASSWORD
195 1 iku jam
PGSQL_DATABASE          postfixadmin
196 1 iku jam
PGSQL_USER_TABLE        mailbox
197 1 iku jam
PGSQL_CRYPT_PWFIELD     password
198 1 iku jam
PGSQL_UID_FIELD         8
199 1 iku jam
PGSQL_GID_FIELD         8
200 1 iku jam
PGSQL_LOGIN_FIELD       username
201 1 iku jam
PGSQL_HOME_FIELD        '/var/mail/vmail'
202 1 iku jam
PGSQL_NAME_FIELD        name
203 1 iku jam
PGSQL_MAILDIR_FIELD     maildir
204 1 iku jam
PGSQL_QUOTA_FIELD       quota
205 1 iku jam
</pre>
206 1 iku jam
207 1 iku jam
*imapd*  :
208 1 iku jam
<pre>
209 1 iku jam
ADDRESS=0
210 1 iku jam
PORT=143
211 1 iku jam
MAXDAEMONS=40
212 1 iku jam
MAXPERIP=20
213 1 iku jam
PIDFILE=/var/run/courier/imapd.pid
214 1 iku jam
TCPDOPTS="-nodnslookup -noidentlookup"
215 1 iku jam
LOGGEROPTS="-name=imapd"
216 1 iku jam
IMAP_CAPABILITY="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE"
217 1 iku jam
IMAP_KEYWORDS=1
218 1 iku jam
IMAP_ACL=1
219 1 iku jam
IMAP_CAPABILITY_ORIG="IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=CRAM-MD5 AUTH=CRAM-SHA1 AUTH=CRAM-SHA256 IDLE"
220 1 iku jam
IMAP_PROXY=0
221 1 iku jam
IMAP_PROXY_FOREIGN=0
222 1 iku jam
IMAP_IDLE_TIMEOUT=60
223 1 iku jam
IMAP_MAILBOX_SANITY_CHECK=1
224 1 iku jam
IMAP_CAPABILITY_TLS="$IMAP_CAPABILITY AUTH=PLAIN"
225 1 iku jam
IMAP_CAPABILITY_TLS_ORIG="$IMAP_CAPABILITY_ORIG AUTH=PLAIN"
226 1 iku jam
IMAP_DISABLETHREADSORT=0
227 1 iku jam
IMAP_CHECK_ALL_FOLDERS=0
228 1 iku jam
IMAP_OBSOLETE_CLIENT=0
229 1 iku jam
IMAP_UMASK=022
230 1 iku jam
IMAP_ULIMITD=131072
231 1 iku jam
IMAP_USELOCKS=1
232 1 iku jam
IMAP_SHAREDINDEXFILE=/etc/courier/shared/index
233 1 iku jam
IMAP_ENHANCEDIDLE=0
234 1 iku jam
IMAP_TRASHFOLDERNAME=Trash
235 1 iku jam
IMAP_EMPTYTRASH=Trash:7
236 1 iku jam
IMAP_MOVE_EXPUNGE_TO_TRASH=0
237 1 iku jam
SENDMAIL=/usr/sbin/sendmail
238 1 iku jam
HEADERFROM=X-IMAP-Sender
239 1 iku jam
IMAPDSTART=YES
240 1 iku jam
MAILDIRPATH=Maildir
241 1 iku jam
</pre>
242 1 iku jam
243 1 iku jam
*imapd-ssl*  :
244 1 iku jam
<pre>
245 1 iku jam
SSLPORT=993
246 1 iku jam
SSLADDRESS=0
247 1 iku jam
SSLPIDFILE=/var/run/courier/imapd-ssl.pid
248 1 iku jam
SSLLOGGEROPTS="-name=imapd-ssl"
249 1 iku jam
IMAPDSSLSTART=YES
250 1 iku jam
IMAPDSTARTTLS=YES
251 1 iku jam
IMAP_TLS_REQUIRED=0
252 1 iku jam
COURIERTLS=/usr/bin/couriertls
253 1 iku jam
TLS_KX_LIST=ALL
254 1 iku jam
TLS_COMPRESSION=ALL
255 1 iku jam
TLS_CERTS=X509
256 1 iku jam
TLS_CERTFILE=/etc/courier/imapd.pem
257 1 iku jam
TLS_TRUSTCERTS=/etc/ssl/certs
258 1 iku jam
TLS_VERIFYPEER=NONE
259 1 iku jam
TLS_CACHEFILE=/var/lib/courier/couriersslcache
260 1 iku jam
TLS_CACHESIZE=524288
261 1 iku jam
MAILDIRPATH=Maildir
262 1 iku jam
</pre>
263 1 iku jam
264 1 iku jam
265 1 iku jam
<pre>
266 1 iku jam
</pre>
267 1 iku jam
268 1 iku jam
<pre>
269 1 iku jam
</pre>