Softaculous


Topic : Sendmail and/or SMTP support for outgoing mails


Posted By: How2Solutions on October 11, 2018, 3:21 pm
My suggestion is about the mails sent from Softaculous (new install, upgrade notification, ...) sent to the user. Currently we can configure a "from" address but the mails are still sent with a envelope-from pointing to root@servername.com.

Could you add some more options so we can also choose sendmail and/or SMTP for this? That way these mails are properly sent with DKIM and SPF records attached.

Posted By: Brijesh on October 12, 2018, 11:40 am | Post: 1
Hi,

We do have the option to use SMTP settings to send emails.

Please go to Softaculous admin panel -> Settings -> "Email" page, choose SMTP from the dropdown for "Mailing Method" and update the SMTP login details and click on "Edit Settings" button.

Please let us know if you need any further information.

-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Posted By: How2Solutions on October 12, 2018, 7:01 pm | Post: 2
Quote From : Brijesh October 12, 2018, 11:40 am
Hi,

We do have the option to use SMTP settings to send emails.

Please go to Softaculous admin panel -> Settings -> "Email" page, choose SMTP from the dropdown for "Mailing Method" and update the SMTP login details and click on "Edit Settings" button.

Please let us know if you need any further information.


Thanks for the quick reply, completely missed that option :)

After playing around with the SMTP setting a bit, it's unfortunately not really usable for me. While a test mail works fine, no mails are being sent when a real user performs an action. I'll assume this is because then Softaculous is running as the user, and my firewall (CSF) blocks all mail which is not sent via SMTP by either root or the users in the list. cPanel has a similar feature. If I disable the firewall the mail is sent.

A system where the mail is put in a queue which is then picked up by a cron job (running as root) that actually sends the mail would overcome this. Likewise, an option to use sendmail would not have this problem.

I can probably work around this by setting up an account for this on each server and use 127.0.0.1 as server, but if you have 10+ servers with Softaculous that's quite some work.

Posted By: Brijesh on October 15, 2018, 9:19 am | Post: 3
Hi,

If you have set the correct email address in "From Email Address" field on Softaculous admin panel -> Settings page the from email in headers should be that email only and not root@servername.com

Or you can use the "pre_mail" filter in Softaculous :
https://www.softaculous.com/docs/Filters#pre_mail

This filter is called before sending any email, you can add your custom headers and copy the filter file across all your servers.

You will receive the email in an array as parameter in the above mentioned filter you can add a key "headers" and set your custom headers. You will receive :
Code
Array
(
  [0] => Array
        (
            [to] => Email of USER
            [subject] => Email SUBJECT
            [message] => Email BODY
        )
)


You can add headers and return the following array :
Code
Array
(
  [0] => Array
        (
            [headers] => Email HEADERS
            [to] => Email of USER
            [subject] => Email SUBJECT
            [message] => Email BODY
        )
)


-----------------------
Webuzo - Multi User Hosting Control Panel
AMPPS - Best WordPress/PHP/MySQL development tool

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.