分享
 
 
 

安装Exim邮件服务器

王朝other·作者佚名  2008-05-19
窄屏简体版  字體: |||超大  

EXIM是Debian默认的MTA,轻盈小巧,而且功能完整

是小型网络和单机的最佳选择

前提条件:具有Internet连接,有正确的DNS的MX记录指向你的smtp服务器

Debian Linux 缺省安装的邮件传输服务软件为 exim 3.35 。下面为 exim 的设置过程:

一、基本配置

==============================================================================

You must choose one of the options below:

(1) Internet site; mail is sent and received directly using SMTP. If your

needs don't fit neatly into any category, you probably want to start

with this one and then edit the config file by hand.

(2) Internet site using smarthost: You receive Internet mail on this

machine, either directly by SMTP or by running a utility such as

fetchmail. Outgoing mail is sent using a smarthost. optionally with

addresses rewritten. This is probably what you want for a dialup

system.

(3) Satellite system: All mail is sent to another machine, called a "smart

host" for delivery. root and postmaster mail is delivered according

to /etc/aliases. No mail is received locally.

(4) Local delivery only: You are not on a network. Mail for local users

is delivered.

(5) No configuration: No configuration will be done now; your mail system

will be broken and should not be used. You must then do the

configuration yourself later or run this script, /usr/sbin/eximconfig,

as root. Look in /usr/share/doc/exim/example.conf.gz

Select a number from 1 to 5, from the list above.

Enter value (default=`1', `x' to restart):1

这里选择1,使这台机器作为一台互联网上的标准SMTP邮件传输服务器。

==============================================================================

What is the `visible' mail name of your system? This will appear on

From: lines of outgoing messages.

Enter value (default=`smtp.foo.com', `x' to restart):

这里我们确认邮件域的名称,缺省系统使用主机的名称;可以根据实际情况设置。

==============================================================================

Does this system have any other names which may appear on incoming

mail messages, apart from the visible name above (smtp.foo.com) and

localhost?

By default all domains will be treated the same; if you want different

domain names to be treated differently, you will need to edit the config

file afterwards: see the documentation for the "domains" director

option.

If there are any more, enter them here, separated with spaces or commas.

If there are none, say `none'.

Enter value (default=`none', `x' to restart):foo.com

这里我们来设置除了缺省的邮件域,还可以接受什么邮件域,作为本地邮件域。注意,这里需要与本地DNS的

MX记录相配合。

==============================================================================

All mail from here or specified other local machines to anywhere on

the internet will be accepted, as will mail from anywhere on the

internet to here.

Are there any domains you want to relay mail for---that is, you are

prepared to accept mail for them from anywhere on the internet, but

they are not local domains.

If there are any, enter them here, separated with spaces or commas. You

can use wildcards. If there are none, say `none'. If you want to relay

mail for all domains that specify you as an MX, then say `mx'

Enter value (default=`none', `x' to restart):

我们可以指定转发域,也可通过MX 记录指定转发域,这样将不会要求认证。

==============================================================================

Obviously, any machines that use us as a smarthost have to be excluded

from the relaying controls, as using us to relay mail for them is the

whole point.

Are there any networks of local machines you want to relay mail for?

If there are any, enter them here, separated with spaces or commas. You

should use the standard address/length format (e.g. 194.222.242.0/24)

If there are none, say `none'.

You need to double the colons in IPv6 addreses (e.g. 5f03::1200::836f::::/48)

Enter value (default=`none', `x' to restart):

我们在后面要设置通过认证来转发邮件,所以我们这里使用缺省值none。

==============================================================================

Mail for the `postmaster' and `root' accounts is usually redirected

to one or more user accounts, of the actual system administrators.

By default, I'll set things up so that mail for `postmaster' and for

various system accounts is redirected to `root', and mail for `root'

is redirected to a real user. This can be changed by editing /etc/aliases.

Note that postmaster-mail should usually be read on the system it is

directed to, rather than being forwarded elsewhere, so (at least one of)

the users you choose should not redirect their mail off this machine.

Which user account(s) should system administrator mail go to ?

Enter one or more usernames separated by spaces or commas . Enter

`none' if you want to leave this mail in `root's mailbox - NB this

is strongly discouraged. Also, note that usernames should be lowercase!

Enter value (`x' to restart):eagle

这里我们将系统的缺省用户的信件转给一个实际的管理员邮件账户。

The following configuration has been entered:

==============================================================================

Mail generated on this system will have `smtp.foo.com' used

as the domain part (after the @) in the From: field and similar places.

The following domain(s) will be recognised as referring to this system:

localhost, smtp.foo.com, foo.com

Mail for postmaster, root, etc. will be sent to eagle.

Local mail is delivered.

Outbound remote mail is looked up in the Internet DNS, and delivered

using that data if any is found; otherwise such messages are bounced.

Note that you can set email addresses used for outgoing mail by editing

/etc/email-addresses.

Is this OK ? Hit Return or type `y' to confirm it and install,

or `n' to make changes (in which case we'll go round again, giving you

your previous answers as defaults. (Y/n)

这里系统提示配置结果,接受上述设置。

Keeping previous /etc/exim/exim.conf as /etc/exim/exim.conf.O

Keeping previous /etc/aliases as /etc/aliases.O

Keeping previous /etc/mailname as /etc/mailname.O

Configuration installed.

系统将保存相关配置文件。

二、微调

这里我们对一些常用功能进行配置和补充,使其成为一个可以实际工作的邮件服务器。

1.增加转发域

relay_domains = *.foo.com

# 接受从外部进入的、目的域为foo.com的邮件转发。否则邮件无法进入。

2.检查邮件头,判断用户是否存在

sender_verify = true

# If this option is true, envelope sender addresses on incoming SMTP messages are checked to ensure that they are valid.

3.限制邮箱的大小

在 TRANSPORTS CONFIGURATION 的 local_delivery 加入:

maildir_tag = ,S=$message_size

quota = ${lookup{$local_part}lsearch*{/etc/exim/quota}{$value}{0M}}

quota_size_regex = S=(\d+)$

quota_warn_threshold = 85%

quota_warn_message = "To: $local_part@$domain\nSubject: Your mailbox full\n\nThis message is automatical

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有