Sie sind auf Seite 1von 2

How do I install exim and configure it as a

SMTP mail server?

Release found:

Red Hat Enterprise Linux 4

Resolution:

Follow the steps below to install and configure exim as a SMTP mail server:

1. Install the exim mail server software:

#up2date exim
2. Switch the default Mail Transport Agent (MTA) to exim:

#system-switch-mail
3. Select exim.Close the exim configuration file and start the exim service:

# chkconfig exim on
# service exim start
4. Edit exim's main configuration file:

#vi /etc/exim/exim.conf
In Main Configuration Settings, uncomment primary_hostname and add the
hostname of system:

primary_hostname = server.example.com #
The first three uncommented configuration lines are as follows:

domainlist local_domains = @ : example.com


domainlist relay_to_domains =
hostlist relay_from_hosts = 127.0.0.1 : 192.168.0.1
1. The first line defines a domain list called local_domains, which identify domains
that are to be delivered on the local host.
2. The second line defines a domain list called relay_to_domains, but the list itself
is empty. It allows relaying to any domains in this list. By default, no relaying on
the basis of a mail domain is permitted.
3. The third line defines a host list called relay_from_hosts. This list is used to
permit relaying from any host or IP address that matches the list. The default
contains just the IP address of the IPv4 loopback interface. No other hosts are
permitted to submit messages for relaying.

Copyright (c) 2009 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set forth in
the Open Publication License, v1.0 or later (available at http://www.opencontent.org/openpub/).
1
How do I install exim and configure it as a SMTP mail server?

Now, uncomment the following line :

#qualify_domain = example.com
#qualify_recipient =
so that it looks like:

qualify_domain = example.com
#qualify_recipient =
The first entry specifies a domain that Exim uses when it constructs a complete email
address from a local login name. This is often needed when Exim receives a message from
a local process. If qualify_domain is not set, the value of primary_hostname is used. If both
of these options are set, different qualification domains for sender and recipient addresses
can be there. If qualify_domain is set only,then its value is used in both cases.

1. Test the connectivity of the default mailserver by doing a telnet on port 25.

# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 server.example.com ESMTP Exim 4.43 Tue, 10 Oct 2006 01:21:16
+0530
If the result is similar to the above output, it means the installation was successful.

To confirm that it is not an open relay, additional testing can be done on


http://www.abuse.net/relay.html

Copyright (c) 2009 by Red Hat, Inc. This material may be distributed only subject to the terms and conditions set forth in
the Open Publication License, v1.0 or later (available at http://www.opencontent.org/openpub/).
2

Das könnte Ihnen auch gefallen