发新话题
打印

使用rh7.3 sendmail作邮件服务器的请参考下文

使用rh7.3 sendmail作邮件服务器的请参考下文

如果默认安装rehat 7.3 sendmail,绝对值的一看!!

Sendmail


Red Hat Linux uses Sendmail as its MTA to deliver messages, whether they are intended for users on the same system or for remote destinations. Other MTAs do exist (and can be used well with Red Hat Linux), but most administrators elect to use Sendmail as their MTA due to its power, scalability, and compliance to important Internet standards, such as SMTP.

Sendmail's core duty, like other MTAs, is to safely move email between hosts, usually utilizing the SMTP protocol. However, Sendmail is highly configurable, allowing you to control almost every aspect of how email is handled, including the protocol used.

History
=============================================
Sendmail's roots can be traced to the birth of email, occurring in the decade before the birth of ARPANET, the precursor to the Internet. In those days, every user's mailbox was a file that only they had rights to read, and mail applications simply added text to that file. Every user had to wade through their mail file to find any old mail, and reading new mail was a equally difficult. The first actual transfer of a mail message file from one host to another did not take place until 1972, when email began to be moved by FTP over the NCP network protocol. This easier method of communication quickly became popular, even to the point where it made up most of ARPANET's traffic in less than a year.

However, a lack of standardization between competing protocols made email much harder to send from some systems. This continued until the ARPANET standardized on TCP/IP in 1982. Soon after, a new protocol, SMTP, materialized for transporting email messages. These developments, combined with HOSTS files being replaced with DNS, allowed full-featured MTAs to materialize. Sendmail, which grew out of an earlier email delivery system called Delivermail, quickly became the standard as the email began to expand and become widely used.

Purpose and Limitations
=============================================
It is important to be aware of what Sendmail is and what it can do for you as opposed to what it is not. In these days of monolithic applications that fulfill multiple roles, you might initially think that Sendmail is the only application you need to run an email server within your organization. Technically, this is true, as Sendmail can spool mail to your users' directories and accepts new email via the command line. But, most users actually require much more than simple email delivery. They usually want to interact with their email using an MUA that uses POP or IMAP to download their messages to their local machine. Or, they may prefer a Web interface to gain access to their mailbox. These other applications can work in conjunction with Sendmail and SMTP, but they actually exist for different reasons and can operate separately from one another.

It is beyond the scope of this section to go into all that Sendmail should or could be configured to do. With literally hundreds of different options and rule sets, entire volumes are dedicated to helping explain everything that can be done and how to fix things that go wrong. You should consult the many excellent resources on Sendmail in order to shape it to fit your exact specifications.

However, you should understand what files are installed with Sendmail by default on your system and know how to make basic configuration changes. You should also be aware of how to stop unwanted email (spam) and how to extend Sendmail with the Lightweight Directory Access Protocol (LDAP).

The Default Sendmail Installation
=============================================
While you can download the source code for Sendmail and build your own copy, many users prefer to use the version of Sendmail installed by default with their Red Hat Linux system. You can also use the Red Hat Linux CD-ROMs to reinstall the sendmail RPM at a later point. Be aware that you must alter the default configuration file for Sendmail to use it as a mail server for more than one host. See the Section called Common Sendmail Configuration Changes for details.

After installation, the sendmail executable is placed in the /usr/sbin/ directory.

Sendmail's lengthy and detailed configuration file, sendmail.cf, is installed in the /etc/ directory. You should avoid editing the sendmail.cf file directly. Instead, to make configuration changes to Sendmail, edit the /etc/mail/sendmail.mc file and use the included m4 macro processor to create a new /etc/sendmail.cf (after backing up the original /etc/sendmail.cf, of course). More information on configuring Sendmail can be found in the Section called Common Sendmail Configuration Changes.

Various Sendmail configuration files are installed in the /etc/mail/ directory including:


access — Specifies which systems can use Sendmail for relaying email.

domaintable — Allows you to provide domain name mapping.

local-host-names — The place where you include all aliases for your machine.

mailertable — Specifies instructions that override routing for particular domains.

virtusertable — Permits you to do a domain-specific form of aliasing, allowing multiple virtual domains to be hosted on one machine.

