Ubuntu Server Guide Changes, errors and bugs
Note You only need to install one mail server and Postfix is the default Ubuntu Mail Transfer Agent. Apache2
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
- Bu sahifa navigatsiya:
- Configuration This section assumes you have successfully installed mailman, apache2, and postfix or exim4. Now you just need to configure them. Apache2
Note
You only need to install one mail server and Postfix is the default Ubuntu Mail Transfer Agent. Apache2 To install apache2 you refer to ??? for details. Postfix For instructions on installing and configuring Postfix refer to Postfix Exim4 To install Exim4 refer to Exim4. Once exim4 is installed, the configuration files are stored in the /etc/exim4 directory. In Ubuntu, by default, the exim4 configuration files are split across different files. You can change this behavior by changing the following variable in the /etc/exim4/update−exim4.conf file: d c _ u s e _ s p l i t _ c o n f i g =’ t r u e ’ Mailman To install Mailman, run following command at a terminal prompt: sudo apt i n s t a l l mailman It copies the installation files in /var/lib/mailman directory. It installs the CGI scripts in /usr/lib/cgi- bin/mailman directory. It creates list linux user. It creates the list linux group. The mailman process will be owned by this user. Configuration This section assumes you have successfully installed mailman, apache2, and postfix or exim4. Now you just need to configure them. 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: sudo cp / e t c / mailman / apache . c o n f / e t c / apache2 / s i t e s −a v a i l a b l e / mailman . c o n f This will setup a new Apache VirtualHost for the Mailman administration site. Now enable the new config- uration and restart Apache: 241 sudo a 2 e n s i t e mailman . c o n f sudo s y s t e m c t l r e s t a r t apache2 . s e r v i c e 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. 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. You can use the postconf command to add the necessary configuration to /etc/postfix/main.cf: sudo p o s t c o n f −e ’ relay_domains = l i s t s . example . com ’ sudo p o s t c o n f −e ’ transport_maps = hash : / e t c / p o s t f i x / t r a n s p o r t ’ sudo p o s t c o n f −e ’ m a i l m a n _ d e s t i n a t i o n _ r e c i p i e n t _ l i m i t = 1 ’ In /etc/postfix/master.cf double check that you have the following transport: mailman unix − n n − − p i p e f l a g s=FR u s e r= l i s t argv=/u s r / l i b / mailman / b i n / p o s t f i x −to−mailman . py $ { nexthop } ${ u s e r } It calls the postfix-to-mailman.py script when a mail is delivered to a list. Associate the domain lists .example.com to the Mailman transport with the transport map. Edit the file /etc/postfix/transport: l i s t s . example . com mailman : Now have Postfix build the transport map by entering the following from a terminal prompt: sudo postmap −v / e t c / p o s t f i x / t r a n s p o r t Then restart Postfix to enable the new configurations: sudo s y s t e m c t l r e s t a r t p o s t f i x . s e r v i c e Exim4 Once Exim4 is installed, you can start the Exim server using the following command from a terminal prompt: sudo s y s t e m c t l s t a r t exim4 . s e r v i c e 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. 242 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: # s t a r t # Home d i r f o r your Mailman i n s t a l l a t i o n −− aka Mailman ’ s p r e f i x # d i r e c t o r y . # On Ubuntu t h i s s h o u l d be ”/ var / l i b / mailman ” # This i s n o r m a l l y t h e same a s ~mailman MM_HOME=/var / l i b / mailman # # User and group f o r Mailman , s h o u l d match your −−with−mail−g i d # s w i t c h t o Mailman ’ s c o n f i g u r e s c r i p t . Value i s n o r m a l l y ” mailman ” MM_UID= l i s t MM_GID= l i s t # # Domains t h a t your l i s t s a r e i n − c o l o n s e p a r a t e d l i s t # you may wish t o add t h e s e i n t o l o c a l _ d o m a i n s a s w e l l d o m a i n l i s t mm_domains=hostname . com # # −=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−=−= # # These v a l u e s a r e d e r i v e d from t h e o n e s above and s h o u l d not need # e d i t i n g u n l e s s you have munged your mailman i n s t a l l a t i o n # # The path o f t h e Mailman m a i l wrapper s c r i p t MM_WRAP=MM_HOME/ m a i l / mailman # # The path o f t h e l i s t c o n f i g f i l e ( used a s a r e q u i r e d f i l e when # v e r i f y i n g l i s t a d d r e s s e s ) MM_LISTCHK=MM_HOME/ l i s t s / $ { l c : : $ l o c a l _ p a r t }/ c o n f i g . pck # end Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling