Показаны различия между двумя версиями страницы.
| Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
|
электронная_почта_freebsd [2013/07/22 15:10] kirill |
электронная_почта_freebsd [2013/07/24 23:03] (текущий) |
||
|---|---|---|---|
| Строка 28: | Строка 28: | ||
| cd / | cd / | ||
| + | |||
| + | make install clean | ||
| + | |||
| + | cd / | ||
| make install clean | make install clean | ||
| Строка 131: | Строка 135: | ||
| daily_submit_queuerun=" | daily_submit_queuerun=" | ||
| + | |||
| + | непосредственно установка | ||
| + | |||
| + | cd / | ||
| + | |||
| + | make install clean | ||
| + | |||
| + | опции | ||
| + | |||
| + | pcre, sasl2, tls, mysql, vda | ||
| + | |||
| + | отредактируем файл main.cf | ||
| + | |||
| + | '' | ||
| + | |||
| + | myhostname = mx.mkm.local\\ | ||
| + | |||
| + | inet_interfaces = all\\ | ||
| + | |||
| + | mydestination = $myhostname, | ||
| + | |||
| + | mynetworks = 127.0.0.0/ | ||
| + | |||
| + | smtpd_etrn_restrictions = reject\\ | ||
| + | |||
| + | |||
| + | smtpd_reject_unlisted_sender = yes\\ | ||
| + | |||
| + | disable_vrfy_command = yes\\ | ||
| + | |||
| + | smtpd_sasl_auth_enable = yes\\ | ||
| + | |||
| + | broken_sasl_auth_clients = yes\\ | ||
| + | |||
| + | smtpd_sasl_security_options = noanonymous\\ | ||
| + | |||
| + | smtpd_sender_login_maps = mysql: | ||
| + | |||
| + | virtual_alias_maps = mysql: | ||
| + | |||
| + | virtual_mailbox_domains = mysql: | ||
| + | |||
| + | virtual_mailbox_maps = mysql: | ||
| + | |||
| + | virtual_mailbox_base = / | ||
| + | |||
| + | virtual_mailbox_limit_maps = mysql: | ||
| + | |||
| + | virtual_maildir_extended = yes\\ | ||
| + | |||
| + | virtual_mailbox_limit_override = yes\\ | ||
| + | |||
| + | virtual_create_maildirsize = yes\\ | ||
| + | |||
| + | virtual_overquita_bounce = yes\\ | ||
| + | |||
| + | virtual_maildir_limit_message = " | ||
| + | |||
| + | message_size_limit = 10485760\\ | ||
| + | |||
| + | virtual_gid_maps = static: | ||
| + | |||
| + | virtual_uid_maps = static: | ||
| + | |||
| + | '' | ||
| + | |||
| + | ee / | ||
| + | |||
| + | '' | ||
| + | log_level: 3 \\ | ||
| + | mech_list: PLAIN LOGIN CRAM-MD5 \\ | ||
| + | auxprop_plugin: | ||
| + | sql_usessl: yes\\ | ||
| + | sql_engine: mysql\\ | ||
| + | sql_hostnames: | ||
| + | sql_user: postfix\\ | ||
| + | sql_passwd: postfix\\ | ||
| + | sql_database: | ||
| + | sql_select: select password from mailbox where username = ' | ||
| + | '' | ||
| + | |||
| + | cd / | ||
| + | |||
| + | mkdir mysqlLookupMaps | ||
| + | |||
| + | touch hello_access | ||
| + | |||
| + | touch client_access | ||
| + | |||
| + | touch sender_access | ||
| + | |||
| + | touch recipient_access | ||
| + | |||
| + | |||
| + | |||
| + | postmap hello_access | ||
| + | |||
| + | postmap sender_access | ||
| + | |||
| + | postmap recipient_access | ||
| + | |||
| + | postmap client_access | ||
| + | |||
| + | |||
| + | cd mysqlLookupMaps/ | ||
| + | |||
| + | |||
| + | touch alias.conf | ||
| + | touch domain.conf | ||
| + | touch mailbox.conf | ||
| + | touch quota.conf | ||
| + | touch sender.conf | ||
| + | |||
| + | |||
| + | ee alias.conf | ||
| + | |||
| + | '' | ||
| + | |||
| + | user = postfix\\ | ||
| + | password = postfix\\ | ||
| + | hosts = localhost\\ | ||
| + | |||
| + | dbname = postfix\\ | ||
| + | |||
| + | table = alias\\ | ||
| + | |||
| + | select_field = goto\\ | ||
| + | |||
| + | where_field = address\\ | ||
| + | |||
| + | '' | ||
| + | |||
| + | |||
| + | ee domain.conf | ||
| + | |||
| + | |||
| + | '' | ||
| + | user = postfix \\ | ||
| + | password = postfix\\ | ||
| + | hosts = localhost\\ | ||
| + | |||
| + | dbname = postfix\\ | ||
| + | |||
| + | table = domain\\ | ||
| + | |||
| + | select_field = domain \\ | ||
| + | |||
| + | where_field = domain \\ | ||
| + | |||
| + | additional_conditions = and active = ' | ||
| + | '' | ||
| + | |||
| + | ee mailbox.conf | ||
| + | |||
| + | '' | ||
| + | user = postfix | ||
| + | password = postfix | ||
| + | hosts = localhost | ||
| + | |||
| + | dbname = postfix | ||
| + | |||
| + | table = mailbox | ||
| + | |||
| + | select_field = mailbox | ||
| + | |||
| + | where_field = username | ||
| + | |||
| + | additional_conditions = and active = ' | ||
| + | '' | ||
| + | |||
| + | ee quota.conf | ||
| + | |||
| + | '' | ||
| + | user = postfix \\ | ||
| + | password = postfix\\ | ||
| + | hosts = localhost\\ | ||
| + | |||
| + | dbname = postfix\\ | ||
| + | |||
| + | table = mailbox\\ | ||
| + | |||
| + | select_field = quota\\ | ||
| + | |||
| + | where_field = username\\ | ||
| + | |||
| + | additional_conditions = and active = ' | ||
| + | '' | ||
| + | |||
| + | ee sender.conf | ||
| + | |||
| + | '' | ||
| + | user = postfix \\ | ||
| + | password = postfix\\ | ||
| + | hosts = localhost\\ | ||
| + | |||
| + | dbname = postfix \\ | ||
| + | |||
| + | table = mailbox\\ | ||
| + | |||
| + | select_field = username \\ | ||
| + | |||
| + | where_field = username\\ | ||
| + | |||
| + | additional_conditions = and active = ' | ||
| + | '' | ||
| + | |||
| + | Создадим пользователя virtual | ||
| + | |||
| + | pw group add virtual - g 5555 | ||
| + | pw user add virtual -g virtual -s / | ||
| + | mkdir / | ||
| + | chown virtual: | ||
| + | |||
| + | chown -R root: | ||
| + | |||
| + | chmod 440 / | ||
| + | |||
| + | chmod 550 / | ||
| + | |||
| + | Установим веб интерфейс управления - PostfixAdmin | ||
| + | |||
| + | cd / | ||
| + | |||
| + | make install clean | ||
| + | |||
| + | после этого в конфиг апача дописываем | ||
| + | |||
| + | ''< | ||
| + | AllowOverride Limit \\ | ||
| + | Options None | ||
| + | Order allow, | ||
| + | Allow from all \\ | ||
| + | </ | ||
| + | '' | ||
| + | |||
| + | |||
| + | |||