• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Notification Mails

Dave W

Regular Pleskian
Hello all,
Trying to clean up Plesk notification mails a little, not too bothered about the ones going to admin, but the ones sent to clients need to be tweaked at little.

When an account is added Plesk sends the Notification of the customer creation and Notification of the site creation mails are sent to the client.

The Notification of the customer creation contains links to reset the login pw using the servers IP address rather than its hostname, so the client is sent to an SSL error.

The panel entry point is also shown using the server IP rather than the hostname again directing the client to an SSL error.

Can these be changed to use the hostname instead of the IP address?

Rgds
Dave_W
 
Hi Dave! You mean the {{ get_password_link }} and the {{ panel_link }} tags, right?
The Notification of the customer creation contains links to reset the login PW using the servers IP address rather than its hostname, so the client is sent to an SSL error.
Just to be sure, did you set a hostname for your server? If so, this behavior sounds like a bug to me. I'd recommend submitting a bug report about it.
 
Last edited:
I just tested this on my server and for me the server/panel hostname is used in the links for the {{ get_password_link }} and {{ panel_link }} tags in the notification email for customer creation.
 
Last edited:
Hey Rasp,
Yeah the hostname is set correctly on the server. Strange, I will test on a few other boxes.
Thanks for the testing!
Dave_W
 
Just tested on 3 other Plesk boxes, all are sending IPs as {{ get_password_link }} and {{ panel_link }}.
Are your servers using the default Plesk hostname or is the hostname assigned from Tools&Settings>>Server Settings?
Dave_W
 
That's very strange indeed. For me the hostname set in Tools & Settings > Server Settings is used for the links in the customer creation notification.

According to the notification documentation there is also a {{ hostname }} tag. What happens when you use this tag in a customer creation notification?
 
Hey Rasp,
Yeah I think I might ticket this one and see whats up. {{ hostname }} returns the correct hostname.
This is on CentOS7 in case thats relevant?
Cheers
Dave_W
 
Hey Rasp,
So it seems the notification settings for {{ get_password_link }} and {{ panel_link }} depend on what you last used to successfully log into the server.
In my case I access Plesk using the IP:8443, but if you use hostname:8443 the {{ get_password_link }} and {{ panel_link }} use the servers hostname, odd behaviour.
It can be manually set under Tools & Settings > Customize Plesk URL or use
Code:
plesk bin admin --enable-access-domain "server.example.com"
to access Plesk without the port number using https://server.example.com
Stay well
Dave_W
 
So i need to resurrect this (google search led me to this). Server properly has a hostname set. Just noticed this same problem myself on "customer account creation" e-mails too. As admin i ALWAYS login on via hostname, never IP, since the server is properly secured with a Let's Encrypt certificate. Since the issue happens when creating a NEW user, the logic that {{ get_password_link }} changes depending on what i last used to login means that it should have generated a link using the hostname. It doesn't. It generates a link using the server IP. This triggers an SSL privacy warning when clicking on it and de-facto renders the self-activation function of plesk useless, nobody in their right mind as a non-tech savvy user will click on a link that and then "accept risk and continue" to configure a password.

Customizing the plesk url doesn't apply, as {{ hostname }} properly renders the actual server hostname
 
So i need to resurrect this (google search led me to this). Server properly has a hostname set. Just noticed this same problem myself on "customer account creation" e-mails too. As admin i ALWAYS login on via hostname, never IP, since the server is properly secured with a Let's Encrypt certificate. Since the issue happens when creating a NEW user, the logic that {{ get_password_link }} changes depending on what i last used to login means that it should have generated a link using the hostname. It doesn't. It generates a link using the server IP. This triggers an SSL privacy warning when clicking on it and de-facto renders the self-activation function of plesk useless, nobody in their right mind as a non-tech savvy user will click on a link that and then "accept risk and continue" to configure a password.

Customizing the plesk url doesn't apply, as {{ hostname }} properly renders the actual server hostname

I'm trying to fix an issue with {{ panel_link }} showing the wrong hostname too. The hostname is set correctly in Tools & Settings > Server Settings. Do those templates need to be regenerated manually after hostname changes? (The hostname that's showing was correct a few years ago before a hardware swap)
 
They shouldn't need regenerating, this is a bug in plesk/how the templates process variables. {{ get_panel_link }} pulls the server IP, not the hostname.
 
They shouldn't need regenerating, this is a bug in plesk/how the templates process variables. {{ get_panel_link }} pulls the server IP, not the hostname.

Thanks for the reply. My template is set to {{ panel_link }} not {{ get_panel_link }} and it does contain a hostname, not an IP, it's just showing a previous hostname, not the current hostname which is what leads me to think there may be caching/generation invovled. i did verify that I haven't created any custom templates that may have static content. It'd be nice if the Notification preview feature showed the processed variable contents.
 
It shouldn't contain a hostname, just that variable. That's in your case problem nr 1. Plesk then SHOULD in normal behavior automatically fun in the proper hostname on-the-fly when that template gets triggered. It doesn't, that's problem nr 2, which we both have. That variable pulls the server IP, not the hostname
 
It shouldn't contain a hostname, just that variable. That's in your case problem nr 1. Plesk then SHOULD in normal behavior automatically fun in the proper hostname on-the-fly when that template gets triggered. It doesn't, that's problem nr 2, which we both have. That variable pulls the server IP, not the hostname
Right.
1. The template contains the variables.
2. the variable IS being populated with a hostname (not an IP in my case), just not the correct/current one specified in Plesk's Server Settings

My template for the customer creation notification contains this..
To obtain your password, please proceed to {{ get_password_link }}
Panel entry point: {{ panel_link }}

but when the notification goes out it looks like
To obtain your password, please proceed to https://my.oldhostname.com:8443/[email protected]&login_name=clientdomain.org
Panel entry point: https://my.oldhostname.com:8443

I searched the mysql "psa" database and found the old hostname there for the "param" "pleskHttpHost"
SELECT * FROM `misc` WHERE `param` LIKE '%host%'

It looked like "my.oldhostname.com:8443"

After I updated that db row my notification emails are now correct!

Hopefully that makes it clear what's happening for me and helps you identify the same issue. It must be a bug that changing the plesk hostname doesn't update that pleskHttpHost value in the db.
 
In mine that variable isn't being populated AT ALL, it pulls the server IP, which then obviously when clicked on, triggers an SSL security warning as certificates are assigned on hostname not IP.

The {{ hostname }} does get properly filled in, so it's an issue with the specific {{ get_password_link }} variable
 
Why is this marked resolved?

If I check the PSA db I get:
Code:
select * from misc where param='pleskHttpHost';

+---------------+---------------------+
| param         | val                 |
+---------------+---------------------+
| pleskHttpHost |123.45.67.89:8443 |
+---------------+---------------------+

Notifications are sent to clients from Posfix from as follows:
Code:
This is the mail system at host jovial-smart.123-45-67-89.plesk.page.

Is this a reported as a bug?

I haven't tested other notifications yet.

Rgds
Dave_W
 
Why is this marked resolved?
I previously marked this topic resolved as I thought we (well, you actually) found a solution/workaround for the weird behaviour of the {{ get_password_link }} and {{ panel_link }} links. But the issue still persists? If so, feel free to submit a bug report.

I just had another go at trying to reproduce this issue on a new machine. But so far I am not really successful at reproducing this issue.
 
Hey Rasp,

Ah ok, I was wondering how it was marked resolved. Yeah Ive been up the walls literally. I'll dig deeper into this.

Cheers
Dave_W
 
Back
Top