Hello all, I'm having trouble configuring backup email notifications. Can anyone point in me the right direction?
Testemails remain stuck in the postqueue.
Command used to test:
postqueue -p output, where it looks like the sender is wrong, should be "me@gmail.com".
Where can I change this?
My /etc/postfix/main.cf
I also configured an app password on my Gmail account that I used in the sasl_passwd file in this format and then used postmap to hash it:
Testemails remain stuck in the postqueue.
Command used to test:
Code:
echo "This is a test email body." | mail -s "Test Subject123" -a "From: me@gmail.com" recipient@domain.com
postqueue -p output, where it looks like the sender is wrong, should be "me@gmail.com".
Where can I change this?
Code:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
39A9C15FF9F 421 Thu Oct 17 10:42:48 root@PM-Backup.local
(lost connection with smtp.gmail.com[66.102.1.109] while receiving the initial server greeting)
recipient@domain.com
-- 0 Kbytes in 1 Request.
My /etc/postfix/main.cf
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
myhostname = PM-Backup.local
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost = [smtp.gmail.com]:465
smtp_use_tls = yes
mynetworks = 127.0.0.0/8
inet_interfaces = loopback-only
recipient_delimiter = +
# Postfix compatibility level
compatibility_level = 2
# Only use IPv4
inet_protocols = ipv4
# Security-related configurations for Gmail SMTP
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
# Gmail SMTP authentication settings
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
I also configured an app password on my Gmail account that I used in the sasl_passwd file in this format and then used postmap to hash it:
Code:
[smtp.gmail.com]:465 me@gmail.com:**** **** **** ****