Several of the configuration files in /etc/mail/, such as access, domaintable, mailertable and virtusertable, must actually store their information in database files before Sendmail can use any configuration changes. To include any changes you make to these configurations in their database files, you must run the makemap hash /etc/mail/ < /etc/mail/ command, where is the name of the configuration file to convert.

For example, if you want all email addressed to any domain.com account to be delivered to , you need to add a line to the virtusertable file:

@domain.com bob@otherdomain.com



Then, to add this new information to the virtusertable.db file, execute makemap hash /etc/mail/virtusertable < /etc/mail/virtusertable as root. This will create a new virtusertable.db that contains the new configuration.

Common Sendmail Configuration Changes
=============================================
Although a default sendmail.cf file is installed in /etc/ during the Red Hat Linux installation process, you will need to alter it to utilize some of the program's more advanced features.

When altering the Sendmail configuration file, it is best generate a entirely new /etc/sendmail.cf file instead of editing an existing one.


Important
Before changing the sendmail.cf file, it is a good idea to backup the default version.


To add the desired functionality Sendmail edit the /etc/mail/sendmail.mc file. When you are finished, use the m4 macro processor to generate a new sendmail.cf by executing the m4 /etc/mail/sendmail.mc > /etc/sendmail.cf command. After creating a new /etc/sendmail.cf, you must restart Sendmail to make it take effect. The easiest way to do this is to type the /sbin/service sendmail restart command as root.

By default, the m4 macro processor is installed with Sendmail. The m4 macro processor is included with the sendmail-cf package.


Important
The default sendmail.cf does not allow sendmail to accept network connections from any host other than the local computer. If you want to configure sendmail as a server for other clients, please edit /etc/mail/sendmail.mc and change DAEMON_OPTIONS to also listen on network devices or comment out this option all together. Then regenerate /etc/sendmail.cf by running:


This configuration should work for most SMTP-only sites. It will not work for UUCP (UNIX to UNIX Copy) sites; you will need to generate a new sendmail.cf if you must use UUCP mail transfers.

You should consult the /usr/share/sendmail-cf/README file before you edit any of the files in the directories under the /usr/share/sendmail-cf directory, as they can affect how future /etc/sendmail.cf files are configured.

Masquerading
=============================================
One common Sendmail configuration is to have a single machine act as a mail gateway for all the machines on the network. For instance, a company may want to have a machine called mail.bigcorp.com that does all their mail. On that machine, add the names of machines for which mail.bigcorp.com will handle mail to /etc/mail/local-host-names. Here is an example:

# sendmail.cw - include all aliases for your machine
# here.
torgo.bigcorp.com
poodle.bigcorp.com
devel.bigcorp.com




On the other machines, torgo, poodle, and devel, edit /etc/sendmail.cf to "masquerade" as mail.bigcorp.com when sending mail and to forward any local mail processing to bigcorp.com. Find the DH and DM lines in /etc/sendmail.cf and edit them as such:

# who I send unqualified names to
# (null means deliver locally)
DRmail.bigcorp.com

# who gets all local email traffic
DHmail.bigcorp.com

# who I masquerade as (null for no masquerading)
DMbigcorp.com



With this type of configuration, all mail sent will appear as if it were sent from bigcorp.com, and any mail sent to torgo.bigcorp.com or the other hosts will be delivered to mail.bigcorp.com.

Stopping Spam with Sendmail
=============================================
Email spam can be defined as unnecessary and unwanted email received by a user who never requested the communication. It is a disruptive, costly, and widespread abuse of Internet communication standards.

Sendmail has made it relatively easy to block new spamming techniques being employed to send junk email using your system. It even blocks many of the more usual spamming methods by default. You would need to consciously activate them by changing your /etc/mail/sendmail.mc file in a particular way to make your system susceptible.

For example, forwarding of SMTP messages, also referred to as SMTP relaying, has been disabled by default since Sendmail version 8.9. Before this change occurred, Sendmail would direct your mail host (x.org) to accept messages from one party (y.com) and send them to a different party (z.net). Now, however, you have to specifically tell Sendmail to permit a domain to relay mail through your domain. Simply edit the /etc/mail/relay-domains file and restart Sendmail by typing the service sendmail restart command as root to activate the changes.

