Postfix 始终密件抄送

Postfix 始终密件抄送

我正在尝试为我的 LAN 设置 Postfix 中继系统。我的许多服务都被 WAN 访问阻止,我希望能够从它们那里获取通知。

就目前情况而言,它目前“有效”,但每封电子邮件都附有“Mailer Deamon Undeliverable”电子邮件,因为它发送正确,但总是尝试密件抄送:[email protected]这无法解决。我仅使用@domain.com 发送电子邮件。

这是我的“来宾”虚拟机的配置(通过发送relayhost),我已经尝试了很多,但我没有任何想法,感谢任何帮助。

我想知道我是否可以在relayhost与客人的比赛中以某种方式解决这个问题?

/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)                                                                                                                                                                                                                  
biff = no                                                                                                                                                                                                                                                             
append_dot_mydomain = no                                                                                                                                                                                                                                              
readme_directory = no                                                                                                                                                                                                                                                 
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                                                                                                                                                                                                 
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination                                                                                                                                                                       
myhostname = domain.com                                                                                                                                                                                                                                  
alias_maps = hash:/etc/aliases                                                                                                                                                                                                                                        
alias_database = hash:/etc/aliases                                                                                                                                                                                                                                    
myorigin = domain.com                                                                                                                                                                                                                                    
mydestination = domain.com, localhost                                                                                                                                                                                                                    
relayhost = smtp.domain.com                                                                                                                                                                                                                              
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128                                                                                                                                                                                                             
mailbox_size_limit = 0                                                                                                                                                                                                                                                
recipient_delimiter = +                                                                                                                                                                                                                                               
inet_interfaces = loopback-only                                                                                                                                                                                                                                       
inet_protocols = all                                                                                                                                                                                                                                                  
masquerade_domains = domain.com  

#THINGS I HAVE TRIED...##
#smtp_header_checks = regexp:/etc/postfix/header_checks                                                                                                                                                                                                                          
#transport_maps = hash:/etc/postfix/transport                                                                                                                                                                                                                         
#smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/bad_recipients, permit_mynetworks, reject_unauth_destination, permit                                                                                                                         
#transport_maps = pcre:/etc/postfix/transport_maps                                                                                                                                                                                                                    
#smtp_generic_maps = hash:/etc/postfix/generic                                                                                                                                                                                                                        


/etc/aliases

postmaster:    root                                                                                                                                                                                                                                                   
root: [email protected]                                                                                                                                                                                                                                   
trash: /tmp/mail.trash                                                                                                                                                                                                                                                

答案1

我有一个问题mydestination。我不应该domain.com在那个领域。我将其删除并将其设置为mydestination = hostname hostname.domain.com localhost,现在它按预期工作。

相关内容