Помогите решить проблему. Есть postfix который получает почту для двух доменов.
Почту с одного из этих доменов (domain2.ru) нужно перебрасывать на другой сервер.Вот конфиг:
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
mail_owner = postfix
default_privs = nobody
myhostname = domain1.ru
mydomain = domain1.ru
myorigin = $mydomain
inet_interfaces = all
mydestination = localhost.$mydomain, localhost
unknown_local_recipient_reject_code = 550
mynetworks = 127.0.0.0/8 172.16.0.0/24 xx.xx.xx.xx/21
alias_maps = hash:/etc/aliases
strict_rfc821_envelopes = yes
smtpd_delay_reject = yes
smtpd_banner = $myhostname mail server
smtpd_helo_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_hostname,
reject_unknown_hostname,
permit
smtpd_sender_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
permit
smtpd_recipient_restrictions = reject_unauth_pipelining,
permit_sasl_authenticated,
permit_mynetworks,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
reject_unauth_destination,
permit
smtpd_client_restrictions = permit_mynetworks,
reject_rbl_client bl.spamcop.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client blackholes.mail-abuse.org,
reject_rbl_client dialups.mail-abuse.org,
reject_rbl_client dul.ru,
reject_rbl_client opm.blitzed.org,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client dnsbl.njabl.org,
reject_rbl_client dynablock.njabl.org,
reject_rbl_client combined.njabl.org,
permit
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_etrn_restrictions = reject
smtpd_reject_unlisted_sender = yes
disable_vrfy_command = yes
smtpd_helo_required = yes
smtp_always_send_ehlo = yes
smtpd_hard_error_limit = 8
smtpd_timeout = 30s
smtp_helo_timeout = 15s
smtp_mail_timeout = 15s
smtp_rcpt_timeout = 15s
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
transport_maps = mysql:/usr/local/etc/postfix/transport.mysql
virtual_alias_maps = mysql:/usr/local/etc/postfix/alias.mysql
virtual_mailbox_domains = mysql:/usr/local/etc/postfix/domains.mysql
virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mailbox.mysql
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/quota.mysql
virtual_mailbox_base = /var/mail/virtual
virtual_maildir_extended = yes
virtual_mailbox_limit_override = yes
virtual_create_maildirsize = yes
virtual_overquota_bounce = yes
virtual_maildir_limit_message = "Sorry, the user's maildir has overdrawn his diskspace quota, please try again later"
message_size_limit = 10485760
virtual_gid_maps = static:1002
virtual_uid_maps = static:1002
virtual_minimum_uid = 1000
readme_directory = no
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
html_directory = no
setgid_group = maildrop
manpage_directory = /usr/local/man
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
-----------------
alias.mysql
hosts = localhost
dbname = mail
table = alias
select_field = goto
where_field = address
-----------------
domains.mysql
hosts = localhost
dbname = mail
table = domain
select_field = description
where_field = domain
additional_conditions = and active = '1' and backupmx = '0'
-----------------
mailbox.mysql
hosts = localhost
dbname = mail
table = mailbox
select_field = maildir
where_field = username
additional_conditions = and active = '1'
-----------------
hosts = localhost
dbname = mail
table = mailbox
select_field = quota
where_field = username
additional_conditions = and active = '1'
-----------------
transport.mysql
hosts = localhost
dbname = mail
table = domain
select_field = transport
where_field = domain
--
-- Структура таблицы `domain`
--
CREATE TABLE `domain` (
`domain` varchar(255) NOT NULL default '',
`description` varchar(255) NOT NULL default '',
`aliases` int(10) NOT NULL default '0',
`mailboxes` int(10) NOT NULL default '0',
`maxquota` int(10) NOT NULL default '0',
`transport` varchar(255) default NULL,
`backupmx` tinyint(1) NOT NULL default '0',
`created` datetime NOT NULL default '0000-00-00 00:00:00',
`modified` datetime NOT NULL default '0000-00-00 00:00:00',
`active` tinyint(1) NOT NULL default '1',
PRIMARY KEY (`domain`)
) ENGINE=MyISAM DEFAULT CHARSET=cp1251;
--
-- Дамп данных таблицы `domain`
--
INSERT INTO `domain` VALUES ('domain1.ru', 'domain1', 0, 0, 0, 'virtual:', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1);
INSERT INTO `domain` VALUES ('domain2.ru', 'domain2', 0, 0, 0, 'smtp:xx.xx.xx.xx', 0, '0000-00-00 00:00:00', '0000-00-00 00:00:00', 1);
Когда почта для домена domain2.ru приходит на сервер, в логах вижу:
Feb 13 15:14:21 postfix/smtpd[45937]: NOQUEUE: reject: RCPT from f17.mail.ru[194.67.57.47]: 550 5.1.1 <admin@domain2
.ru>: Recipient address rejected: User unknown in virtual mailbox table; from=<spinaker82@mail.ru> to=<admin@domain2.ru> pro
to=ESMTP helo=<f17.mail.ru>
Feb 13 15:14:21 postfix/smtpd[45937]: disconnect from f17.mail.ru[194.67.57.47]
Подскажите что я не так делаю ?
Что в конфиге можно и нужно убрать лишнего ?
Или может что-то поставить необходимо ?
Буду благодарен за любую помощь.
Спасибо за внимание.