掲示板

How to remove mail configuration from liferay database?

9年前 に Rodrigo Lins によって更新されました。

How to remove mail configuration from liferay database?

New Member 投稿: 3 参加年月日: 14/11/04 最新の投稿
Hi all!

I was trying to configure our mail server in Liferay using front end. However, for the nature of our mail servers, I had to make all configuration using portal-ext.properties.

So, now I have to remove the mail server configuration from my Liferay, but there is nothing in the frontend to remove mail configurations. If I remove everything from mail configuration form (from Admin > Control Panel > Server Administration > Mail) having the portal-ext.properties properly configured, and I try to send a mail, Liferay gives me an error message saying that I don't have a properly configured mail server. "Failed to connect to a valid mail server. Please make sure one is properly configured. Could not connect to SMTP host: localhost, port: 0".

I guess I should have to delete this configuration directly from my database, and here comes the question. Which table holds this information?

Thanks in advance,
Rodrigo.
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: How to remove mail configuration from liferay database?

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
The mail settings are only used from portal-ext.properties once, during initial portlet setup. From there they are stored as settings in the database, and only from there will Liferay try to access them.

Deleting them from the database will not make Liferay revert back to the portal-ext.properties, it will just continue assuming that you do not have mail configured.

To affect the change you're looking for will require an EXT plugin that changes the portal core to always go to portal-ext.properties, not such an easy change.

Some might suggest changing the DB directly, but Liferay (most likely) caches this information at startup and will not go back to the DB to look for changes (since the interface manages the settings anyway), so this too will end in failure.

Perhaps you could share more info on why the mail settings change? All the installations I've done, you set up the mail server once and then forget about it, at least until someone decides to move the mail server, but even that is once in a blue moon...
9年前 に Rodrigo Lins によって更新されました。

RE: How to remove mail configuration from liferay database?

New Member 投稿: 3 参加年月日: 14/11/04 最新の投稿
Thanks David for your answer.

But I found where it was saved in the database. It was in the table PortalPreferences.
I just remove the line which represented my mail configuration, reseted the server and everything is working fine right now.

Thanks again.
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: How to remove mail configuration from liferay database?

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
Have you checked the database after restarting? I'd bet that the DB has been reloaded with values from portal-ext.properties and that changing portal-ext.properties has no effect on the mail settings...
9年前 に Rodrigo Lins によって更新されました。

RE: How to remove mail configuration from liferay database?

New Member 投稿: 3 参加年月日: 14/11/04 最新の投稿
Hi David,
I just checked my database and there is nothing in there regarding mail configuration.
Liferay is using only the settings from the property file.
Everything is working fine now.

Thanks again for your help.
Rodrigo.
thumbnail
9年前 に David H Nebinger によって更新されました。

RE: How to remove mail configuration from liferay database?

Liferay Legend 投稿: 14918 参加年月日: 06/09/02 最新の投稿
Hey, great! I've been carrying this belief for quite awhile now, so I'm going to have to dig in and check the code!