Mailman Сравнение версий

Различия

Здесь показаны различия между двумя версиями данной страницы.

Ссылка на это сравнение

Предыдущая версия справа и слева Предыдущая версия
Следующая версия
Предыдущая версия
wiki:руководство_по_ubuntu_server:почтовые_сервисы:mailman [2012/08/31 11:16]
[Mailman]
wiki:руководство_по_ubuntu_server:почтовые_сервисы:mailman [2013/02/21 12:46] (текущий)
[Настройка]
Строка 12: Строка 12:
 ====Установка==== ====Установка====
  
-Mailman ​provides a web interface for the administrators and usersusing an external mail server to send and receive emailsIt works perfectly with the following mail servers:+Mailman ​обеспечивает ​web интерфейс для администраторов и пользователейиспользующих внешний почтовый сервер для отправки и приема почтыОн великолепно работает со следующими почтовыми серверами:
  
-    ​Postfix+  -- Postfix 
 +  -- Exim 
 +  -- Sendmail 
 +  -- Qmail
  
-    ​Exim+Мы рассмотрим как установить и настроить Mailman с web сервером Apache, а также с почтовым сервером Postfix или ​Exim. Если вы собираетесь устанавливать Mailman с другим почтовым сервером,​ обратитесь пожалуйста к разделу [[#​ссылки|Ссылок]].
  
-    Sendmail+Вам потребуется установить только один почтовый сервер и Postfix для Ubuntu является вариантом по умолчанию.
  
-    Qmail+===Apache2===
  
-We will see how to install and configure Mailman with, the Apache web server, and either the Postfix or Exim mail server. If you wish to install Mailman with a different mail server, please refer to the references section.+Чтобы установить **apache2** обратитесь к соответствующему разделу [[wiki:​руководство_по_ubuntu_server:​web_сервера:​httpd_apache2_web_server#​установка|Установки]].
  
-You only need to install one mail server and Postfix ​is the default Ubuntu Mail Transfer Agent. +===Postfix===
-Apache2+
  
-To install apache2 you refer to Installation for details. +Для инструкций по установке и настройке **Postfix** смотрите раздел [[wiki:​руководство_по_ubuntu_server:​почтовые_сервисы:​postfix|Postfix]].
-Postfix+
  
-For instructions on installing and configuring Postfix refer to Postfix +===Exim4===
-Exim4+
  
-To install ​Exim4 refer to Exim4.+Для установки **Exim4** обратитесь к разделу по [[wiki:​руководство_по_ubuntu_server:​почтовые_сервисы:​exim4|Exim4]].
  
-Once exim4 is installedthe configuration files are stored in the /​etc/​exim4 ​directoryIn Ubuntu, by default, the exim4 configuration files are split across different filesYou can change this behavior by changing the following variable in the /​etc/​exim4/​update-exim4.conf ​file:+Когда ​exim4 устанавливаетсяего файлы настроек сохраняются в каталоге ​/​etc/​exim4. ​В Ubuntu ​по умолчанию файлы настройки ​exim4 разделены на несколько файловВы можете это поменять,​ изменив следующую переменную в файле ​/​etc/​exim4/​update-exim4.conf
 +<​code>​dc_use_split_config='​true'</​code>​
  
-dc_use_split_config='​true'​+===Mailman===
  
-Mailman +Чтобы установить **Mailman**выполните следующую команду в терминале
- +<​code>​sudo apt-get install mailman</​code>​ 
-To install Mailmanrun following command at a terminal prompt+Она скопирует установочные файлы в каталог ​/​var/​lib/​mailman. ​Она также установит ​CGI сценарии в каталог ​/​usr/​lib/​cgi-bin/​mailman, создаст пользователя линукс ​list и его группуПроцесс ​mailman ​будет управляться этим пользователем.
- +
-sudo apt-get install mailman  +
- +
-It copies the installation files in /​var/​lib/​mailman ​directoryIt installs the CGI scripts in /​usr/​lib/​cgi-bin/​mailman ​directory. It creates list linux user. It creates the list linux groupThe mailman ​process will be owned by this user.+
  
 ====Настройка==== ====Настройка====
  
-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+
  
-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:​ +===Apache2===
- +
-sudo cp /​etc/​mailman/​apache.conf /​etc/​apache2/​sites-available/​mailman.conf +
- +
-This will setup a new Apache VirtualHost for the Mailman administration site. Now enable the new configuration and restart Apache:+
  
 +Примерный файл настройки 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>​
 +Это установит новый VirtualHost в Apache для административного сайта Mailman. Теперь разрешим новую конфигурацию и перезагрузим Apache:
 +<​code>​
 sudo a2ensite mailman.conf sudo a2ensite mailman.conf
 sudo service apache2 restart sudo service apache2 restart
 +</​code>​
  
-Mailman ​uses apache2 ​to render its CGI scriptsThe mailman ​CGI scripts are installed in the /​usr/​lib/​cgi-bin/​mailman ​directorySo, 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+
  
-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===
  
-You can use the postconf command to add the necessary configuration to /​etc/​postfix/​main.cf:+Для интеграции с Postfix мы ассоциируем домен lists.example.com со списком рассылки. Пожалуйста,​ замените **lists.example.com** на домен по вашему выбору.
  
 +Вы можете использовать команду **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>​ 
 +Теперь дадим Postfix построить транспортную карту, введя следующее в терминале:​ 
 +<​code>​sudo postmap -v /​etc/​postfix/​transport</​code>​ 
 +Затем перезапустите Postfix чтобы разрешить новые настройки:​ 
 +<​code>​sudo /​etc/​init.d/​postfix restart</​code>​
  
-Associate the domain lists.example.com to the Mailman transport with the transport map. Edit the file /​etc/​postfix/​transport:​+===Exim4===
  
-lists.example.com ​     mailman:+Когда Exim4 установлен,​ вы можете запустить Exim сервер,​ используя следующую команду из терминала:​ 
 +<​code>​sudo /etc/init.d/exim4 start</​code>​
  
-Now have Postfix build the transport map by entering the following from a terminal prompt:+Чтобы mailman мог работать с Exim4, вам потребуется настроить Exim4. Как было замечено ранее, по умолчанию Exim4 использует множество файлов настроек различного типа. Для подробностей смотрите сайт [[http://​www.exim.org/​|Exim]]. Чтобы запустить mailman, нам придется добавить новый файл настройки к следующим типам настроек:​ 
 +  -- Main 
 +  -- Transport 
 +  -- Router
  
-sudo postmap -v /​etc/​postfix/​transport+Exim создает главный файл настройки,​ сортируя все эти мини конфигурационные файлы. Поэтому последовательность этих конфигурационных файлов очень важна.
  
-Then restart Postfix to enable the new configurations:​ +===Main===
- +
-sudo /​etc/​init.d/​postfix restart +
- +
-Exim4 +
- +
-Once Exim4 is installed, you can start the Exim server using the following command from a terminal prompt: +
- +
-sudo /​etc/​init.d/​exim4 start +
- +
-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: +
- +
-    ​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 +
- +
-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
Строка 140: Строка 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
Строка 156: Строка 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
Строка 169: Строка 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 orderBut, the order of router ​configuration files must be the sameThis particular file must appear before the 200_exim4-config_primary ​fileThese two configuration files contain same type of informationThe first file takes the precedenceFor more details, please refer to the references section. +<note important>​Очередность основных и транспортных файлов не важна и они могут считываться в любом порядкеОднако последовательность перенаправляющих конфигурационных файлов (router) должна быть именно такойПриведенный файл должен считываться до файла **//200_exim4-config_primary//**Эти два конфигурационных файла содержат один тип информацииПервый файл будет иметь приоритетДля подробностей обратитесь к секции [[#​ссылки|ссылок]]</​note>​
-Mailman+
  
-Once mailman is installed, you can run it using the following command: +===Mailman===
- +
-sudo /​etc/​init.d/​mailman start +
- +
-Once mailman is installed, you should create the default mailing list. Run the following command to create the mailing list: +
- +
-sudo /​usr/​sbin/​newlist mailman+
  
 +После того как установлен mailman, вы можете использовать следующую команду:​
 +<​code>​sudo /​etc/​init.d/​mailman start</​code>​
 +Поскольку mailman установлен,​ вы можете создать список рассылки по умолчанию. Выполните следующую команду,​ чтобы создать список рассылки:​
 +<​code>​sudo /​usr/​sbin/​newlist mailman</​code>​
 +<​code>​
   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 filesplease 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 listyou can add MTA=None ​line in Mailman ​configuration file, /​etc/​mailman/​mm_cfg.py.+
  
 ====Управление==== ====Управление====
  
-We assume you have a default installationThe mailman ​cgi scripts are still in the /​usr/​lib/​cgi-bin/​mailman/ ​directory. Mailman ​provides a web based administration facilityTo access this pagepoint 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 screenIf you click the mailing list nameit will ask for your authentication passwordIf you enter the correct passwordyou will be able to change administrative settings of this mailing listYou 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 usersTo 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 screenIf you click the mailing list nameit will display the subscription formYou can enter your email addressname (optional), and password to subscribeAn email invitation will be sent to youYou 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.+
  
 ---- ----