LINUX.ORG.RU
ФорумAdmin

Postfix+Dovecot двойная отправка

 , ,


0

2

Всем привет. Возможно кому-то покажется, что надоедаю, но уж простите - с поставленной задачей нужно справиться, а на войне как на войне... :) Итак, что имеется - серв №1 с postfix. Конфиг такого вида:

command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
unknown_local_recipient_reject_code = 550
relay_domains = $mydestination, lists.bris.org
alias_maps = hash:/etc/aliases,hash:/home/sympa/etc/sympa_aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +
debug_peer_level = 2
debugger_command =
	 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
	 xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination check_policy_service unix:/var/spool/postfix/postgrey/socket
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
myhostname = dothost.co.uk
message_size_limit = 30240000
sympa_destination_recipient_limit = 1
sympabounce_destination_recipient_limit = 1
transport_maps = regexp:/home/sympa/etc/transport_regexp hash:/etc/postfix/transport
smtp_bind_address = 200.100.60.196
Серв настраивал не я :). НО, почта ходит внутри и наружу. Дальше интереснее :). Прописал транспорт для определенного адреса в transport_maps:
abcd.com smtp:[107.20.30.45]
Всего на этом серве крутится уйма сайтов и такая же уйма ящиков... Теперь «мой» серв:
#alias_database = hash:/etc/aliases
#alias_maps = hash:/etc/aliases
#CH
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = /etc/postfix/vdomain
sender_bcc_maps = hash:/etc/postfix/bcc
#local_recipient_maps = /etc/postfix/local
###
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname localhost.$mydomain localhost $mydomain
mydomain = dothost.com
myhostname = ns1.dothost.com
##
inet_interfaces = all
##
mynetworks = 10.0.0.0/8,127.0.0.0/8
#myorigin = $mydomain
#CH
##relay_domains = $mydestination
relay_domains = $mydomain
##relayhost =
recipient_delimiter = +
##
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
#CH
##virtual_transport = dovecot
#dovecot_destination_recipient_limit=1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
disable_vrfy_command = yes
#
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,reject_non_fqdn_helo_hostname,reject_invalid_helo_hostname,permit
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_unauth_pipelining,reject_non_fqdn_recipient,reject_unknown_recipient_domain,permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_mynetworks,reject_non_fqdn_sender,reject_unknown_sender_domain,permit
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
###
home_mailbox = Maildir/
debug_peer_level = 2
debug_peer_list = 127.0.0.1
debugger_command = 
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5
###
unknown_local_recipient_reject_code = 550
Мой серв лежит на амазоне и почта ходит также внутри и наружу... Но вот в транспортом полная Ж... - почта на второй серв не уходит и записей об отправке или подключении в maillog нет. maillog на моем серве чист (так уж сложилось :) ). Прошу уважаемое сообщество подсказать, где м.б. косяк..



Последнее исправление: cetjs2 (всего исправлений: 3)

Ответ на: комментарий от alex_nikonov

вроде дошли руки и..... релей работает, т.е. - при отправке на мыло юзверя с серва №1 - оно успешно переправляется на серв №2. Как-бы все норм, НО как заставить Postfix оставлять «копию» на серве №1 для указанного юзверя, а только потом перенаправлять на серв №2?

alex_nikonov
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.