However, many times, your users may be bombarded with spam from other servers throughout the Internet that are beyond your control. In these instances, you can use Sendmail's access control features available through the /etc/mail/access file. As root, add the domains that you would like to block or specifically allow access, such as:

badspammer.com 550 Go away and do not spam us anymore
tux.badspammer.com OK
10.0 RELAY



Because /etc/mail/access.db is a database, you need to use makemap to activate your changes by recreating the database map. This is easily done by running the makemap hash /etc/mail/access < /etc/mail/access command as root.

This example shows that any email sent from badspammer.com would be blocked with a 550 RFC-821 compliant error code and message back to the spammer, except for email sent from the tux.badspammer.com sub-domain, which would be accepted. The last line shows that any email sent from the 10.0.*.* network can be relayed through your mail server.

As you might expect, this example only scratches the surface of what Sendmail can do in terms of allowing or blocking access. See the /usr/share/doc/sendmail/README.cf for more detailed information and examples.

Using Sendmail with LDAP
=============================================
Using the Lightweight Directory Access Protocol (LDAP) is a very quick and powerful way to find specific information about a particular user from a much larger group. For example, you could use an LDAP server to look up a particular email address from a common corporate directory by a user's last name. In this kind of implementation, LDAP is largely separate from Sendmail, with LDAP storing the hierarchical user information and Sendmail only being given the result of LDAP queries in pre-addressed email messages.

However, Sendmail supports a much greater integration with LDAP, where it uses LDAP to replace separately maintained files, such as aliases and virtusertables, on different mail servers that work together to support a medium- to enterprise-level organization. In short, you can use LDAP to abstract the mail routing level from Sendmail and its separate configuration files to a powerful LDAP cluster that is being leveraged by many different applications.

The current version of Sendmail contains support for LDAP. To extend your Sendmail server using LDAP, first get an LDAP server, such as OpenLDAP, running and properly configured. Then, you need to edit your /etc/mail/sendmail.mc to include:

LDAPROUTE_DOMAIN('yourdomain.com')dnl
FEATURE('ldap_routing')dnl




Note
This is only for a very basic configuration of Sendmail with LDAP. Your configuration should differ greatly from this depending on your implementation of LDAP, especially if you wish to configure several Sendmail machines to use a common LDAP server.

Consult /usr/share/doc/sendmail/README.cf for detailed LDAP routing configuration instructions and examples.


Next, recreate your /etc/sendmail.cf file by running m4 and restarting Sendmail. See the Section called Common Sendmail Configuration Changes for instructions on doing this.



1.为了安全,请不要在发帖时公布你的真实IP及域名;请在获得别人的帮助问题解决之后,编辑帖子分类为[已解决],并同样帮助有能力帮助的人--分享您的经验,分享大家的快乐!
2.专业提供邮件系统选型\安装部署\升级迁移\维护外包等全方位技术支持与咨询顾问服务;提供反垃圾邮件软件、硬件网关;Push Mail(移动电邮),BlackBerry(黑莓) 解决方案。
3.联系方式:QQ:36335336;MSN:neil_ding#msn.com;Email: neil_ding2000#yahoo.com.cn;TEL:020-34382506

TOP

Re:Exchange 2000常见问题解决集---仅供参考,请各位勿回贴,谢谢!

如果对OWA, Outlook等客户端语言设置比较关心的用户,应该看看这个文档,或者对你会
有不少帮助:

How Special Folder Names Are Assigned for Multiple Language Clients in
Exchange 2000 Server

http://support.microsoft.com/?id=325625

The information in this article applies to:
a.. Microsoft Exchange 2000 Server
This article was previously published under Q325625
a.. Summary
b.. Folder Names for MAPI Clients
c.. Folder Names for Non-MAPI Clients
d.. Change the Language of the Folder Names
SUMMARY
This article discusses the way that the information store assigns folder
names if your Exchange 2000 supports multiple-language MAPI and non-MAPI
clients.

back to the top


