使用postfix

时间:2016-09-10 07:38:08

标签: ubuntu amazon-web-services mutt postfix

我正在尝试在运行ubuntu的aws实例上配置我的电子邮件服务器。以为是以postfix开头。我已经很好地配置了postfix,我可以从我的aws实例发送电子邮件到我的Gmail帐户,但我有一些问题:

  • 我已经安装了mutt来检查从我的Gmail帐户或任何帐户发送回我的电子邮件服务器的电子邮件 说“/ home / ubuntu / Mail不是邮箱。”谷歌搜索告诉了这一点 postfix rcvs第一封电子邮件后删除错误。但是我发了一个 回复(也是单独的电子邮件)到ubuntu@mydmain.com(后缀用户) 并且它不会反弹(在gmail中传递报告是可以的 帐户)这意味着电子邮件必须是我的postfix用户rcvd。我很困惑为什么mutt无法显示用户收到的电子邮件。以下是〜/ .muttrc:

    set mbox_type=Maildir
    set realname=ubuntu
    set from =ubuntu@mydomain.com
    set use_from = yes
    set envelope_from = "yes"
    set sendmail="/usr/bin/Postfix"
    set spoolfile="~/Mail"
    set folder="~/Mail"
    set mask=".*"   
    # set mask="!^\.[^.]"  
    set record="+.Sent"
    set mbox="~/Mail"
    set postponed="+.Drafts"
    

    etc / postfix / main.cf:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) 
biff = no 
readme_directory = no

 smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt 
smtpd_tls_key_file = /etc/ssl/private/smtpd.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 = mydomain.com 
alias_maps = hash:/etc/aliases 
alias_database = hash:/etc/aliases 
myorigin = mydomain.com 
mydestination = mydomain.com, etc etc 
localhost relayhost=  
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 
mailbox_size_limit = 51200000  
recipient_delimiter = +  
inet_interfaces = all  
inet_protocols = all 
home_mailbox = ~/Mail  
virtual_alias_maps = hash:/etc/postfix/virtual 
mailbox_command =  
smtpd_sasl_local_domain =  
smtpd_sasl_auth_enable = yes 
smtpd_sasl_security_options = 
noanonymous broken_sasl_auth_clients= yes 
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination 
smtp_tls_security_level = may 
smtpd_tls_security_level = may 
smtpd_tls_auth_only = no  
smtp_tls_note_starttls_offer = yes 
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem  
smtpd_tls_loglevel = 1 
smtpd_tls_received_header = yes  
smtpd_tls_session_cache_timeout = 3600s 
 tls_random_source = dev:/dev/urandom
  1. 第二个问题是我发送的电子邮件与发件人一起作为Ubuntu。

1 个答案:

答案 0 :(得分:0)

仅在home_mailbox = ~/Mail中将home_mailbox = /Mail更改为main.cf

set realname=ubuntu更改为您想要的名称,并将set from =ubuntu@mydomain.com更改为set from="yourname <ubuntu@mydomain.com>"中的~/.muttrc以更改您的显示名称。

我假设您是通过mutt发送电子邮件。