Доброго времени суток!
Имеется почтовый релей.
Настроен для получения писем для нескольких доменов и пересылки на внутренние почтовые сервера.
При получении писем писем говорит что пользователя нет в таблице: postfix/smtpd[19570]: NOQUEUE: reject: RCPT from mail-vc0-f172.google.com[209.85.220.172]: 450 4.1.1 <dao@xxx.com>: Recipient address rejected: User unknown in local recipient table; from=<xxx@gmail.com> to=<dao@xxx.com> proto=ESMTP helo=<mail-vc0-f172.google.com>
А письма должны просто пересылаться для этого домена на внутренний сервер, который сам определит наличие пользователя.
main.cf
-----------
smtpd_banner = $myhostname
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 1h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
myhostname = mx2.xxx.com
mydomain = xxx.com
myorigin = $mydomain
#inet_interfaces = eth0
mynetworks_style = subnet
mynetworks = 127.0.0.0/8, xx.xxx.xxx.xxx/28
mydestination = $myhostname, localhost.$mydomain, $mydomain
relay_domains = xxx.com, yyy.xxx.com, zzz.xxx.com, www.xxxx.com
unknown_local_recipient_reject_code = 450
relay_domains_reject_code = 554
alias_database = hash:/etc/postfix/checks/aliases
header_checks = regexp:/etc/postfix/checks/header_checks
mime_header_checks = regexp:/etc/postfix/checks/mime_header_checks
body_checks = regexp:/etc/postfix/checks/body_checks
sender_bcc_maps = hash:/etc/postfix/checks/recipient_bcc_maps
alias_maps = hash:/etc/postfix/checks/aliases
transport_maps = hash:/etc/postfix/checks/transports
####local_recipient_maps = hash:/etc/postfix/checks/local_recipient
###relay_recipient_maps = hash:/etc/postfix/checks/relay_maps
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
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
setgid_group = postdrop
readme_directory = no
data_directory = /var/lib/postfix
inet_protocols = ipv4
smtpd_helo_required = yes
policy-spf_time_limit = 3600s
message_size_limit = 10485760
body_checks_size_limit = 10485760
smtp_connect_timeout = 60s
smtp_data_init_timeout = 180s
maximal_backoff_time = 400s
minimal_backoff_time = 300s
queue_run_delay = 300s
maximal_queue_lifetime = 1d
delay_warning_time = 1h
bounce_queue_lifetime = 1d
smtpd_client_restrictions =
permit_mynetworks,
check_sender_access hash:/etc/postfix/checks/access,
reject_rbl_client dialups.mail-abuse.org,
reject_rbl_client dul.ru,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client dul.dnsbl.sorbs.net,
check_policy_service unix:private/policy,
content_filter = smtp-amavis:[127.0.0.1]:10024,
reject_unknown_client,
permit
#####!!
master.cf
--------------
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - - - - smtpd
#smtp inet n - - - 1 postscreen
#smtpd pass - - - - - smtpd
#dnsblog unix - - - - 0 dnsblog
#tlsproxy unix - - - - 0 tlsproxy
#submission inet n - - - - smtpd
# -o syslog_name=postfix/submission
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - - - - smtpd
# -o syslog_name=postfix/smtps
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
-o content_filter=
-o receive_override_options=no_header_body_checks
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe( delivery
# agent. See the pipe( man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
# Added using postfix-add-policy script:
policy-spf unix - n n - - spawn
user=nobody argv=/usr/bin/policyd-spf
policy unix - n n - - spawn
user=nobody argv=/usr/bin/policyd-spf
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
# Added using postfix-add-filter script:
smtp-amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o smtp_tls_note_starttls_offer=no
-o max_use=20
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
##### -o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
####%% -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
-o receive_override_options=no_header_body_checks,no_milters
-o local_header_rewrite_clients=
-o smtpd_milters=
-o local_recipient_maps=
-o relay_recipient_maps=
###dspam-retrain unix - n n - 10 pipe
### flags=Rhq user=dspam argv=/usr/bin/dspam --class=$nexthop --user amavis --source=error