Noob on PostFix : how to get email notifications ?

Bristow

Member
Oct 4, 2019
12
3
8
47
Hello to all,

I have 2 proxmox servers and I would like to enable email notification on these 2 servers.
My network is very simple and I have a working stmp server.

I have activated in /etc/postfix/main.cf the relayhost to smtp.ac-lyon.fr. But if I do
echo "mail test" | mail -s "proxmox" my@mail

I get the following error:
send-mail : account default not found : no configuration file available.

What can I do ? Thanks in advance !
 

Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
6,829
1,032
164
* please post the journal (especially the logs from postfix) when you run the test.
* else - in general - running `dpkg-reconfigure postfix` should guide you through the setup - and there you can add your smarthost

I hope this helps!
 
  • Like
Reactions: vlad246 and jsterr

Bristow

Member
Oct 4, 2019
12
3
8
47
sorry for the delay. I seem to have a problem with postfix:
Bash:
root@pve1:~# dpkg-reconfigure postfix
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = "fr_FR.utf8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/sbin/dpkg-reconfigure: postfix is broken or not fully installed
root@pve1:~#

not sure what to do... Thanks!
 

Bristow

Member
Oct 4, 2019
12
3
8
47
I found solution.

Fix locale :
Code:
locale-gen fr_FR fr_FR.UTF-8
dpkg-reconfigure locales

Install postfix (not installed :() :
Code:
apt install postfix

Configure postfix
Code:
dpkg-reconfigure postfix

Reload service
Code:
service postfix reload

Test ok with
Code:
echo "mail test" | mail -s "proxmox" my@mail

:)
 

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 your own in 60 seconds.

Buy now!