[SOLVED] Postfix configuration with a smtp.office365.com smtp server for sending email only

willis

New Member
Jun 1, 2020
2
0
1
45
Hi,

I try to configure Postfix on Proxmox 6.1 to send "backup or smart notifications" to my "Microsoft account".

When I try : << echo "text du message1" | mail -a "From: myaddress@live.fr" -s "test 2" myaddress@live.fr >>
it's ok, I receive the mail

But When I try :
echo "text du message1" | mail -s "test 2" myaddress@live.fr
I don't have any issue but I don't receive the mail.

What's wrong in my configuration ?

My conf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

myhostname=mypc.mylocaldomain

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, mypc.mylocaldomain, localhost.mylocaldomain, localhost
relayhost = [smtp.office365.com]:587
inet_interfaces = all
recipient_delimiter = +

compatibility_level = 2

myorigin = /etc/mailname
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
inet_protocols = all

# enable SASL authentication
smtp_sasl_auth_enable = yes
# disallow methods that allow anonymous authentication.
smtp_sasl_security_options = noanonymous
# where to find sasl_passwd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
# Enable STARTTLS encryption
smtp_use_tls = yes
# where to find CA certificates
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

And the "/etc/mailname" is :
mypc.mylocaldomain

Thank you in advance for your help.
 
Hi, sorry for this stupid "question".
I found my listake.
Hope it will help others : I forgot to configure "Datacenter/option/Sender email". After that it's ok.

1595769237386.png
 
Thanks for coming back and sharing your solution - this will certainly help other users with a similar issue!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!