2015-06-10 14 views
0

Я использую Postfix в качестве почтового сервера для своих приложений. У меня есть настройки записей TLS, DKIM, SPF и TXT для моего почтового домена i.e; mail.xyz.com. Этот почтовый домен указывает на сервер Postfix.Ошибка при отправке писем с идентификатором Gmail с использованием почтового сервера PostFix

Проблема заключается в том, что если я отправлю электронное письмо с использованием какого-либо почтового идентификатора моего домена, такого как [email protected], он будет работать хорошо, и почта будет доставлена ​​на любой из почтовых серверов, таких как Gmail или Yahoo и т. Д. Но если Я отправляю почтовый ящик другого идентификатора почтовой почты, например [email protected], появляется сообщение с предупреждением о том, что отправитель является спамером или иногда почта не доставлена, и я получаю сообщение о доставке, в котором говорится, что почтовый сервер не авторизован для отправки почты с помощью [email protected] или [email protected]

Я провел некоторое исследование и узнал о SPF, TXT, DKIM и TLS. Я добавил все это на требуемый сервер, но проблема все еще сохраняется.

Amazon SES, или некоторые другие интерфейсы электронной почты удалось это как-то так, что мы можем отправить почту с других почтовых идентификаторов и появляется их почта в почтовом ящике, как это: [email protected] через amazonses.com

Может ли кто-нибудь помочь мне в этом, так как это стало самой большой проблемой для нас.

Мой main.cf является:

$# nano /etc/postfix/main.cf 
    GNU nano 2.0.9              File: /etc/postfix/main.cf 

    # Global Postfix configuration file. This file lists only a subset 
    # of all parameters. For the syntax, and for a complete parameter 
    # list, see the postconf(5) manual page (command: "man 5 postconf"). 
     # 
    # For common configuration examples, see BASIC_CONFIGURATION_README 
    # and STANDARD_CONFIGURATION_README. To find these documents, use 
    # the command "postconf html_directory readme_directory", or go to 
    # http://www.postfix.org/. 
    # 
    # For best results, change no more than 2-3 parameters at a time, 
    # and test if Postfix still works after every change. 

    #local_recipient_maps = 


    # SOFT BOUNCE 
    # 
    # The soft_bounce parameter provides a limited safety net for 
    # testing. When soft_bounce is enabled, mail will remain queued that 
    # would otherwise bounce. This parameter disables locally-generated 
    # bounces, and prevents the SMTP server from rejecting mail permanently 
    # (by changing 5xx replies into 4xx replies). However, soft_bounce 
    # is no cure for address rewriting mistakes or mail routing mistakes. 
    # 
    #soft_bounce = no 

    # LOCAL PATHNAME INFORMATION 
    # 
    # The queue_directory specifies the location of the Postfix queue. 
    # This is also the root directory of Postfix daemons that run chrooted. 
    # See the files in examples/chroot-setup for setting up Postfix chroot 
    # environments on different UNIX systems. 
     # 
    queue_directory = /var/spool/postfix 

    # The command_directory parameter specifies the location of all 
    # postXXX commands. 
     # 
    command_directory = /usr/sbin 

     # The daemon_directory parameter specifies the location of all Postfix 
     # daemon programs (i.e. programs listed in the master.cf file). This 
     # directory must be owned by root. 
    # 
    daemon_directory = /usr/libexec/postfix 

    # The data_directory parameter specifies the location of Postfix-writable 

# The data_directory parameter specifies the location of Postfix-writable 
# data files (caches, random numbers). This directory must be owned 
# by the mail_owner account (see below). 
# 
data_directory = /var/lib/postfix 

# QUEUE AND PROCESS OWNERSHIP 
# 
# The mail_owner parameter specifies the owner of the Postfix queue 
# and of most Postfix daemon processes. Specify the name of a user 
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS 
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In 
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED 
# USER. 
# 
mail_owner = postfix 

# The default_privs parameter specifies the default rights used by 
# the local delivery agent for delivery to external file or command. 
# These rights are used in the absence of a recipient user context. 
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER. 
# 
#default_privs = nobody 

# INTERNET HOST AND DOMAIN NAMES 
# 
# The myhostname parameter specifies the internet hostname of this 
# mail system. The default is to use the fully-qualified domain name 
# from gethostname(). $myhostname is used as a default value for many 
# other configuration parameters. 
# 


myhostname = mail.xyz.com 
#myhostname = virtual.domain.tld 

# The mydomain parameter specifies the local internet domain name. 
# The default is to use $myhostname minus the first component. 
# $mydomain is used as a default value for many other configuration 
# parameters. 
# 
mydomain =xyz.com 

# SENDING MAIL 
# 
# The myorigin parameter specifies the domain that locally-posted 
# The myorigin parameter specifies the domain that locally-posted 
# mail appears to come from. The default is to append $myhostname, 
# which is fine for small sites. If you run a domain with multiple 
# machines, you should (1) change this to $mydomain and (2) set up 
# a domain-wide alias database that aliases each user to 
# [email protected] 
# 
# For the sake of consistency between sender and recipient addresses, 
# myorigin also specifies the default domain name that is appended 
# to recipient addresses that have no @domain part. 
# 
#myorigin = $myhostname 
myorigin = $mydomain 

