《NetBSD指南-26.1.postfix》

NetBSD用户指南中文版、NetBSD pkgsrc指南中文版...

版主: lionux

主题已锁定
头像
leo
帖子: 2465
注册时间: 2010-01-21 3:27

《NetBSD指南-26.1.postfix》

帖子 leo » 2010-03-08 1:46

When an MTA must deliver a local message, it is delivered directly. If the message is intended for a different domain, the MTA must find out the address of the mail server for that domain. Postfix uses the DNS service (described in Chapter 25, The Domain Name System) to find a mail exchanger handling mail for the given domain, and delivers the message to that mail server then.

Postfix is controlled by a set of configuration files and databases, of which /etc/postfix/main.cf and /etc/postfix/master.cf are the most important.
Note
Prior to version 1.5 of NetBSD, the mail configuration files were in /etc instead of /etc/mail. Since NetBSD 4.0, the /etc/mail directory is only used to store the local aliases and the corresponding postmap(1) database.
The first problem to be solved is that the local network we are dealing with is an internal network, i.e. not directly accessible from the Internet. This means that the names used internally have no meaning on the Internet; in short, “ape.insetti.net” cannot be reached by an external host: no one will be able to reply to a mail sent with this return address (many mail systems will even reject the message as spam prevention as it comes from an unknown host). The true address, the one visible from everybody, is assigned by the provider and, therefore, it is necessary to convert the local address “[email protected]” to the real address “[email protected]”. Postfix, if correctly configured, will take care of this when it transfers the messages.

You'll probably also want to configure postfix in order to send the e-mails to the provider's mail server, using it as a relay. In the configuration described in this chapter, postfix does not directly contact the recipient's mail server (as previously described) but relays all its mail to the provider's mail server.
Note
The provider's mail server acts as a relay, which means that it delivers mail which is not destined to its own domain, to another mail server. It acts as an intermediary between two servers.
Since the connection with the provider is not always active, it is not necessary to start postfix as a daemon in /etc/rc.conf: you can disable it with the line “postfix=NO”. As a consequence it will be necessary to launch postfix manually when you want to transfer mail to the provider. Local mail is delivered correctly even if postfix is not active as a daemon.

Let's start configuring postfix.

主题已锁定

在线用户

正浏览此版面之用户: Ahrefs [Bot] 和 1 访客