Различия
Здесь показаны различия между двумя версиями данной страницы.
Предыдущая версия справа и слева Предыдущая версия Следующая версия | Предыдущая версия | ||
wiki:руководство_по_ubuntu_server:почтовые_сервисы:mailman [2012/08/31 11:53] [Настройка] |
wiki:руководство_по_ubuntu_server:почтовые_сервисы:mailman [2013/02/21 12:46] (текущий) [Настройка] |
||
---|---|---|---|
Строка 46: | Строка 46: | ||
====Настройка==== | ====Настройка==== | ||
- | This section assumes you have successfully installed mailman, apache2, and postfix or exim4. Now you just need to configure them. | + | В этом разделе предполагается, что у вас удачно установлены mailman, apache2, а также postfix или exim4. Теперь вам требуется только их настроить. |
===Apache2=== | ===Apache2=== | ||
- | An example Apache configuration file comes with Mailman and is placed in /etc/mailman/apache.conf. In order for Apache to use the config file it needs to be copied to /etc/apache2/sites-available: | + | Примерный файл настройки Apache идет вместе с Mailman и помещен в /etc/mailman/apache.conf. Чтобы Apache смог его использовать, требуется переместить его в /etc/apache2/sites-available: |
- | + | <code>sudo cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman.conf</code> | |
- | sudo cp /etc/mailman/apache.conf /etc/apache2/sites-available/mailman.conf | + | Это установит новый VirtualHost в Apache для административного сайта Mailman. Теперь разрешим новую конфигурацию и перезагрузим Apache: |
- | + | <code> | |
- | This will setup a new Apache VirtualHost for the Mailman administration site. Now enable the new configuration and restart Apache: | + | |
sudo a2ensite mailman.conf | sudo a2ensite mailman.conf | ||
sudo service apache2 restart | sudo service apache2 restart | ||
+ | </code> | ||
- | Mailman uses apache2 to render its CGI scripts. The mailman CGI scripts are installed in the /usr/lib/cgi-bin/mailman directory. So, the mailman url will be http://hostname/cgi-bin/mailman/. You can make changes to the /etc/apache2/sites-available/mailman.conf file if you wish to change this behavior. | + | Mailman использует apache2 для обработки CGI сценариев. CGI сценарии Mailman устанавливаются в каталог /usr/lib/cgi-bin/mailman. Поэтому адрес mailman будет **%%http://%%//hostname//%%/cgi-bin/mailman/%%**. Вы можете внести изменения в файл /etc/apache2/sites-available/mailman.conf, если вы решили изменить такой адрес. |
===Postfix=== | ===Postfix=== | ||
- | For Postfix integration, we will associate the domain lists.example.com with the mailing lists. Please replace lists.example.com with the domain of your choosing. | + | Для интеграции с Postfix мы ассоциируем домен lists.example.com со списком рассылки. Пожалуйста, замените **lists.example.com** на домен по вашему выбору. |
- | + | ||
- | You can use the postconf command to add the necessary configuration to /etc/postfix/main.cf: | + | |
+ | Вы можете использовать команду **postconf** для добавления необходимых настроек в /etc/postfix/main.cf: | ||
+ | <code> | ||
sudo postconf -e 'relay_domains = lists.example.com' | sudo postconf -e 'relay_domains = lists.example.com' | ||
sudo postconf -e 'transport_maps = hash:/etc/postfix/transport' | sudo postconf -e 'transport_maps = hash:/etc/postfix/transport' | ||
sudo postconf -e 'mailman_destination_recipient_limit = 1' | sudo postconf -e 'mailman_destination_recipient_limit = 1' | ||
- | + | </code> | |
- | In /etc/postfix/master.cf double check that you have the following transport: | + | В /etc/postfix/master.cf дважды проверьте, что у вас указан следующий транспорт: |
+ | <code> | ||
mailman unix - n n - - pipe | mailman unix - n n - - pipe | ||
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py | flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py | ||
${nexthop} ${user} | ${nexthop} ${user} | ||
+ | </code> | ||
+ | Он вызывает сценарий postfix-to-mailman.py когда почта доставлена по списку. | ||
- | It calls the postfix-to-mailman.py script when a mail is delivered to a list. | + | Ассоциируем домен lists.example.com с транспортом Mailman с помощью транспортной карты. Отредактируйте файл /etc/postfix/transport: |
- | + | <code>lists.example.com mailman:</code> | |
- | Associate the domain lists.example.com to the Mailman transport with the transport map. Edit the file /etc/postfix/transport: | + | Теперь дадим Postfix построить транспортную карту, введя следующее в терминале: |
- | + | <code>sudo postmap -v /etc/postfix/transport</code> | |
- | lists.example.com mailman: | + | Затем перезапустите Postfix чтобы разрешить новые настройки: |
- | + | <code>sudo /etc/init.d/postfix restart</code> | |
- | Now have Postfix build the transport map by entering the following from a terminal prompt: | + | |
- | + | ||
- | sudo postmap -v /etc/postfix/transport | + | |
- | + | ||
- | Then restart Postfix to enable the new configurations: | + | |
- | + | ||
- | sudo /etc/init.d/postfix restart | + | |
===Exim4=== | ===Exim4=== | ||
- | Once Exim4 is installed, you can start the Exim server using the following command from a terminal prompt: | + | Когда Exim4 установлен, вы можете запустить Exim сервер, используя следующую команду из терминала: |
+ | <code>sudo /etc/init.d/exim4 start</code> | ||
- | sudo /etc/init.d/exim4 start | + | Чтобы mailman мог работать с Exim4, вам потребуется настроить Exim4. Как было замечено ранее, по умолчанию Exim4 использует множество файлов настроек различного типа. Для подробностей смотрите сайт [[http://www.exim.org/|Exim]]. Чтобы запустить mailman, нам придется добавить новый файл настройки к следующим типам настроек: |
+ | -- Main | ||
+ | -- Transport | ||
+ | -- Router | ||
- | In order to make mailman work with Exim4, you need to configure Exim4. As mentioned earlier, by default, Exim4 uses multiple configuration files of different types. For details, please refer to the Exim web site. To run mailman, we should add new a configuration file to the following configuration types: | + | Exim создает главный файл настройки, сортируя все эти мини конфигурационные файлы. Поэтому последовательность этих конфигурационных файлов очень важна. |
- | + | ||
- | Main | + | |
- | + | ||
- | Transport | + | |
- | + | ||
- | Router | + | |
- | + | ||
- | Exim creates a master configuration file by sorting all these mini configuration files. So, the order of these configuration files is very important. | + | |
===Main=== | ===Main=== | ||
- | All the configuration files belonging to the main type are stored in the /etc/exim4/conf.d/main/ directory. You can add the following content to a new file, named 04_exim4-config_mailman: | + | Все файлы конфигурации, относящиеся к основному (main) типу сохраняются в каталоге /etc/exim4/conf.d/main/. Вы можете добавить следующее содержимое в новый файл с именем **04_exim4-config_mailman**: |
+ | <code> | ||
# start | # start | ||
# Home dir for your Mailman installation -- aka Mailman's prefix | # Home dir for your Mailman installation -- aka Mailman's prefix | ||
Строка 139: | Строка 129: | ||
MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck | MM_LISTCHK=MM_HOME/lists/${lc::$local_part}/config.pck | ||
# end | # end | ||
+ | </code> | ||
===Transport=== | ===Transport=== | ||
- | All the configuration files belonging to transport type are stored in the /etc/exim4/conf.d/transport/ directory. You can add the following content to a new file named 40_exim4-config_mailman: | + | Все файлы настроек, относящиеся к транспортному (transport) типу находятся в каталоге /etc/exim4/conf.d/transport/. Вы можете добавить следующее содержимое в новый файл с именем **40_exim4-config_mailman**: |
+ | <code> | ||
mailman_transport: | mailman_transport: | ||
driver = pipe | driver = pipe | ||
Строка 155: | Строка 146: | ||
user = MM_UID | user = MM_UID | ||
group = MM_GID | group = MM_GID | ||
+ | </code> | ||
===Router=== | ===Router=== | ||
- | All the configuration files belonging to router type are stored in the /etc/exim4/conf.d/router/ directory. You can add the following content in to a new file named 101_exim4-config_mailman: | + | Аналогично, все конфигурационные файлы перенаправления (router type) находятся в каталоге /etc/exim4/conf.d/router/. Вы можете добавить следующее содержимое к новому файлу с именем **101_exim4-config_mailman**: |
+ | <code> | ||
mailman_router: | mailman_router: | ||
driver = accept | driver = accept | ||
Строка 168: | Строка 160: | ||
-owner : -request : -admin | -owner : -request : -admin | ||
transport = mailman_transport | transport = mailman_transport | ||
+ | </code> | ||
- | The order of main and transport configuration files can be in any order. But, the order of router configuration files must be the same. This particular file must appear before the 200_exim4-config_primary file. These two configuration files contain same type of information. The first file takes the precedence. For more details, please refer to the references section. | + | <note important>Очередность основных и транспортных файлов не важна и они могут считываться в любом порядке. Однако последовательность перенаправляющих конфигурационных файлов (router) должна быть именно такой. Приведенный файл должен считываться до файла **//200_exim4-config_primary//**. Эти два конфигурационных файла содержат один тип информации. Первый файл будет иметь приоритет. Для подробностей обратитесь к секции [[#ссылки|ссылок]]</note> |
===Mailman=== | ===Mailman=== | ||
- | Once mailman is installed, you can run it using the following command: | + | После того как установлен mailman, вы можете использовать следующую команду: |
- | + | <code>sudo /etc/init.d/mailman start</code> | |
- | sudo /etc/init.d/mailman start | + | Поскольку mailman установлен, вы можете создать список рассылки по умолчанию. Выполните следующую команду, чтобы создать список рассылки: |
- | + | <code>sudo /usr/sbin/newlist mailman</code> | |
- | Once mailman is installed, you should create the default mailing list. Run the following command to create the mailing list: | + | <code> |
- | + | ||
- | sudo /usr/sbin/newlist mailman | + | |
Enter the email address of the person running the list: bhuvan at ubuntu.com | Enter the email address of the person running the list: bhuvan at ubuntu.com | ||
Initial mailman password: | Initial mailman password: | ||
Строка 202: | Строка 192: | ||
# | # | ||
+ | </code> | ||
- | We have configured either Postfix or Exim4 to recognize all emails from mailman. So, it is not mandatory to make any new entries in /etc/aliases. If you have made any changes to the configuration files, please ensure that you restart those services before continuing to next section. | + | Мы настроили как **Postfix** так и **Exim4** на распознавание всех почтовых сообщений от **mailman**. Поэтому нет необходимости создавать новые записи в /etc/aliases. Если вы делаете какие-либо изменения в конфигурационных файлах, не забывайте выполнять перезапуск соответствующих сервисов до перехода к следующей части. |
- | + | <note>Exim4 не использует псевдонимов (aliases) для перенаправления почты для Mailman, поскольку он использует метод перебора (discover approach). Чтобы подавить использование псевдонимов при создании списка, вам потребуется добавить строку **MTA=None** в конфигурационный файл Mailman /etc/mailman/mm_cfg.py.</note> | |
- | The Exim4 does not use the above aliases to forward mails to Mailman, as it uses a discover approach. To suppress the aliases while creating the list, you can add MTA=None line in Mailman configuration file, /etc/mailman/mm_cfg.py. | + | |
====Управление==== | ====Управление==== | ||
- | We assume you have a default installation. The mailman cgi scripts are still in the /usr/lib/cgi-bin/mailman/ directory. Mailman provides a web based administration facility. To access this page, point your browser to the following url: | + | Мы предполагаем, что у вас установка по умолчанию. Cgi сценарии mailman все еще в каталоге /usr/lib/cgi-bin/mailman/. Mailman предоставляет возможности администрирования на основе web. Чтобы получить доступ к этой странице, укажите следующий адрес: |
- | + | <code>http://hostname/cgi-bin/mailman/admin</code> | |
- | http://hostname/cgi-bin/mailman/admin | + | Список рассылки по умолчанию **//mailman//** будет показан на экране. Если вы щелкните по названию списка, у вас будет запрошен пароль. Если вы введете правильный пароль, вы сможете изменить административные настройки этого списка. Вы можете создать новый список рассылки, используя утилиту командной строки (/usr/sbin/newlist). В качестве альтернативы вы можете его создать используя и web интерфейс. |
- | + | ||
- | The default mailing list, mailman, will appear in this screen. If you click the mailing list name, it will ask for your authentication password. If you enter the correct password, you will be able to change administrative settings of this mailing list. You can create a new mailing list using the command line utility (/usr/sbin/newlist). Alternatively, you can create a new mailing list using the web interface. | + | |
====Пользователи==== | ====Пользователи==== | ||
- | Mailman provides a web based interface for users. To access this page, point your browser to the following url: | + | Mailman предоставляет web интерфейс и для пользователей. Для доступа к этой страницеукажите вашему интернет-обозревателю следующий адрес: |
- | + | <code>http://hostname/cgi-bin/mailman/listinfo</code> | |
- | http://hostname/cgi-bin/mailman/listinfo | + | На экране появится **mailman** - список рассылки по умолчанию. Если вы щелкните мышью на названии списка, откроется форма подписки. Вы можете ввести свой почтовый адрес, имя (необязательно) и пароль для подписки. Вам будет отправлено почтовое сообщение с уведомлением. Вы должны следовать инструкции в сообщении для подтверждения подписки. |
- | + | ||
- | The default mailing list, mailman, will appear in this screen. If you click the mailing list name, it will display the subscription form. You can enter your email address, name (optional), and password to subscribe. An email invitation will be sent to you. You can follow the instructions in the email to subscribe. | + | |
====Ссылки==== | ====Ссылки==== | ||
- | GNU Mailman - Installation Manual | + | -- [[http://www.list.org/mailman-install/index.html|Руководство по установке GNU Mailman]]. |
- | + | -- [[http://www.exim.org/howto/mailman21.html|ЧаВо - совместное использование Exim4 и Mailman 2.1]]. | |
- | HOWTO - Using Exim 4 and Mailman 2.1 together | + | -- Также смотрите страницу [[https://help.ubuntu.com/community/Mailman|Mailman Ubuntu Wiki]]. |
- | + | ||
- | Also, see the Mailman Ubuntu Wiki page. | + | |
---- | ---- |