Hello Neo,
After a deep investigation to the email notification problem, these are my findings ...
1. For starters sendmail was messed up. Apparently you had replaced the sendmail bin with a very well common internet script
Code:
#!/usr/bin/perl
# use strict;
use Env;
my $date = `date`;
chomp $date;
open (INFO, ">>/var/log/formmail.log") || die "Failed to open file ::$!";
my $uid = $>;
my @info = getpwuid($uid);
if($REMOTE_ADDR) { print INFO "$date - $REMOTE_ADDR ran $SCRIPT_NAME at $SERVER_NAME \n"; }
else { print INFO "$date - $PWD - @info\n"; }
#my $mailprog = '/var/qmail/bin/sendmail';
# For postfix please replace the above with the below, by commenting the above
my $mailprog = '/var/sbin/sendmail.postfix';
foreach (@ARGV) {$arg="$arg" . " $_"; }
open (MAIL,"|$mailprog $arg") || die "cannot open $mailprog: $!\n";
while (<STDIN> ) { print MAIL; }
close (INFO);
close (MAIL);
Which in my view is no-longer necessary since PHP has the capacity to log every email sent through its classic mail function (though highly recommended settings on a server would be to disable that function)
I did move that script to /jfiles/ should you want to re-use it again and reset-up the right symbolic links for the sendmail bin...
Now, with all the above emails are correctly routed to your sendmail as you can see from the logs below:
Code:
[...]
Feb 5 12:32:03 sv01 postfix/pipe[9179]: 5745B69160AD: to=<neoit@n***t.es>, relay=plesk_virtual, delay=0.23, delays=0.14/0/0/0.08, dsn=2.0.0, status=sent (delivered via plesk_virtual service)
Feb 5 12:32:03 sv01 postfix/qmgr[7097]: 5745B69160AD: removed
Feb 5 12:32:03 sv01 postfix/qmgr[7097]: 7036B69160A7: from=<[email protected]***.es>, size=860, nrcpt=1 (queue active)
[...]
However, there is another problem on the server. The problem is that email actually can't be sent out since PORT 25 is blocked as you can see from the logs below
Code:
[...]
Feb 5 12:32:55 sv01 postfix/smtp[9190]: connect to mail.jolis.net[85.25.246.132]:25: Connection timed out
Feb 5 12:32:55 sv01 postfix/smtp[9190]: 7CA7369160AF: to=<[email protected]>, relay=none, delay=402, delays=372/0.02/30/0, dsn=4.4.1, status=deferred (connect to mail.jolis.net[85.25.246.132]:25: Connection timed out)
Feb 5 12:33:04 sv01 postfix/smtp[9184]: connect to mta5.am0.yahoodns.net[98.138.112.38]:25: Connection timed out
[...]
Postfix SMTP is well attached the respective port
Code:
[root@sv01 sbin]# lsof -i tcp:25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
master 9670 root 12u IPv4 187156138 0t0 TCP *:smtp (LISTEN)
master 9670 root 13u IPv6 187156140 0t0 TCP *:smtp (LISTEN)
smtpd 12780 postfix 6u IPv4 187156138 0t0 TCP *:smtp (LISTEN)
smtpd 12780 postfix 7u IPv6 187156140 0t0 TCP *:smtp (LISTEN)
I could still dig deeper to why your server can't telnet outside of it on port 25 through it can be access from the outside world on port 25.
I did temporarily disable any firewall on it (IPtables) hoping the port was blocked, but that didn't help ..I have re-enabled IP tables again.
Is there a possibility that your ISP / Host has blocked your outbound traffic on port 25? Ie since I can telnet out on any other ports eg 8080 except 25?
Waiting for your confirmation on this ...