Primeiro, aqui estão as entradas que eu adicionei / modifiquei no arquivo /etc/postfix/main.cf :
mydomain = domain.com
myorigin = $mydomain
relayhost = email-smtp.us-east-1.amazonaws.com:25
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl/amazon-ses
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
header_checks = regexp:/etc/postfix/header_checks
Agora, se eu enviar um e-mail de teste assim ...
$ sudo sendmail [email protected]
To: [email protected]
From: [email protected]
Subject: Test email!
This is just a test email.
.
e verifique o registro de e-mail ( /var/log/mail.log ), eu vejo isto:
Feb 17 04:23:16 hostname postfix/pickup[6226]: B3DD4137ED: uid=0 from=<root>
Feb 17 04:23:16 hostname postfix/cleanup[6230]: B3DD4137ED: replace: header From: [email protected] from local; from=<[email protected]> to=<[email protected]>: From: "WebsiteName Alerts (no reply)" <[email protected]>
Feb 17 04:23:16 hostname postfix/cleanup[6230]: B3DD4137ED: message-id=<[email protected]>
Feb 17 04:23:16 hostname postfix/qmgr[6144]: B3DD4137ED: from=<[email protected]>, size=353, nrcpt=1 (queue active)
Feb 17 04:23:18 hostname postfix/smtp[6232]: B3DD4137ED: to=<[email protected]>, relay=email-smtp.us-east-1.amazonaws.com[107.22.250.234]:25, delay=25, delays=24/0.03/0.93/0.58, dsn=2.0.0, status=sent (250 Ok 0000013ce6644ae6-69927d25-c4e1-4f25-8ad4-b85b59318e84-000000)
Feb 17 04:23:18 hostname postfix/qmgr[6144]: B3DD4137ED: removed
Como você pode ver, o log mostra [email protected]
e [email protected]
como from
, embora eu tenha declarado especificamente [email protected]
no comando sendmail
.
Isso também, apesar de modificar meu arquivo / etc / aliases da seguinte forma:
# /etc/aliases
mailer-daemon: [email protected]
postmaster: [email protected]
nobody: [email protected]
hostmaster: [email protected]
usenet: [email protected]
news: [email protected]
webmaster: [email protected]
www: [email protected]
ftp: [email protected]
abuse: [email protected]
noc: [email protected]
security: [email protected]
root: [email protected]
Então, a pergunta é: como faço [email protected]
o endereço de e-mail padrão para o sistema? Dito de outra forma, como eu mudo o endereço de e-mail do usuário root de [email protected]
para [email protected]
?
Caso isso seja importante, meu sistema está rodando Debian 7 (Wheezy) 64-bit.