# Email Configuration Issue

**URL:** <https://community.passbolt.com/t/email-configuration-issue/5089>\
**Category:** Uncategorized\
**Created:** [March 15, 2022, 8:12am UTC](https://community.passbolt.com/t/email-configuration-issue/5089 "2022-03-15T08:12:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![abhimanyu](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@abhimanyu](https://community.passbolt.com/u/abhimanyu)\
**Post date:** [March 15, 2022, 8:12am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/1 "2022-03-15T08:12:01Z")

</div>

Wile configuring email i got this error  
Email could not be sent: **stream\_socket\_client(): unable to connect to tcp://{domain}:587 (Permission denied)**  
while using ./cake command to send email i got email but email configuration is default  
Host: localhost  
Port: 25  
Username:  
Password: \*\*\*\*\*\*\*\*\*  
TLS: false  
Sending email from: Passbolt [you@localhost](mailto:you@localhost)  
Sending email to: {mail}@gmail.com

i change the config file on passbolt.default.php…but not working i tried to rename file to passbolt.php  
as per documentation in [Email/SMTP Configuration](https://community.passbolt.com/t/email-smtp-configuration/2011)  
i cannot find config/passbolt.php

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [March 15, 2022, 8:29am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/2 "2022-03-15T08:29:39Z")

</div>

Hi @abhimanyu 👋 and welcome to passbolt community forum 🤝

Can you tell us on which operating system you are running passbolt and the documentation you followed ?

If running on a rpm Linux distro, can you give us the output of the `sestatus` command ?

> [@abhimanyu](#):
>
> Sending email from: Passbolt [you@localhost](mailto:you@localhost)  
> Sending email to: {mail}@gmail.com

If you are using gmail as SMTP provider, you can’t use `you@localhost` without modify smtp settings, as explained in our [email troubleshooting page](https://help.passbolt.com/faq/hosting/why-email-not-sent#reason-5-gmail-smtp-relay-not-accepting-localhost-as-ehlo)

Cheers,

---

<div class="post-metadata">

**Author:** ![abhimanyu](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@abhimanyu](https://community.passbolt.com/u/abhimanyu)\
**Post date:** [March 15, 2022, 8:34am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/3 "2022-03-15T08:34:01Z")

</div>

@AnatomicJC  
I am running on centos 7.  
i simply install my application shown on homepage and tried to setup smtp. I am not using gmail as SMTP provider.  
Email setting in /etc/passbolt/passbolt.default.php

// Email configuration.  
‘EmailTransport’ =\> [  
‘default’ =\> [  
‘host’ =\> ‘[mail.domain.com](http://mail.domain.com)’,  
‘port’ =\> 465,  
‘username’ =\> ‘it@domain.com’,  
‘password’ =\> ‘i\*\*\*\*\*\*’,  
// Is this a secure connection? true if yes, null if no.  
‘tls’ =\> null,  
//‘timeout’ =\> 30,  
//‘client’ =\> null,  
//‘url’ =\> null,  
],  
],  
‘Email’ =\> [  
‘default’ =\> [  
// Defines the default name and email of the sender of the emails.  
‘from’ =\> [‘it@domain.com’ =\> ‘Passbolt’],  
//‘charset’ =\> ‘utf-8’,  
//‘headerCharset’ =\> ‘utf-8’,

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [March 15, 2022, 8:42am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/4 "2022-03-15T08:42:30Z")

</div>

Hum ok I understand, you have followed this:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/passbolt/original/2X/c/cef9fcd1809609bf4e0615a0cc7f4b76db3d883d.png)

It is a quick how-to, the full documentation is here: [Passbolt Help | Install Passbolt CE on CentOS 7](https://help.passbolt.com/hosting/install/ce/centos.html)

Once the package installed, you have to launch the configuration tool:

```auto
sudo /usr/local/bin/passbolt-configure

```

I will report that to the website team.

Best,

---

<div class="post-metadata">

**Author:** ![abhimanyu](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@abhimanyu](https://community.passbolt.com/u/abhimanyu)\
**Post date:** [March 15, 2022, 8:46am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/5 "2022-03-15T08:46:26Z")

</div>

@AnatomicJC  
i already did that. Once i reached at email setup page i entered all parameters and test but i got  
Email could not be sent: **stream\_socket\_client(): unable to connect to tcp://{domain}:587 (Permission denied)**

this error.

---

<div class="post-metadata">

**Author:** ![AnatomicJC](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.passbolt.com/anatomicjc/32/962_2.png) [@AnatomicJC](https://community.passbolt.com/u/AnatomicJC)\
**Post date:** [March 15, 2022, 8:52am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/6 "2022-03-15T08:52:26Z")

</div>

Ok perfect. Can you check if selinux is enabled with the `sestatus` command ?

We have a known issue with the current passbolt-selinux package, there is a missing rule for allowing communication with standard smtp ports.

The issue has been fixed but the new package is not yet published. You can try to reduce selinux hardening and check if it is your issue.  
Open `/etc/selinux/config` and replace **enforcing** with **permissive** and reboot your server to apply.

I will keep you posted when the new passbolt-selinux package will be released.

Best,

---

<div class="post-metadata">

**Author:** ![abhimanyu](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@abhimanyu](https://community.passbolt.com/u/abhimanyu)\
**Post date:** [March 15, 2022, 10:35am UTC](https://community.passbolt.com/t/email-configuration-issue/5089/7 "2022-03-15T10:35:25Z")

</div>

@AnatomicJC  
Thank you that problem has been solved. Now receiving SMTP time out  
when i send test mail via cli using ./cake to gmail it sent

---

<div class="post-metadata">

**Author:** ![jalbert](https://avatars.discourse-cdn.com/v4/letter/j/5daacb/32.png) [@jalbert](https://community.passbolt.com/u/jalbert)\
**Post date:** [March 16, 2022, 12:51pm UTC](https://community.passbolt.com/t/email-configuration-issue/5089/8 "2022-03-16T12:51:50Z")

</div>

Yes, It’s work for me!
