ГЛАВНАЯ  |  НОВОСТИ  |  О КОМПАНИИ  |  ДОКУМЕНТАЦИЯ  |  СЛОВАРЬ  |  КОНТАКТЫ  
 

 
W3C
Спецификация HTML 4.01 (на русском)
HTML 4.0 Entities
Спецификация CSS2 (на русском)
Расширяемый Язык Разметки (XML) 1.0 (на русском)
Расширяемый Язык Стилей (XSL) 1.0 (на русском)
Расширяемый Язык Гипертекстовой Разметки (XHTML) 1.0 (на русском)
XHTML 1.1 - XHTML на базе модулей (на русском)
Модуляризация XHTML (на русском)
Mason
Документация по Mason (на русском)
Mason Documentation (english)
Embedding Perl in HTML with Mason (english)
Поисковые машины
mnoGoSearch 3.2.15 (на русском)
mnoGoSearch 3.3.7 (english)
RDBMS
PostgreSQL 8.3 Documentation (english)
FreeBSD & UNIX
Manpage Viewer / Страницы помощи (english)
Руководство FreeBSD (на русском)
FreeBSD Handbook (english)
Часто задаваемые вопросы по FreeBSD (на русском)
Frequently Asked Questions for FreeBSD (english)
Статьи о FreeBSD на русском
Другие руководства по FreeBSD (на русском)
Операционная система UNIX (на русском)
Протоколы сетевого взаимодействия TCP/IP (на русском)
VIDEO
MPlayer (mencoder) (на русском)
MPlayer (mencoder) (english)
FFMPEG (english)
GRAPHICS
User manual for Netpbm (english)
O'Reilly
O'Reilly's bookshelves (english)
 

sendmail

sendmailSearch this book
Previous: 8.8 Things to TryChapter 9Next: 9.2 The RHS Triple
 

9. Rule Set 0

The function of rule set 0 is to decide which mail delivery agent will handle delivery for a particular recipient address. Figure 9.1 shows how rule set 0 relates to the other rule sets.

Figure 9.1: The flow of addresses for rule set 0

Figure 9.1

Rule set 0 is called once for each recipient of a mail message. Rule set 0 determines a triple for each address. The triple is composed of three parts: the symbolic name of the mail delivery agent, the name of the user to whom the mail is addressed, and the name of the host to which the mail will be sent. We'll expand on these soon and cover the other rule sets in later chapters.

9.1 Introducing Rule Set 0

Recall that one goal of the client.cf file is to cause sendmail to forward all mail to a central hub machine for processing. To lay the groundwork for this, we designed the hub delivery agent in Chapter 6, The Mail Hub and Delivery Agents, and declared it like this:

# Delivery agent definition to forward mail to hub
Mhub,   P=[IPC], S=0, R=0, F=mDFMuXa, T=DNS/RFC822/SMTP, A=IPC $h

As this goal implies, we don't want to design any fancy rules for rewriting the recipient's address, we simply want to send it to the hub as is.

The rule set that we show below does just that. It may look complicated, but recall that its one rule is basically just an if-then statement:

S0
R$+     $#hub $@${REMOTE} $:$1          forward to hub

The first line (the S0) declares the start of rule set 0. The R line in this example is the first of many possible rules that will form rule set 0.

You saw the LHS of this rule in the preceding chapter. The $+ wildcard operator is used to match one or more tokens in the workspace. Essentially, this LHS will match anything in the workspace but will fail to match an empty workspace.


Previous: 8.8 Things to TrysendmailNext: 9.2 The RHS Triple
8.8 Things to TryBook Index9.2 The RHS Triple

 
 


 Copyright © DHS Group, 2000-2007.

 
 
E-mail: info@dhs.net.ru 
Тел.: +7 3952 664321