个人工具

“UbuntuHelp:Exim4”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
(新页面: {{From|https://help.ubuntu.com/community/Exim4}} {{Languages|UbuntuHelp:Exim4}} == Introduction == Exim4 is a Message Transfer Agent (MTA) developed at the University of Cambridge for ...)
 
 
(未显示同一用户的6个中间版本)
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/Exim4}}
 
{{From|https://help.ubuntu.com/community/Exim4}}
 
{{Languages|UbuntuHelp:Exim4}}
 
{{Languages|UbuntuHelp:Exim4}}
 
 
 
== Introduction ==
 
== Introduction ==
 
 
Exim4 is a Message Transfer Agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the internet. Exim can be installed in  place of sendmail or Postfix, although the configuration of exim is quite different to that of sendmail.
 
Exim4 is a Message Transfer Agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the internet. Exim can be installed in  place of sendmail or Postfix, although the configuration of exim is quite different to that of sendmail.
 
 
== Installation ==
 
== Installation ==
 
+
Install the '''exim4''' package from the Main repository using your favorite package manager (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]).
Install the '''exim4''' package from the Main repository using your favorite package manager (see InstallingSoftware).
+
 
+
 
== Configuration ==
 
== Configuration ==
 
 
To configure exim4, run the following command:
 
To configure exim4, run the following command:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo dpkg-reconfigure exim4-config
 
sudo dpkg-reconfigure exim4-config
 
</nowiki></pre>
 
</nowiki></pre>
 
 
The user interface will be displayed. The user interface lets you configure many parameters. For example, In exim4 the configuration files are split among multiple files. If you wish to have them in one file you can configure accordingly in this user interface.
 
The user interface will be displayed. The user interface lets you configure many parameters. For example, In exim4 the configuration files are split among multiple files. If you wish to have them in one file you can configure accordingly in this user interface.
 
+
All the parameters you configure in the user interface are stored in <code><nowiki>/etc/exim4/update-exim4.conf.conf</nowiki></code> file. If you wish to re-configure the program, either re-run the            configuration wizard or manually edit this file using your favourite editor. Run the following command to generate the master  configuration file:
All the parameters you configure in the user interface are stored in <code><nowiki>/etc/exim4/update-exim4.conf</nowiki></code>.conf file. If you wish to re-configure, either you re-run the            configuration wizard or manually edit this file using your favourite editor. Once you configure, you can run the following command to generate the master  configuration file:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo update-exim4.conf
 
sudo update-exim4.conf
 
</nowiki></pre>
 
</nowiki></pre>
 
+
The master configuration file will be  generated and stored in <code><nowiki>/var/lib/exim4/config.autogenerated</nowiki></code>.
The master configuration file, is generated and it is stored in <code><nowiki>/var/lib/exim4/config.autogenerated</nowiki></code>.
+
<<BR>>
 
+
<br>
+
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png
 
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=warning.png
'''Note:''' at any time, you should not edit the master configuration file, <code><nowiki>/var/lib/exim4/config.autogenerated</nowiki></code> manually. It is updated automatically every time you run update-exim4.conf
+
'''Note:''' Never directly the master configuration file, <code><nowiki>/var/lib/exim4/config.autogenerated</nowiki></code>. It is updated automatically every time you run update-exim4.conf
 
+
<<BR>>
<br>
+
The following command will start the exim4 daemon:
You can run the following command to start exim4 daemon:
+
 
+
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/exim4 start
 
sudo /etc/init.d/exim4 start
 
</nowiki></pre>
 
</nowiki></pre>
 
 
TODO: This section should cover configuring SMTP AUTH with exim4.
 
TODO: This section should cover configuring SMTP AUTH with exim4.
 
 
=== SMTP Authentication ===
 
=== SMTP Authentication ===
 
+
In this section we'll configure Exim4 to use SMTP AUTH using TLS and SASL. The instructions below assume a split Exim4 configuration is used.
In this section we'll configure Exim4 to use SMTP AUTH using TLS and SASL.
+
 
+
 
The first step is to create a certificate for use with TLS.  Enter the following into a terminal prompt:
 
The first step is to create a certificate for use with TLS.  Enter the following into a terminal prompt:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /usr/share/doc/exim4-base/examples/exim-gencert
 
sudo /usr/share/doc/exim4-base/examples/exim-gencert
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now Exim4 needs to be configured for TLS by editing <code><nowiki>/etc/exim4/conf.d/main/03_exim4-config_tlsoptions</nowiki></code> add the following:
 
Now Exim4 needs to be configured for TLS by editing <code><nowiki>/etc/exim4/conf.d/main/03_exim4-config_tlsoptions</nowiki></code> add the following:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
MAIN_TLS_ENABLE = yes
 
MAIN_TLS_ENABLE = yes
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next you need to configure Exim4 to use the '''saslauthd''' for authentication.  Edit <code><nowiki>/etc/exim4/conf.d/auth/30_exim4-config_examples</nowiki></code> and uncomment the '''plain_saslauthd_server''' and '''login_saslauthd_server''' sections:
 
Next you need to configure Exim4 to use the '''saslauthd''' for authentication.  Edit <code><nowiki>/etc/exim4/conf.d/auth/30_exim4-config_examples</nowiki></code> and uncomment the '''plain_saslauthd_server''' and '''login_saslauthd_server''' sections:
 
 
<pre><nowiki>
 
<pre><nowiki>
plain_saslauthd_server:
+
plain_saslauthd_server:
driver = plaintext
+
  driver = plaintext
public_name = PLAIN
+
  public_name = PLAIN
server_condition = ${if saslauthd{{$auth2}{$auth3}}{1}{0}}
+
  server_condition = ${if saslauthd{{$auth2}{$auth3}}{1}{0}}
server_set_id = $auth2
+
  server_set_id = $auth2
server_prompts = :
+
  server_prompts = :
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
+
  .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
+
  server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
.endif
+
  .endif
 
#
 
#
login_saslauthd_server:
+
login_saslauthd_server:
driver = plaintext
+
  driver = plaintext
public_name = LOGIN
+
  public_name = LOGIN
server_prompts = "Username:: : Password::"
+
  server_prompts = "Username:: : Password::"
# don't send system passwords over unencrypted connections
+
  # don't send system passwords over unencrypted connections
server_condition = ${if saslauthd{{$auth1}{$auth2}}{1}{0}}
+
  server_condition = ${if saslauthd{{$auth1}{$auth2}}{1}{0}}
server_set_id = $auth1
+
  server_set_id = $auth1
.ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
+
  .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
+
  server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
.endif
+
  .endif
  
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Finally, update the Exim4 configuration and restart the service:  
 
Finally, update the Exim4 configuration and restart the service:  
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo update-exim4.conf
 
sudo update-exim4.conf
 
sudo /etc/init.d/exim4 restart
 
sudo /etc/init.d/exim4 restart
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
=== Configuring SASL ===
 
=== Configuring SASL ===
 
 
This section provides details on configuring the '''saslauthd''' to provide authentication for Exim4.
 
This section provides details on configuring the '''saslauthd''' to provide authentication for Exim4.
 
+
The first step is to install the '''sasl2-bin''' package from the Main repository (see [[UbuntuHelp:InstallingSoftware|InstallingSoftware]]).
The first step is to install the '''sasl2-bin''' package from the Main repository (see InstallingSoftware).
+
 
+
 
To configure saslauthd edit the <code><nowiki>/etc/default/saslauthd</nowiki></code> configuration file and set ''START=no'' to:
 
To configure saslauthd edit the <code><nowiki>/etc/default/saslauthd</nowiki></code> configuration file and set ''START=no'' to:
 
<pre><nowiki>
 
<pre><nowiki>
 
START=yes
 
START=yes
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Next the '''Debian-exim''' user needs to be part of the '''sasl''' group in order for Exim4 to use the saslauthd service:
 
Next the '''Debian-exim''' user needs to be part of the '''sasl''' group in order for Exim4 to use the saslauthd service:
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo adduser Debian-exim sasl
 
sudo adduser Debian-exim sasl
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Now start the '''saslauthd''' service:
 
Now start the '''saslauthd''' service:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/saslauthd start
 
sudo /etc/init.d/saslauthd start
 
</nowiki></pre>
 
</nowiki></pre>
 
 
 
Exim4 is now configured with SMTP AUTH using TLS and SASL authentication.
 
Exim4 is now configured with SMTP AUTH using TLS and SASL authentication.
 
+
<<BR>>
<br>
+
 
'''Note:''' this guide has been tested on Ubuntu 7.10 (Gutsy Gibbon)
 
'''Note:''' this guide has been tested on Ubuntu 7.10 (Gutsy Gibbon)
 
----
 
----
[[category:CategoryDocumentation]]  
+
[[category:CategoryEmail]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2010年5月19日 (三) 22:18的最新版本

Introduction

Exim4 is a Message Transfer Agent (MTA) developed at the University of Cambridge for use on Unix systems connected to the internet. Exim can be installed in place of sendmail or Postfix, although the configuration of exim is quite different to that of sendmail.

Installation

Install the exim4 package from the Main repository using your favorite package manager (see InstallingSoftware).

Configuration

To configure exim4, run the following command:

sudo dpkg-reconfigure exim4-config

The user interface will be displayed. The user interface lets you configure many parameters. For example, In exim4 the configuration files are split among multiple files. If you wish to have them in one file you can configure accordingly in this user interface. All the parameters you configure in the user interface are stored in /etc/exim4/update-exim4.conf.conf file. If you wish to re-configure the program, either re-run the configuration wizard or manually edit this file using your favourite editor. Run the following command to generate the master configuration file:

sudo update-exim4.conf

The master configuration file will be generated and stored in /var/lib/exim4/config.autogenerated. <
> IconsPage?action=AttachFile&do=get&target=warning.png Note: Never directly the master configuration file, /var/lib/exim4/config.autogenerated. It is updated automatically every time you run update-exim4.conf <
> The following command will start the exim4 daemon:

sudo /etc/init.d/exim4 start

TODO: This section should cover configuring SMTP AUTH with exim4.

SMTP Authentication

In this section we'll configure Exim4 to use SMTP AUTH using TLS and SASL. The instructions below assume a split Exim4 configuration is used. The first step is to create a certificate for use with TLS. Enter the following into a terminal prompt:

sudo /usr/share/doc/exim4-base/examples/exim-gencert

Now Exim4 needs to be configured for TLS by editing /etc/exim4/conf.d/main/03_exim4-config_tlsoptions add the following:

MAIN_TLS_ENABLE = yes

Next you need to configure Exim4 to use the saslauthd for authentication. Edit /etc/exim4/conf.d/auth/30_exim4-config_examples and uncomment the plain_saslauthd_server and login_saslauthd_server sections:

 plain_saslauthd_server:
   driver = plaintext
   public_name = PLAIN
   server_condition = ${if saslauthd{{$auth2}{$auth3}}{1}{0}}
   server_set_id = $auth2
   server_prompts = :
   .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
   server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
   .endif
#
 login_saslauthd_server:
   driver = plaintext
   public_name = LOGIN
   server_prompts = "Username:: : Password::"
   # don't send system passwords over unencrypted connections
   server_condition = ${if saslauthd{{$auth1}{$auth2}}{1}{0}}
   server_set_id = $auth1
   .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS
   server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
   .endif

Finally, update the Exim4 configuration and restart the service:

sudo update-exim4.conf
sudo /etc/init.d/exim4 restart

Configuring SASL

This section provides details on configuring the saslauthd to provide authentication for Exim4. The first step is to install the sasl2-bin package from the Main repository (see InstallingSoftware). To configure saslauthd edit the /etc/default/saslauthd configuration file and set START=no to:

START=yes

Next the Debian-exim user needs to be part of the sasl group in order for Exim4 to use the saslauthd service:

sudo adduser Debian-exim sasl

Now start the saslauthd service:

sudo /etc/init.d/saslauthd start

Exim4 is now configured with SMTP AUTH using TLS and SASL authentication. <
> Note: this guide has been tested on Ubuntu 7.10 (Gutsy Gibbon)