No arquivo conf, acho que o mydestination deve se parecer com isso
mydestination = localhost, localhost.localdomain
Depois de fazer alterações, você precisa recarregar o conf
service postfix reload
Estou tentando enviar e-mails da minha máquina usando o Gmail como remetente. Eu segui este tutorial: link e quando tento enviar um email a partir da linha de comando :
echo "Test mail from postfix" | mail -s "Test Postfix" [email protected]
Eu não recebi nenhuma mensagem de erro, apenas um e-mail / var / mail / root que possui:
From MAILER-DAEMON Wed Jun 8 12:29:25 2016
Return-Path: <>
X-Original-To: root@monitor
Delivered-To: root@monitor
Received: by monitor (Postfix)
id 68F8C22768; Wed, 8 Jun 2016 12:29:25 +0200 (CEST)
Date: Wed, 8 Jun 2016 12:29:25 +0200 (CEST)
From: MAILER-DAEMON@monitor (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
To: root@monitor
Auto-Submitted: auto-replied
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="66753226CD.1465381765/monitor"
Message-Id: <20160608102925.68F8C22768@monitor>
This is a MIME-encapsulated message.
--66753226CD.1465381765/monitor
Content-Description: Notification
Content-Type: text/plain; charset=us-ascii
This is the mail system at host monitor.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<[email protected]>: unknown user: "user"
--66753226CD.1465381765/monitor
Content-Description: Delivery report
Content-Type: message/delivery-status
Reporting-MTA: dns; monitor
X-Postfix-Queue-ID: 66753226CD
X-Postfix-Sender: rfc822; root@monitor
Arrival-Date: Wed, 8 Jun 2016 12:29:25 +0200 (CEST)
Final-Recipient: rfc822; [email protected]
Action: failed
Status: 5.1.1
Diagnostic-Code: X-Postfix; unknown user: "user"
--66753226CD.1465381765/monitor
Content-Description: Undelivered Message
Content-Type: message/rfc822
Return-Path: <root@monitor>
Received: by monitor (Postfix, from userid 0)
id 66753226CD; Wed, 8 Jun 2016 12:29:25 +0200 (CEST)
subject: Backup Error!
from:backup@server01
Message-Id: <20160608102925.66753226CD@monitor>
Date: Wed, 8 Jun 2016 12:29:25 +0200 (CEST)
--66753226CD.1465381765/monitor--
Configuração (postconf -n):
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = monitor, localhost.localdomain, , localhost, gmail.com
myhostname = monitor
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
Alguém pode me ajudar?
Obrigado
No arquivo conf, acho que o mydestination deve se parecer com isso
mydestination = localhost, localhost.localdomain
Depois de fazer alterações, você precisa recarregar o conf
service postfix reload