Allow configuration of the sendmail command #3480

Closed
opened 2026-02-05 06:50:37 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @someplace53 on GitHub (Jan 27, 2023).

Originally assigned to: @ssddanbrown on GitHub.

Describe the feature you'd like

either a configuration to change the used sendmail command or a selector to change the sendmail configuration.

e.g. for us we need something like /usr/sbin/sendmail -t -i instead of /usr/sbin/sendmail -bs

Describe the benefits this would bring to existing BookStack users

More flexibility to mail configuration.

In our case we would be able to use sendmail from bookstack without changing bookstack code or implementing a new selinux module.

Can the goal of this request already be achieved via other means?

Yes, you can change the contents of /app/Config/mail.php. But this needs to be change with every update of Bookstack and therefore not a good solution.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundemental request

How long have you been using BookStack?

0 to 6 months

Additional context

No response

Originally created by @someplace53 on GitHub (Jan 27, 2023). Originally assigned to: @ssddanbrown on GitHub. ### Describe the feature you'd like either a configuration to change the used sendmail command or a selector to change the sendmail configuration. e.g. for us we need something like `/usr/sbin/sendmail -t -i` instead of `/usr/sbin/sendmail -bs` ### Describe the benefits this would bring to existing BookStack users More flexibility to mail configuration. In our case we would be able to use sendmail from bookstack without changing bookstack code or implementing a new selinux module. ### Can the goal of this request already be achieved via other means? Yes, you can change the contents of [/app/Config/mail.php](https://github.com/BookStackApp/BookStack/blob/development/app/Config/mail.php). But this needs to be change with every update of Bookstack and therefore not a good solution. ### Have you searched for an existing open/closed issue? - [X] I have searched for existing issues and none cover my fundemental request ### How long have you been using BookStack? 0 to 6 months ### Additional context _No response_
OVERLORD added the 🔨 Feature Request📖 Docs Update labels 2026-02-05 06:50:37 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jan 27, 2023):

Hi @someplace53,
Thanks for the request.

Could you explain how the options for sendmail relate to SELinux?
I had it in mind that options used for sendmail were really just down to the MTA/Sendmail-implementation that's active, and that most modern actually used implementations support the -bs params.

Sorry if I'm asking something obvious, I've always had trouble understanding some of the corners of the linux system world, especially SELinux.

@ssddanbrown commented on GitHub (Jan 27, 2023): Hi @someplace53, Thanks for the request. Could you explain how the options for sendmail relate to SELinux? I had it in mind that options used for sendmail were really just down to the MTA/Sendmail-implementation that's active, and that most modern actually used implementations support the `-bs` params. Sorry if I'm asking something obvious, I've always had trouble understanding some of the corners of the linux system world, especially SELinux.
Author
Owner

@someplace53 commented on GitHub (Jan 31, 2023):

Sorry, for the long respond time.

Sadly i am no SELinux expert myself, I just have some base knowledge and am able to navigate the error messages (mostly). And I would say most questions concerning SELinux are not obvious :-)

In this case, the problem is that sendmail -bs tries to run smtpd, which is forbidden from a httpd context by SELinux. Without SELinux or from another context this should work.

Error message from maillog:

postfix/sendmail[5334]: fatal: execv /usr/libexec/postfix/smtpd: Permission denied

Error message from SELinux (sealert):

SELinux is preventing /usr/sbin/sendmail.postfix from execute access on the file smtpd. [...]

I can give you the rest of the sealtert message, but I would have to redact some things, and I do not see any useful information for you

@someplace53 commented on GitHub (Jan 31, 2023): Sorry, for the long respond time. Sadly i am no SELinux expert myself, I just have some base knowledge and am able to navigate the error messages (mostly). And I would say most questions concerning SELinux are not obvious :-) In this case, the problem is that `sendmail -bs` tries to run smtpd, which is forbidden from a httpd context by SELinux. Without SELinux or from another context this should work. Error message from maillog: ``` postfix/sendmail[5334]: fatal: execv /usr/libexec/postfix/smtpd: Permission denied ``` Error message from SELinux (sealert): ``` SELinux is preventing /usr/sbin/sendmail.postfix from execute access on the file smtpd. [...] ``` I can give you the rest of the sealtert message, but I would have to redact some things, and I do not see any useful information for you
Author
Owner

@ssddanbrown commented on GitHub (Feb 17, 2023):

Thanks @someplace53 for the extra info.
Functionality added in af31a6fc1b, will be part of the next feature release.

Docs notes

  • Update mail docs page with mention of this option.
@ssddanbrown commented on GitHub (Feb 17, 2023): Thanks @someplace53 for the extra info. Functionality added in af31a6fc1b700df5c0a4264571946d8984ff9321, will be part of the next feature release. ### Docs notes - Update mail docs page with mention of this option.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3480