Postfix is configured to send only. And it seems that everywhere it is advised to just update aliases in order to forward the mail of a local user to an external mail, but for some reason I can't
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 local_recipient_maps = $alias_maps mailbox_size_limit = 0 masquerade_domains = mydomain.com mydestination = mail.mydomain.com, localhost.localdomain, localhost mydomain = mydomain.com myhostname = mail.mydomain.com mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) 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 smtpd_use_tls = yes cat / etc / aliases
root: mymail@mydomain.com Save newaliases
But the log doesn't care:
to=<root@mydomain.com>, relay=aspmx.l.google.com[64.233.166.26]:25, delay=0.18, delays=0.03/0/0.07/0.09, dsn=5.1.1, status=bounced (host aspmx.l.google.com[64.233.166.26] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 https://support.google.com/mail/answer/6596 wd2si11913770wjc.24 - gsmtp (in reply to RCPT TO command))