1
<!-- retain these comments for translator revision tracking -->
2
<!-- $Id: mail-setup.xml 43774 2007-01-02 23:11:40Z fjp $ -->
4
<sect1 id="mail-setup">
5
<title>Setting Up Your System To Use E-Mail</title>
8
Today, email is an important part of many people's life. As there are
9
many options as to how to set it up, and as having it set up correctly is
10
important for some Ubuntu utilities, we will try to cover the basics in
15
There are three main functions that make up an e-mail system. First there is
16
the <firstterm>Mail User Agent</firstterm> (MUA) which is the program a user
17
actually uses to compose and read mails. Then there is the <firstterm>Mail
18
Transfer Agent</firstterm> (MTA) that takes care of transferring messages
19
from one computer to another. And last there is the <firstterm>Mail
20
Delivery Agent</firstterm> (MDA) that takes care of delivering incoming mail
25
These three functions can be performed by separate programs, but they can
26
also be combined in one or two programs. It is also possible to have
27
different programs handle these functions for different types of mail.
31
On Linux and Unix systems <command>mutt</command> is historically a very
32
popular MUA. Like most traditional Linux programs it is text based. It is
33
often used in combination with <command>exim</command> or
34
<command>sendmail</command> as MTA and <command>procmail</command> as MDA.
38
With the increasing popularity of graphical desktop systems, the use of
39
graphical e-mail programs like GNOME's <command>evolution</command>,
40
KDE's <command>kmail</command> or Mozilla's <command>thunderbird</command>
41
is becoming more popular. These programs combine the function
42
of a MUA, MTA and MDA, but can — and often are — also be used
43
in combination with the traditional Linux tools.
47
<sect2 id="mail-default">
48
<title>Default E-Mail Configuration</title>
51
Even if you are planning to use a graphical mail program, it is important
52
that a traditional MTA/MDA is also installed and correctly set up on your
53
Linux system. Reason is that various utilities running on the
57
Examples are: <command>cron</command>, <command>quota</command>,
58
<command>logcheck</command>, <command>aide</command>, …
61
</footnote> can send important notices by e-mail to inform the system
62
administrator of (potential) problems or changes.
66
For this reason the packages <classname>exim4</classname> and
67
<classname>mutt</classname> will be installed by default (provided you
68
did not unselect the <quote>standard</quote> task during the installation).
69
<classname>exim4</classname> is a combination MTA/MDA that is relatively
70
small but very flexible. By default it will be configured to only handle
71
e-mail local to the system itself and e-mails addressed to the system
72
administrator (root account) will be delivered to the regular user account
73
created during the installation<footnote>
76
The forwarding of mail for root to the regular user account is configured
77
in <filename>/etc/aliases</filename>. If no regular user account was created,
78
the mail will of course be delivered to the root account itself.
85
When system e-mails are delivered they are added to a file in
86
<filename>/var/mail/<replaceable>account_name</replaceable></filename>.
87
The e-mails can be read using <command>mutt</command>.
92
<sect2 id="mail-outgoing">
93
<title>Sending E-Mails Outside The System</title>
96
As mentioned earlier, the installed Ubuntu system is only set up to handle
97
e-mail local to the system, not for sending mail to others nor for
98
receiving mail from others.
102
If you would like <classname>exim4</classname> to handle external e-mail,
103
please refer to the next subsection for the basic available configuration
104
options. Make sure to test that mail can be sent and received correctly.
108
If you intend to use a graphical mail program and use a mail server of
109
your Internet Service Provider (ISP) or your company, there is not really
110
any need to configure <classname>exim4</classname> for handling external
111
e-mail. Just configure your favorite graphical mail program to use the
112
correct servers to send and receive e-mail (how is outside the scope of
117
However, in that case you may need to configure individual utilities to
118
correctly send e-mails. One such utility is <command>reportbug</command>,
119
a program that facilitates submitting bug reports against Ubuntu packages.
120
By default it expects to be able to use <classname>exim4</classname> to
125
To correctly set up <command>reportbug</command> to use an external mail
126
server, please run the command <command>reportbug --configure</command>
127
and answer <quote>no</quote> to the question if an MTA is available. You
128
will then be asked for the SMTP server to be used for submitting bug reports.
133
<sect2 id="config-mta">
134
<title>Configuring the Exim4 Mail Transport Agent</title>
137
If you would like your system to also handle external e-mail, you will
138
need to reconfigure the <classname>exim4</classname> package<footnote>
141
You can of course also remove <classname>exim4</classname> and replace
142
it with an alternative MTA/MDA.
147
<informalexample><screen>
148
# dpkg-reconfigure exim4-config
149
</screen></informalexample>
153
After entering that command (as root), you will be asked if you want split
154
the configuration into small files. If you are unsure, select the default
159
Next you will be presented with several common mail scenarios. Choose the
160
one that most closely resembles your needs.
166
<term>internet site</term>
169
Your system is connected to a network and your mail is sent and
170
received directly using SMTP. On the following screens you will be
171
asked a few basic questions, like your machine's mail name, or a list of
172
domains for which you accept or relay mail.
178
<term>mail sent by smarthost</term>
181
In this scenario your outgoing mail is forwarded to another machine,
182
called a <quote>smarthost</quote>, which takes care of sending the message
183
on to its destination.
184
The smarthost also usually stores incoming mail addressed to your
185
computer, so you don't need to be permanently online. That also means
186
you have to download your mail from the smarthost via programs like
191
In a lot of cases the smarthost will be your ISP's mail server, which
192
makes this option very suitable for dial-up users. It can also be a
193
company mail server, or even another system on your own network.
199
<term>mail sent by smarthost; no local mail</term>
202
This option is basically the same as the previous one except that the
203
system will not be set up to handle mail for a local e-mail domain. Mail
204
on the system itself (e.g. for the system administrator) will still be
211
<term>local delivery only</term>
214
This is the option your system is configured for by default.
220
<term>no configuration at this time</term>
223
Choose this if you are absolutely convinced you know what you are
224
doing. This will leave you with an unconfigured mail system —
225
until you configure it, you won't be able to send or receive any mail
226
and you may miss some important messages from your system utilities.
234
If none of these scenarios suits your needs, or if you need a finer
235
grained setup, you will need to edit configuration files under the
236
<filename>/etc/exim4</filename> directory after the installation is
237
complete. More information about <classname>exim4</classname> may be
238
found under <filename>/usr/share/doc/exim4</filename>; the file
239
<filename>README.Debian.gz</filename> has further details about
240
configuring <classname>exim4</classname> and explains where to find
241
additional documentation.
245
Note that sending mail directly to the Internet when you don't have an
246
official domain name, can result in your mail being rejected because of
247
anti-spam measures on receiving servers. Using your ISP's mail server is
248
preferred. If you still do want to send out mail directly, you may want to
249
use a different e-mail address than is generated by default. If you use
250
<classname>exim4</classname> as your MTA, this is possible by adding an
251
entry in <filename>/etc/email-addresses</filename>.