Set a senders email address for Plesk notifications
I am sending mails from an external server, my Plesk Servers do not even have mail setup. Plesk offers the option to send notification mails (like backup errors,...) using an external SMTP server, but all mails get sent using the mail address
root@servername.domain.tld
My SMTP server does not have this mail address or even domain setup. I would like to set a custom email address for Plesk to send mails from in order to not have to set up a domain and mail address for every Plesk server.
This feature has been added to Plesk version 18.0.45. It can be set in the panel.ini file.
--
PD
-
Giuseppe Tripiciano commented
No, you can keep using msmtp and edit those.
-
Lasse Balsvad commented
Yes. I know you can customize all and have it changes in the msmtprc file as well. We have discussed this since 2016 in other threads I think, but I still think it should be build into the admin so it more user friendly for everybody - even if you are using MSMTP.
But what you are suggesting is actually to use Postfix only - and not MSMTP?
-
Giuseppe Tripiciano commented
That warning exists only because MSMTP setups in first place didn't have any issue to begin with since they don't host a mailserver themselves.
If you watn to change other mails, for example the backup one, you don't change panel.ini but NOTIFICATION_MAIL_FROM in /usr/local/psa/admin/share/pmmcli/pmmcli-rc. -
Lasse Balsvad commented
So maybe you could tell me how it then can work for MSMTP when the Plesk Team has put a warning saying: The solution below works only if Postfix/Qmail is installed on the server and is not relevant for MSMTP (relay only)
Only a few notifications are currently sent from the e-mail address specified in panel.ini, but a lot of other automatic notifications/mails are sent from psaadm@host.domain.tld or somthingelse@host.domain.tld - which is NOT correct.
-
Giuseppe Tripiciano commented
It works. You just don't know how to use it.
-
Lasse Balsvad commented
Please reopen this suggestion as it's a link to a solutions which is NOT working with and external SMTP server / MSMTP. It has taking so many years to fix such a small thing.
-
Giuseppe Tripiciano commented
@afuego no, the panel.ini senderaddress is for notifications only. pmmcli-rc is for backup tacks only. everything else is managed by psa.conf mail settings. however I'm not sure psa.conf frommail works with msmtp
-
afuego commented
@Giuseppe are you saying you accomplish getting all the notifications from a valid email address [not root (cron deamon)] by adding the following into the Panel.ini
[notification]
senderAddress=<custom email address>Plesk support doesnt recommend the Postfix relay due can be overwriten by a Plesk update.
-
afuego commented
@Giuseppe thank you for the information, I'll have to research this situation further. Have great day!
-
Giuseppe Tripiciano commented
@afuego i use it all the time, i have over an hundred scheduled task. and over 50 servers running on plesk (i run an ISP). all my notifications have my custom email address in the from field. when i say all i mean notifications, pmmcli tasks, psa tasks, and cron. so you can definitely change them, even on msmtp (which anyway is not recommended using for system mails, just configure postfix to relay only them)
-
afuego commented
@Giuseppe I have been talking with Plesk support for weeks regarding this matter, using Plesk as mail server is not the best scenario.
It seems like you have not used the feature for Scheduled Tasks that's why you are unaware of the problem.
-
Giuseppe Tripiciano commented
@afuego you can change that, i don't get any email from root. you need to change different conf files.
also using msmtp is not a good way to manage your server. you should always keep a local mailserver working. -
afuego commented
@Giuseppe Scheduled Task emails, they come from root (cron deamon)
Plesk does not offer any way to change this.
Please vote here too: https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/17680498-msmtp-change-sender
-
Giuseppe Tripiciano commented
yes it's already implemented, but senderaddress is for notifications. if you are talking about backup tasks you can set it in another file. and another one for plesk ones.
it's already all customizable, you just need to read the manual to find which one you need to modify. -
afuego commented
@Kaspar is not implemented yet.
[notification]
senderAddress=<custom email address>Does not override Scheduled Tasks emails, they still come FROM email address: root (cron deamon)
-
Kaspar commented
This feature has been added to Plesk version 18.0.45. It can be set in the panel.ini file. From the change log:
Plesk administrator can now specify a custom email address to be used as a mail relay (the address will be used as the sender address for all Plesk email notifications found in “Tools & Settings” > “Notifications”). Using an email address with a properly configured domain (DKIM, SPF records, etc.) would ensure that the notifications would not be treated as spam. To do so, add the following lines to the panel.ini file:
[notification]
senderAddress=<custom email address> -
Dario commented
+1
-
TRILOS new media commented
@vimobe: This is not related to this topic in any way, neither as a cause, nor as a solution.
-
vimobe commented
My domain and ip blacklisted due to frequent notifications detected as spam/junk
This is annoying
-
Giuseppe Tripiciano commented
@mike No they don't. They work just fine for me. You need to learn how to configure a mailserver with proper spf\dkim records.