Moorfleeter Deich 216, 22113 Hamburg +49 1774661716 info@bastcom.de Mo. - Fr.: 09:00 - 18:00
Designer
ITWeb Knowledge

Sendmail postfix Permission denied

Introduction

When creating a new user in Joomla, you may encounter an error related to email sending permissions. This issue often arises due to misconfigured SELinux policies that prevent Apache (httpd) from sending emails via Postfix. This guide explains how to diagnose and resolve this issue.

1. Identifying the Issue

Check the Apache error log to confirm if the issue is related to Postfix permissions:

tail -f /var/log/httpd/error_log

If you see an error message like this:

sendmail: fatal: chdir /var/spool/postfix: Permission denied

it indicates that SELinux is blocking Apache from sending emails.

2. Solution

Step 1: Verify Postfix is Running

Ensure that Postfix is active and running:

service postfix status

Step 2: Check SELinux Sendmail Permission

Run the following command to check if Apache is allowed to send mail:

getsebool httpd_can_sendmail

If the output is:

httpd_can_sendmail --> off

this means that Apache is restricted from sending emails.

Step 3: Enable Permission Temporarily

To enable the permission for the current session, run:

setsebool httpd_can_sendmail 1

Step 4: Enable Permission Permanently

To make the change persistent across reboots, use:

setsebool -P httpd_can_sendmail 1

By following these steps, Joomla should be able to send emails without encountering permission issues.