[mdk-re] mail trouble
Andrew Golubev
=?iso-8859-1?q?gottfrid_=CE=C1_mail=2Eru?=
Ср Фев 27 18:23:12 MSK 2002
Доброго времени суток :-)
Имеется домен my.spb.ru, вся почта приходящая в домен складывается
провайдером в единственный pop3 ящик my на provider.ru
У меня стоит сервер который забирает почту с pop3 fetchmail'ом.
Далее работает exim. Потом cyrus-pop3d раздает ее пользователям.
Проблема состоит в том, что если отправить почту с любого внешнего
адреса(user на some.net) на внутренний(user1 на my.spb.ru) и указать в поле
копия еще один внутренний(user2 на my.spb.ru) адрес, то письмо придет user1
и my (на которого fetchmail забирает почту).
Как от этого избавиться?
Помогите пожалуйста. Подскажите где искать, что читать...
P.S. Вот мои конфиги.
/etc/fetchmailrc
set logfile "/var/log/fetchmail.log" #syslog
set idfile "/var/lock/fetchmail"
set postmaster "ego"
set bouncemail
set properties ""
set daemon 300
poll pop.provider.ru via pop.provider.ru
with proto pop3
user my there with password secret is my here
/etc/exim/exim.conf
######################################################################
# MAIN CONFIGURATION SETTINGS #
######################################################################
primary_hostname = anapurna.my.spb.ru
qualify_domain = anapurna.my.spb.ru
message_filter = /etc/exim/filter/main.filter
message_filter_file_transport = address_file
message_filter_pipe_transport = address_pipe
message_filter_reply_transport = address_reply
local_domains = my.spb.ru:anapurna.my.spb.ru:localhost
local_domains_include_host = true
local_domains_include_host_literals = true
forbid_domain_literals
never_users = root
host_lookup = *
host_accept_relay = *
trusted_users = mail
smtp_accept_queue_per_connection = 100
queue_remote_domains = *
smtp.wplus.net
freeze_tell_mailmaster = true
received_header_text = "Received: \
${if def:sender_rcvhost {from ${sender_rcvhost}\n\t}\
{${if def:sender_ident {from ${sender_ident} }}\
${if def:sender_helo_name {(helo=${sender_helo_name})\n\t}}}}\
by ${primary_hostname} \
${if def:received_protocol {with ${received_protocol}}} \
(Exim ${version_number} #${compile_number} (Debian))\n\t\
id ${message_id}\
${if def:received_for {\n\tfor <$received_for>}}"
#######accept_8bitmime = true
end
######################################################################
# TRANSPORTS CONFIGURATION #
######################################################################
# ORDER DOES NOT MATTER #
# Only one appropriate transport is called for each delivery. #
######################################################################
local_delivery:
driver = appendfile
group = mail
mode = 0660
mode_fail_narrower = false
envelope_to_add = true
return_path_add = true
file = /var/spool/mail/${local_part}
address_pipe:
driver = pipe
path = /usr/bin:/bin:/usr/local/bin
return_output
address_file:
driver = appendfile
envelope_to_add = true
return_path_add = true
address_directory:
driver = appendfile
no_from_hack
prefix = ""
suffix = ""
# maildir_format
address_reply:
driver = autoreply
procmail_pipe:
driver = pipe
command = "/usr/bin/procmail -d ${local_part}"
return_path_add
delivery_date_add
envelope_to_add
check_string = "From "
escape_string = ">From "
user = $local_part
group = mail
remote_smtp:
driver = smtp
# authenticate_hosts = smarthost.isp.com
end
######################################################################
# DIRECTORS CONFIGURATION #
# Specifies how local addresses are handled #
######################################################################
# ORDER DOES MATTER #
# A local address is passed to each in turn until it is accepted. #
######################################################################
real_local:
prefix = real-
driver = localuser
transport = local_delivery
system_aliases:
driver = aliasfile
file_transport = address_file
pipe_transport = address_pipe
file = /etc/aliases
search_type = lsearch
# user = list
# Uncomment the above line if you are running smartlist
userforward:
driver = forwardfile
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply
no_verify
check_ancestor
check_local_user
file = .forward
modemask = 002
filter
procmail:
driver = localuser
transport = procmail_pipe
require_files =
${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
no_verify
localuser:
driver = localuser
transport = local_delivery
end
######################################################################
# ROUTERS CONFIGURATION #
# Specifies how remote addresses are handled #
######################################################################
# ORDER DOES MATTER #
# A remote address is passed to each in turn until it is accepted. #
######################################################################
# Remote addresses are those with a domain that does not match any item
# in the "local_domains" setting above.
# Send all mail to a smarthost
smarthost:
driver = domainlist
transport = remote_smtp
route_list = "* smtp.provider.ru bydns_a"
end
...
/etc/exim/filter/mail.filter
# Exim filter << Don't edit or remove this line!
#
#
#
# User1
# if $header_to: contains "user1 на my.spb.ru" then
# unseen deliver "user1 на my.spb.ru"
## User1
elif $header_to: contains "user2 на my.spb.ru" then
unseen deliver "user2 на my.spb.ru"
## User3
elif $header_to: contains "user3 на my.spb.ru" then
unseen deliver "user3 на my.spb.ru"
## My
endif
Подробная информация о списке рассылки community