频道直达 - 专题 - 新闻 - 技巧 - 组网 - 开发 - 安全 - web编程 - 图像 - 操作系统 - 数据库 - 教育 - 旅游 - 健康 - 时尚 - 驱动 - 软件 - 游戏 - 多媒体 - ERP - 讨论组

安装Exim邮件服务器

来源: 作者: 出处:巧巧读书 2006-07-26 进入讨论组
关 键 词:director  dns  ie  ipv6  linux  

  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 更多文章 更多内容请看FTP服务器  IIS服务器应用技巧  IMail服务器专题,或进入讨论组讨论。
收藏此文】【 】【打印】【关闭
较早的文章:与NT和平共处

较新的文章:Linux软件安装之RPM的安装技巧
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询
巧巧读书宗旨
相关专题
·FTP服务器 (5104篇文章)
·双核服务器技术 (5840篇文章)
·网站服务器的选型 (6685篇文章)
·网吧流媒体服务器 (5367篇文章)
·刀片服务器专题 (4676篇文章)
·网吧服务器专栏 (4618篇文章)
·Windows操作系统安装 (12779篇文章)
·服务器配置专栏 (9288篇文章)
·IIS服务器应用技巧 (5162篇文章)
·系统安装手册 (17023篇文章)
热点标签: director  dns  ie  ipv6  linux  
最新论坛文章
站内各频道最新更新文档
站内最新制作专题
热门关键字导读
Photoshop教 程照片处理 照片制作 PS快捷键 抠图
计 算 机 故 障XP系统修复
艺 术 与 设 计设计 流媒体 设计欣赏 边框
计 算 机 安 全ARP
站内频道文章精选
百度推荐,商机无限
搜索您感兴趣的内容
Web 全站
巧巧电脑频道编辑信箱  告诉我们您想看的专题或文章