A very common request from our customers is to be able to receive an email notification whenever someone tries to log into their FTP(S)/SFTP server with the wrong credentials.
You can do that by taking advantage of the new “after a failed authentication” event handler that we’ve introduced in Syncplify.me Server! version 1.0.5.15. Here is how to do it:
First of all you have to write a script that sends an email. Something like this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
var MailText: string; begin MailText := 'Incoming connection from '+Session.ClientIP+#13#10; MailText := MailText+'Username: '+Session.ReqUsername+#13#10; MailText := MailText+'Password: '+Session.ReqPassword+#13#10; MailText := MailText+#13#10; MailText := MailText+'Unauthorized access was denied.'+#13#10; MailText := MailText+#13#10; MailText := MailText+'Thank you,'+#13#10; MailText := MailText+'best regards.'+#13#10; MailText := MailText+#13#10; MailText := MailText+'Your Syncplify.me Server!'+#13#10; SendMail('your@email.here', 'Unauthorized access attempt', MailText, ''); end. |
Once you’ve written and saved the script with a name of your choice (and .pas extension in this case, as we wrote it in PascalScript) you can use the Syncplify.me Server! Configuration Manager to associate the execution of the script to the occurrence of the “after a failed authentication” event.
Now every time a failed login occurs, your Syncplify.me Server! will automatically run the above script, which will notify you via email of the unauthorized access attempt.