# RECEIVING MAIL 
# The inet_interfaces parameter specifies the network interface 
# addresses that this mail system receives mail on. By default, 
# the software claims all active interfaces on the machine. The 
# parameter also controls delivery of mail to [email protected][ip.address]. 
# 
# See also the proxy_interfaces parameter, for network addresses that 
# are forwarded to us via a proxy or network address translator. 
# 
# Note: you need to stop/start Postfix when this parameter changes. 
# 
inet_interfaces = all 
#inet_interfaces = $myhostname 
#inet_interfaces = $myhostname, localhost 
#inet_interfaces = localhost 

# Enable IPv4, and IPv6 if supported 
inet_protocols = all 

# The proxy_interfaces parameter specifies the network interface 
# addresses that this mail system receives mail on by way of a 
# proxy or network address translation unit. This setting extends 
# the address list specified with the inet_interfaces parameter. 
# 
# You must specify your proxy/NAT addresses when your system is a 
# backup MX host for other domains, otherwise mail delivery loops 
# will happen when the primary MX host is down. 
# 
proxy_interfaces = 10.2.11.292, 120.18.12.73, 18.75.58.218 
#proxy_interfaces = 1.2.3.4 
unknown_local_recipient_reject_code = 550 

#relay_domains = $mydestination 
relay_domains = 

#smtpd_use_tls = yes 
smtpd_recipient_restrictions = 
    permit_mynetworks 
    permit_sasl_authenticated 
    reject_unauth_destination 

#alias_maps = dbm:/etc/aliases 
alias_maps = hash:/etc/aliases 
#alias_maps = hash:/etc/aliases, nis:mail.aliases 
#alias_maps = netinfo:/aliases 

#alias_database = dbm:/etc/aliases 
#alias_database = dbm:/etc/mail/aliases 

alias_database = hash:/etc/aliases 
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases 

smtpd_banner = mail.xyz.com ESMTP 
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) 

debug_peer_level = 2 
debugger_command = 
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin 
    ddd $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: The location of the Postfix HTML documentation. 
# 
html_directory = no 

# 
sample_directory = /usr/share/doc/postfix-2.6.6/samples 

# readme_directory: The location of the Postfix README files. 
# 
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES 


#For TLS set up For xyz.com 

# TLS parameters 
smtpd_tls_CAfile      = /etc/postfix/tls/xyz_com.crt 
smtpd_tls_cert_file      = /etc/postfix/tls/xyz_com.crt 
smtpd_tls_key_file      = /etc/postfix/tls/xyz_com.key 
smtpd_use_tls       = yes 
smtpd_tls_session_cache_database  = btree:${queue_directory}/smtpd_scache 
smtp_tls_CAfile       = /etc/postfix/tls/xyz_com.crt 
smtp_tls_cert_file      = /etc/postfix/tls/xyz_com.crt 
smtp_tls_key_file      = /etc/postfix/tls/xyz_com.key 
smtp_tls_session_cache_database   = btree:${queue_directory}/smtp_scache 
smtp_use_tls       = yes 

smtpd_tls_received_header    = yes 
smtpd_tls_ask_ccert      = yes 
smtpd_tls_loglevel      = 1 
tls_random_source      = dev:/dev/urandom 

# TLS end 


# Added 16 April,2015 
smtpd_sasl_auth_enable = yes 
smtpd_sasl_security_options = noanonymous 
smtpd_sasl_local_domain = $myhostname 


# Added for DKIM 

smtpd_milters   = inet:127.0.0.1:8891 
non_smtpd_milters  = $smtpd_milters 
milter_default_action = accept 
#milter_protocol   = 2 

Ранний ответ будет высоко оценен.

Благодаря

ответ

0

Проще говоря, вы не можете делать то, что вы пытаетесь сделать.

Вы пытаетесь сказать, что ваш сервер имеет право отправлять электронную почту в виде адреса Yahoo или Gmail без санкции Yahoo или Google. Если бы это было разрешено, то любой мог бы встать на SMTP-сервер и отправить электронную почту, маскируясь как любой адрес Yahoo или Gmail (или, если на то пошло, любой другой адрес электронной почты). Это называется фишинг, и это очень плохо.

Amazon SES может (сорт) уйти с этим, как вы заметили выше. Но даже эта дыра закрывается, так как больше крупных отправителей принимают DMARC для блокировки такого рода фишинговых писем. С DMARC p = отклонить политику на месте, даже электронная почта Amazon SES получает отскок. Крупные поставщики почтовых услуг (например, Amazon SES) в настоящее время находятся в процессе адаптации к этим антифишинговым стандартам.

Ваш лучший вариант - отправить электронную почту исключительно из доменов, которые вы контролируете и рассматриваете это как ограничение технологии.

+0

Спасибо за ваши предложения. Но это я уже знаю. Я ищу техническую помощь для ее достижения. – Riky