Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to configure mail server on Debian

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to configure mail server on Debian". In daily operation, I believe many people have doubts about how to configure mail server on Debian. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to configure mail server on Debian". Next, please follow the editor to study!

The catalogue of this chapter

1 introduction

2 installation

3 configuration

4 Quick Test

5 modify the address of From:

6 configure Fetchmail

7 modify the delivery restrictions of exim

8 comprehensive test

9 TODO

10 concluding remarks

11 references

1 introduction

I think even an ordinary unit will need to use e-mail. My company has reached the point where it is impossible to leave email-whenever there is a problem with my mail server, my phone will explode. On the M$ platform, the mail server market is basically occupied by two software: Exchange of M$ and Domino/Notes of Lotus. The cost of these software is really not small. On the Unix platform, we have a lot of options, and they are all free.

In Debian, we use Exim instead of Sendmail, Qmail and Postfix, which is the default mail server for Debian, and even the basic system comes with this software. I won't say anything about the reason. anyway, what Debian recommends can't be wrong.

1.1 what we will achieve

Users in the local area network can send and forward local mail.

◆ emails sent outside the local area network have the correct From:, so that external emails can be answered correctly.

E-mail accounts are shared by all local subnet users, but each user can only receive their own mail.

◆ exim acts as a mail sending and receiving agent (it is much easier to configure than sendmail).

◆ mail acts as a mail client on the Linux side.

◆ Microsoft Outlook Express acts as a Win2000 mail client (you can also use other similar tools, such as Foxmail).

◆ qpopper, as a POP3 server, is used to transfer mail from the Linux system to the Win2000 machine.

◆ fetchmail is used to receive mail from the Internet.

The tests I did on two machines (installing Linux and Win2000 respectively), of course, win9x/NT/XP is fine, and if both machines are Linux, of course. This scheme should be more than sufficient to cope with a small and medium-sized office.

1.2 networking and naming

In this article, I assume the following names (you should make write modifications to suit your actual situation):

The name of the ◆ owner and system administrator kanaka Leng.

The ◆ Linux machine is named Debian.

The ◆ Win2000 machine is named Notepad. Usually the user is ganghua Leng.

The registered user name of ◆ kanaka on the Debian machine is kanaka.

The registered user name of ◆ ganghua on the Debian machine is ganghua.

The registered user name of ◆ ganghua on the Notepad machine is also ganghua.

Her password is the same on her Debian machine under linux and on Win2000.

Our company's local area network connects to the Internet through broadband, of course, you can also dial up through ordinary dialing.

Both ◆ kanaka and ganghua use an email address: kanaka@yeah.net.

The password for receiving messages from ◆ kanaka to POP3 is kanakapswd.

The mail server for ◆ ISP to send mail is smtp.yeah.net.

The mail server for ◆ ISP to accept mail is pop3.yeah.net.

Machines Debian and Notepad both belong to the same domain, and the domain name is test.com.

This domain name is for internal testing, and we have not registered this domain name.

Therefore, for the external network, the domain name can not be directly recognized.

In addition, I assume that the internal network is working properly

And already have a non-permanent dial-up connection using daild, or a broadband network connection.

The DNS service is also not installed on the Debian machine. Only the addresses of the two DNS servers provided by ISP are added to / etc/resolv.conf. The same setting should be added to the TCP/IP setting on the Notepad machine.

1.3 email address

Specifying an email address in "To:" and "From:" is an essential part of an email.

There's more to it. For example:

To: ganghua Leng

Ganghua Leng' is a "real-name part" (real name part).

This is added through the e-mail writing program.

This part is the basis for sending the email to ganghua himself. Note: if you are in real-name

There is a period in the part, and the email address must be surrounded by a "symbol" (for example: "kanaka"

C.Leng "). You can use man mailaddr to refer to the relevant help pages.

2 installation

Since we have installed the Debian base system, and the Debian base system contains exim and mail software, we only need to install these two: fetchmail, fetchmailconf and qpopper.

#

Apt-get install fetchmail fetchmailconf qpopper

Among them, fetchmailconf is a tool for configuring fetchmail.

The system will have some questions for you. When asked if you are running system-wide as root

When fetchmail, answer Yes. The rest choose the default value.

3 configuration

3.1 configure hosts for Debian

The / etc/hosts file on the Debian machine contains the following:

127.0.0.1 localhost

192.168.1.1 Debian.test.com Debian

192.168.1.2 Notepad.test.com Notepad

3.2 configure exim

Under Debian, all this is done by the eximconfig program.

#

Eximconfig

The program will ask some questions, and you can refer to the following answers:

◆ your system is an Internet host (choose 1, although you are on the LAN. So you can send email to the Internet.

◆ "displayed mail domain name" is test.com.

Is there another name for the ◆ system? You can answer Debian:localhost.

◆ you do not want to forward any emails that are not in your local area. Keep none and press enter.

The local address you want to forward is 192.168.1.0 ◆ 16.

The smarthost address that ◆ handles forwarded messages is smtp.yeah.net.

The email from the ◆ system administrator is kanaka (not root).

3.3 configure Win2000

3.3.1 hosts

The contents of the c:\ winnt\ system32\ drivers\ etc\ hosts file on the Notepad machine are the same as the contents of the / etc/hosts file on the Debian machine.

127.0.0.1 localhost

192.168.1.1 Debian.test.com Debian

192.168.1.2 Notepad.test.com Notepad

3.3.2 Mail client

In Microsoft Outlook Express (or any other such mail client you use in Win2000).

You must input Debian as both the SMTP mail server and the POP3 server. In the POP3 account name and POP3 password input boxes

At this point, the study on "how to configure the mail server on Debian" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report