Postfix从主机名发送邮件

时间:2016-03-22 10:05:39

标签: smtp subdomain postfix-mta hostname squirrelmail

所有人,

我有关于postfix及其发送邮件的问题。 我已正确设置,并且能够发送并非垃圾邮件的邮件。

但出于某种原因,当我显示邮件的详细信息时(例如,在gmail上),它会显示一个发件人地址: user@mail.domain.com

我希望它成为 user@domain.com 我怎么会这样做?

我的另一个问题是如何加密电子邮件?没有它直接进入垃圾邮件文件夹?

我使用 mailutils squirrelmail 的方式发送邮件无法 发送邮件。然而,squirrelmail可以查看邮件。 我使用Debian Jessie作为我的服务器

我的后缀主文件:

myhostname = mail.domain.com
mydomain = domain.com
myorigin = $mydomain
mydestination = $myhostname, $mydomain, localhost, localhost.$mydomain
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
relay_domains = $mydestination
syslog_name=postfix/submission

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

smtpd_tls_cert_file=/etc/letsencrypt/live/domain.com/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/domain.com/privkey.pem
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_security_level = may
#smtp_tls_security_level = may
smtpd_tls_protocols = !SSLv2, !SSLv3
smtpd_tls_wrappermode=no

smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth
smtpd_sasl_auth_enable=yes
milter_macro_daemon_name=ORIGINATING
#Security and Anti-Spam cinfig
policy-spf_time_limit = 3600s
smtpd_helo_required = yes

smtpd_recipient_restrictions =
 reject_non_fqdn_recipient
 reject_unknown_recipient_domain
 permit_mynetworks
 permit_sasl_authenticated
 reject_unauth_destination
 check_policy_service unix:private/policy-spf
 check_policy_service inet:127.0.0.1:10023

smtpd_helo_restrictions =
 permit_mynetworks
 reject_non_fqdn_helo_hostname
 reject_invalid_helo_hostname

smtpd_client_restrictions=
 permit_mynetworks
 permit_sasl_authenticated
 reject_unknown_client_hostname

smtpd_data_restrictions =
 reject_unauth_pipelining

#DKIM
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

local_recipient_maps = proxy:unix:passwd.byname $alias_maps

1 个答案:

答案 0 :(得分:1)

我只能回答你的第一个问题,你想要"地址重写"规则,你可以在这里找到如何设置它们:

http://www.postfix.org/ADDRESS_REWRITING_README.html