Email notifications fail on Plesk servers
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Email notifications fail on Plesk servers
Actually, that rule would not work for the lo device, so it would have to be specified explicitly in an iptables command in a csfpost.sh file.
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Email notifications fail on Plesk servers
Something like this in a csfpost.sh file would allow SMTP outbound connections from the root account to the lo device:
As it is restricting the connection to root alone, it shouldn't pose any risk.
Code: Select all
/sbin/iptables -I ALLOWOUT -o lo -p tcp --dport 25 -m owner --uid-owner 0 -j ACCEPT
Re: Email notifications fail on Plesk servers
I'll submit a bug report to the Plesk developers. Hopefully we can get this fixed right away.
Re: Email notifications fail on Plesk servers
Just for reference here is the bug report I submitted. Thanks again for taking to time to help out Chirpy! Hopefully the Plesk developers get this fixed soon.
http://forum.odin.com/threads/plesk-sen ... ly.332717/
http://forum.odin.com/threads/plesk-sen ... ly.332717/
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Email notifications fail on Plesk servers
I've had a think. Could you try the following, edit /etc/csf/lfd.pl and change around line 8672-8674 from:
to:
Then disable LF_ALERT_SMTP and restart lfd and test whether sendmail works?
Code: Select all
open (MAIL, "|$config{SENDMAIL} -f $from -t") or &logfile("Unable to send SENDMAIL alert via [$config{SENDMAIL}]: $!");;
print MAIL $data;
close (MAIL);
Code: Select all
eval {
local $SIG{CHLD} = 'DEFAULT';
open (MAIL, "|$config{SENDMAIL} -f $from -t") or &logfile("Unable to send SENDMAIL alert via [$config{SENDMAIL}]: $!");;
print MAIL $data;
close (MAIL);
}
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Email notifications fail on Plesk servers
Whether the above works or not, could you also try without that mod but instead at around line 8622:
Before:
After:
Then restart lfd. Let's call this method2 and the previous one method1.
Before:
Code: Select all
sub sendmail {
my @message = @_;
my $time = localtime(time);
Code: Select all
sub sendmail {
my @message = @_;
local $SIG{CHLD} = 'DEFAULT';
my $time = localtime(time);
Re: Email notifications fail on Plesk servers
Both method2 and method1 fixed the issueForumAdmin wrote:Let's call this method2 and the previous one method1.
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Email notifications fail on Plesk servers
Great. I'll look into implementing one or the other as a workaround in a short while after further testing...
Re: Email notifications fail on Plesk servers
Thanks again!
-
- Moderator
- Posts: 1524
- Joined: 01 Oct 2008, 09:24
Re: Email notifications fail on Plesk servers
I have release csf v7.67 with the workaround:
http://blog.configserver.com/
http://blog.configserver.com/