Folder Names for MAPI Clients
The first time that a user logs on to an Exchange 2000 mailbox by using a
MAPI client (Microsoft Outlook, for example), the information store creates
the special folders that Exchange 2000 uses in the language that is
appropriate for that client. The information store determines the language
by using the client's Locale ID property value. The client language is used
to generate the folder names for the special Server folders, which include:
a.. Inbox
b.. Outbox
c.. Sent Items
d.. Deleted Items
The client language is also used to generate the names of the special
Outlook folders (which are generated by Collaboration Data Objects [CDO]).
These include:
a.. Calendar
b.. Contacts
c.. Drafts
d.. Journal
e.. Notes
f.. Tasks
back to the top


Folder Names for Non-MAPI Clients
The first time that a user logs on to an Exchange 2000 mailbox by using a
POP3 or IMAP4 client, (Microsoft Outlook Express, for example), the folder
names are generated in the client language if either of the following
conditions is true:
a.. The user completes a task that commits information to the server.

-or-
b.. The user touches the server, such as by sending or receiving mail.
If a user logs on with a POP3 or IMAP4 client and does not touch the server,
the folder names are not generated. For example, if a user logs on to the
server and then immediately logs off of the server, they have not touched
the server. If a user logs on to the server at a later date and then touches
the server, the folder names are generated in the client language. For
additional information about how folder names are assigned in Outlook Web
Access (OWA), click the article number below to view the article in the
Microsoft Knowledge Base:

325626 XGEN: How Special Folder Names are Assigned in Outlook Web Access
(OWA)

back to the top


Change the Language of the Folder Names
After the names of the special folders have been generated, the folder
assignments cannot be changed. However, you can change the language of the
folder assignments if the language to which they were set is incorrect. For
example, if an uninitialized mailbox receives an e-mail message, the names
of the folders are set to the language of the Exchange 2000 server, instead
of to the language of the client.

NOTE: An uninitialized mailbox is a mailbox that has been created but whose
owner has not yet logged on to it.

For additional information about how to rename special folders, click the
article number below to view the article in the Microsoft Knowledge Base:

251636 XADM: Cannot Rename the Default Mailbox Folders from the System
Manager


Another method to rename the special folders is to use Microsoft Outlook
2002. To do this, configure Outlook to use the language that you want the
special folders to use on the Exchange 2000 server, and then start Outlook
with the /resetfoldernames command-line switch. For additional information
about command-line switches for Outlook 2002, click the article number below
to view the article in the Microsoft Knowledge Base:

296192 OL2002: Additional Command-Line Switches


1.为了安全,请不要在发帖时公布你的真实IP及域名;请在获得别人的帮助问题解决之后,编辑帖子分类为[已解决],并同样帮助有能力帮助的人--分享您的经验,分享大家的快乐!
2.专业提供邮件系统选型\安装部署\升级迁移\维护外包等全方位技术支持与咨询顾问服务;提供反垃圾邮件软件、硬件网关;Push Mail(移动电邮),BlackBerry(黑莓) 解决方案。
3.联系方式:QQ:36335336;MSN:neil_ding#msn.com;Email: neil_ding2000#yahoo.com.cn;TEL:020-34382506

TOP

Re:使用rh7.3 sendmail作邮件服务器的请参考下文

nice doc

TOP

re:钉子哥,是不是针对不同版本的sendma...

钉子哥,是不是针对不同版本的sendmail都可以呀

我的sendmail是red hat linux 8.0系统自带的。

TOP

发新话题
  清除 Cookies - 联系我们 - 邮件技术资讯网 - Archiver - WAP - 繁體中文
当前时区 GMT+8, 现在时间是 2008-12-5 04:05

本论坛为非盈利中立机构,论坛所有言论纯属发表者个人意见,与《 邮件技术资讯网》论坛立场无关。内容所涉及的版权和法律相关事宜请参考各自所有者的条款。
如果认定侵犯了您的权利,请联系我们尽快处理。本论坛原创内容请联系本站后再行转载并务必保留我站信息。此声明修改不再另行通知,本论坛保留最终解释权。
*本论坛QQ群:1#群2233231(已满) 2#群2598254(推荐) 3#群15974064(推荐) 4#群14173252(推荐)*
* 建议使用 1024×768 模式查看本论坛 *
Powered by Discuz! 6.1.0