Postfix configuration

I have installed the last version of NC on a clear minimal CentOS 7 using this tutorial: How to Install Nextcloud with Nginx and PHP7-FPM on CentOS 7.

I set the admin mail and configure the mail parameters for notifications but the test fails.

Can anybody explain me how to configure postfix in order to fix the issue… or can anybody suggest me an alternative solution?

Thanks

Setting mail is covered in the documentation: E-mail configuration
How does the test fail? Is postfix even installed, running? Is it necessary have it running yourself or can you maybe use other credentials?

When I test the admin mail the error Connection could not be established with host smtp.gmail.com [Permission denied #13]) returns.

Postfix is installed and running, but probably I have to configure it… and I don’t know how to do it

What are your current settings? (don’t show any sensitive info)

Where can I check my current settings? I’m not an expert of linux

Sorry, I wasn’t clear enough, I meant the e-mail settings in Nextcloud.

If you are an expert or not, as long as you are willing to learn, you’ll get to the point where you want to be. :slight_smile:

I would advice not to try and configure postfix for now. Running postfix is not needed for Nextcloud. If you configure postfix in a not-correct way, you’ll end up being used by spammers and getting banned by your provider. For now, using a gmail account is suffice (even though you might want to switch to a more privacy-prone e-mailprovider :wink: ).

The attached image show my configuration.

screenshot

Consider I have the same problem with another web application (SuiteCRM) installed on the same CentOS 7 server

Can the problem depend from the DNS Management of my domain? I only configure the DNS for my domain and subdomain

The “Permission denied” is indicating that the script isn’t allowed to do something. You’ll need to dig in the logfile of php-fpm (persumably in /var/log/) and see if you find something related. A look in the log of nginx might be worth trying also.

Oh, I see in the tutorial you followed, that they give instructions about SELinux, but just some basics.

You need to let SELinux allow access to smtp if you haven’t done already. It would be wise to read the whole page of that link.

Do you mean I have to lunch the command setsebool -P httpd_can_sendmail on on the terminal and the problem will be fixed?

Yes, most likely.

Great!!! It fix the same issue for SuiteCRM also
:star_struck::star_struck::star_struck:

Thanks a lot

1 Like