On Wed, 24 Mar 2004 13:45:55 +0000
SH059 (SH059) wrote:
SH059> Есть локальная сеть, в ней почтовый шлюз, который должен локальную
SH059> почту раскладывать по ящикам, а не локальную передавать на
SH059> smarthost например domain.com. Кроме того на domain.com есть
SH059> несколько акаунтов (например [EMAIL PROTECTED] и [EMAIL PROTECTED]) с
SH059> которых почта забирается fetchmail'ом. Есть желание, чтобы если
SH059> кто-то из локальной сети отправлял почту на [EMAIL PROTECTED] или
SH059> [EMAIL PROTECTED] Exim сразу клал бы ее в соответствующий локальный
SH059> ящик, а вся остальная почта (в том числе и для domain.com)
SH059> перенаправлялась бы на smarthost.
Всё понятно ;)
Есть такая вещь, как config.samples - рекомендую просматривать. Вот рецепт
#C031 (hint: self = local):
Date: Tue, 23 Nov 1999 02:49:32 +0200
From: Vadim Vygonets <[EMAIL PROTECTED]>
Something Hans Matzen and I did.
# These are config file snippets for handling certain remote
# addresses as local, and making only real external addresses
# visible to users.
# Copyright (c) 1999
# Hans Matzen <[EMAIL PROTECTED]>,
# Vadim Vygonets <[EMAIL PROTECTED]>. All rights reserved.
#################################################################
# These are config file snippets for handling certain remote
# addresses as local, and making only real external addresses
# visible to users.
#
# First, adjust values of the following definitions, which will
# be used in configuration snippets below:
EXIM_DIR = /var/exim
LOCAL_DOM = home.dom
LOCAL_NET = 192.168.0.0/16
SMART_HOST = cc.huji.ac.il
# The scheme is to use global addresses everywhere, which is done
# by rewriting envelope sender and all headers, using a dbm file
# EXIM_DIR/in2ex, which maps internal local parts to external
# e-mail addresses using entries like:
# user: [EMAIL PROTECTED]
#
# To do this, it good to hide hostnames in all envelope and
# header addresses first, using this rewriting rule:
[EMAIL PROTECTED] [EMAIL PROTECTED]
Eh
# Then, rewrite envelope sender and all headers to external
# addresses with this rule:
[EMAIL PROTECTED] ${lookup{${lc:$1}}dbm{EXIM_DIR/in2ex}{$value}fail}
Fh
# This means that envelope recipients must be somehow rewritten
# back to local addresses, which is done in one of the two
# proposed ways (you choose).
#
# One way to do it is by rewriting, using a dbm file
# EXIM_DIR/ex2in, which maps external e-mail addresses to
# internal local parts using entries like:
# [EMAIL PROTECTED]: user
#
# This is done with the rewriting rule:
#
# [EMAIL PROTECTED] ${lookup{${lc:$0}}dbm{EXIM_DIR/[EMAIL PROTECTED]
T
# The preferred way to do it is by treating certain e-mail
# addresses on remote domains as local, using route_list and self
# options to the domainlist routers, looking up e-mail addresses
# in dbm file EXIM_DIR/ex2in and throwing values away. This is
# an example of such router. It should probably the only router
# in the configuration.
smart_route:
driver = domainlist
transport = remote_smtp
route_list = "* [EMAIL PROTECTED]
{EXIM_DIR/[EMAIL PROTECTED] bydns_a"
self = local
# Then, IF local parts of some of your users are different in
# their internal and external addresses, it's nice to have the
# internal_adjust smartuser director to rewrite the address. It
# should probably be the first director.
internal_adjust:
driver = smartuser
new_address = "${lookup{${lc:[EMAIL PROTECTED]/ex2in}\
[EMAIL PROTECTED]"
;)
--
Serge Olkhowik <[EMAIL PROTECTED]>
ISD Configuration Management Team <[EMAIL PROTECTED]>