How to send an e-mail from Proxmox (one single command including address an the message, no manual dot

mes mariusz

New Member
Aug 30, 2020
8
0
1
41
Hi. Maybe this is a very simple question, but...

How to send an e-mail from Proxmox (one single command including address an the message, no manual dot) ?

Normally it-s possible to send from proxmox:

sendmail someone@somewhere.com [enter]
message [enter]
. [enter]


But how to do it in one single command?

I would like to adapt this script, to send messages from UPS (NUT) to myself:

https://wiki.ipfire.org/addons/nut/detailed

But it usus other mail sender (sendemail).

And how to avoid (Proxmox sendmail) this mail came inte spam @ gmail mailbox ?
 
usually you either use a dedicated mail user agent (mua) - e.g. mutt on the commandline.
In script quite often the 'mail' command (as provided by e.g. the bsd-mailx package is used)

check online - there are quite a ton of instructions of sending mail via command-line

And how to avoid (Proxmox sendmail) this mail came inte spam @ gmail mailbox ?
depending on your setup - it could help to send the mails via some official account, where you let PVE's postfix installation authenticate itself against
(there are a few threads in this forum where this is discussed)

I hope this helps!
 

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!