You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2010-02-03 20:59:32

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Test email under notifications does not work

I am using Fedora 11 and I can send emails via sendmail from terminal and reach my smart host but i can't connect to the SMTP host from glpi.  What am i missing?

Offline

#2 2010-02-03 21:08:48

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Test email under notifications does not work

Is SElinux enabled ?
If yes, you probably must check the httpd_can_sendmail config

getsebool httpd_can_sendmail

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#3 2010-02-04 19:00:23

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Re: Test email under notifications does not work

Ok.  You put me on the correct path to solve the issue.  I looked in the se troublshooter and issued this command:  setsebool -P httpd_can_network_connect=1 while in enforcing mode and it worked.  How can this continue after reboot the machine?  Do I have to use permissive mode or is their a chcon command that I can use?

Offline

#4 2010-02-04 19:02:35

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Test email under notifications does not work

setsebool is permanent with the -P option.

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#5 2010-02-04 19:18:43

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Re: Test email under notifications does not work

It does not stay permanent.  Is there another command that I am missing or do i just need to run it in permissive mode?

Offline

#6 2010-02-04 19:22:36

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Re: Test email under notifications does not work

I issued the command and restarted httpd and it worked.  I rebooted and logged into glpi and tested it but it would not connect again.  I restarted httpd and tested and then it worked.  So how can the command be given on reboot before the httpd service is started?

Offline

#7 2010-02-04 19:48:49

teleute
Member
From: Calgary, AB, Canada
Registered: 2009-10-22
Posts: 93

Re: Test email under notifications does not work

Very strange - by my understanding the -P is definitely meant to persist upon reboot.  Don't suppose there's a change you're running it as non-root?

If you have a system where you can do this, I'd be tempted to check in system-config-securitylevel (under SELinux > Modify policy tab, I think, depending on version) right after a reboot and see what's happening in there.  Failing anything useful showing up there....hmmm....put it in rc.local, maybe?


OS Ubuntu 18.04,  GLPI  9.3.1,  OCS  2.5

Offline

#8 2010-02-04 21:33:34

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Re: Test email under notifications does not work

i ran the command as root.  where can i find system-config-securitylevel?

Offline

#9 2010-02-04 22:30:02

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Re: Test email under notifications does not work

putting '/etc/rc.d/init.d/httpd restart' in rc.local didn't work either.  I have to manually restart the httpd service to send email thru glpi.

Offline

#10 2010-02-05 00:53:59

teleute
Member
From: Calgary, AB, Canada
Registered: 2009-10-22
Posts: 93

Re: Test email under notifications does not work

system-config-securitylevel is just a command - it pulls up a graphical interface to manage the SELinux settings, if you're running RedHat, Fedora, etc...  Not sure if there's similar or equiv in other distros.

What if you put the SELinux command (and then the restart if necessary) in rc.local?


OS Ubuntu 18.04,  GLPI  9.3.1,  OCS  2.5

Offline

#11 2010-02-05 17:31:15

AggieJeff
Member
Registered: 2010-02-02
Posts: 8

Re: Test email under notifications does not work

That worked.  I put the setsebool coomand in rc.local and then the command to restart apache and that did the trick.

Offline

#12 2010-02-05 20:37:51

JMD
GLPI - Lead
Registered: 2004-09-13
Posts: 9,180
Website

Re: Test email under notifications does not work

Ok i close


JMD / Jean-Mathieu Doléans - Glpi-project.org - Association Indepnet
Apportez votre pierre au  projet GLPI   : Soutenir

Offline

Board footer

Powered by FluxBB