AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY] SM:Error Mail - Send new error logs to your email! (Version 2.0) (https://forums.alliedmods.net/showthread.php?t=166577)

Peace-Maker 09-05-2011 08:01

[ANY] SM:Error Mail - Send new error logs to your email! (Version 2.0)
 
10 Attachment(s)
SM:Error Mail
If you've multiple server to manage each with their individual plugins, you're quickly raging about the amount of logs directorys you have to check to notice one plugin erroring.

Now you're able to lay back and wait for the error to occur! This plugin will send you an E-Mail with the newest error log on each map change, if there's been any errors since the last E-Mail.

You're able to specify multiple recipients, if you need more people informed.

Version 1 is based off Timiditas' SMTP protocol implementation. Huge thanks for putting the steps together :)

Version 2 uses cURL to send the E-Mail and thus supports STARTTLS and SSL/TLS encryption.

Error Mail 2 was rewritten and is not sending mails for closed error log file sessions anymore. It sends the full contents of the error files now instead of truncating them due to buffer limitations in SP.

Requirements:
Convars:
  • sm_errormail_version - ...
  • sm_errormail_host - SMTP server hostname/IP (without http://!)
  • sm_errormail_port - SMTP server port (Default: 25)
  • sm_errormail_user - SMTP username to login as
  • sm_errormail_pass - SMTP user password
  • sm_errormail_from - E-Mail address to send mails from
  • sm_errormail_to - E-Mail address(es) to send error logs to. Seperate multiple ones with a ; Whitespace is ignored.
NEW IN VERSION 2.0:

  • sm_errormail_secure - Set to 0 for no encryption, 1 for STARTTLS and 2 for SSL/TLS (Default 0)
  • sm_errormail_verifyhost - If encryption is enabled, verify that the host in the certificate is the one you connect to? (Default 1)
  • sm_errormail_verifypeer - If encryption is enabled, verify the host's certificate? (Default 1)
  • sm_errormail_verbose - Verbosity of curl communication logging. For debugging. (Default 0)

Configure those convars in the generated plugin.smerrormail.cfg in your cfg/sourcemod folder after the plugin has been first loaded.

It's likely that every email server host is working, so you're able to send mails from your gmail account or similar. Check for email client configuration information and enter them in the cfg.

The mail is plain text and contains the hostname, ip:port and error logfile name and content. It uses a small file to memorize when it last sent an email and at which line it stopped sending in the last file (sourcemod/data/error_mail_state.data), so don't delete it by accident or you may miss some logs!

If you want to compile Version 1.0 yourself, you need to have the Base64 and Socket include files available. Version 2.0 requires the cURL include.

Use smerrormail.smx if you don't want to run the cURL extension and use a mail server that accepts plain text authentication.
Use smerrormail2.smx if your mail server requires secure authentication (or you just care about your credentials)

sinblaster 09-05-2011 08:15

hey Peace I understand the send email to (I created an email account especially to receive errors)
I however don't understand "sm_errormail_from"
how is there a from? Sorry, it's probably a very obvious answer ...

Is it the mail server address? mail.server.ext ??

Peace-Maker 09-05-2011 08:20

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
It's the email address the username is accociated with. So that email account you created, shouldn't be for receiving but for sending emails and you real email should be in _to.

You could set the sender and receiver both to the same email address to have it sending emails to itself though.

sinblaster 09-05-2011 08:26

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
yeah I was outside having a smoke (just after taking my champix pill) and it all made sense. Thankks for the reply I feel a little stupid.

Ill try to itself and get back to you thanks heaps. You're the man.

sinblaster 09-05-2011 08:31

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
mate It's perfect!!!!!!!!!

Sending to itself works just fine. I placed it on a server I know has an error and it was an instant process. I rebooted and got the email within a minute.

Such an awesome effort mate. Great job very grateful. This would be perfect for SMAC I'd love to receive smac logs.:P

EDIT:
Fastest Approval in history lol

Peace-Maker 09-05-2011 11:02

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
Should the smac logs be included in the error mails or sent seperately in an own email. You could get 2 emails on mapchange then though. Looks like some spam incoming.

I think in the same is better.

sinblaster 09-05-2011 12:19

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
I wouldn't know, I'd say either would be good. so you're able to do this? I want to donate if you can. To me this is priceless.

TnTSCS 09-05-2011 16:28

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
This is a great plugin :)

Helps get the server admins attention when issues arise. Thanks :)

sipster19 09-07-2011 03:15

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
This plugin works great and I love it! I did change two things:

Code:

Hello Admin,

there are new SourceMod errors on server

Code:

Hello Admin,

There are new SourceMod errors on server

Code:

AutoExecConfig(true);
Code:

AutoExecConfig(true, "smerrormail");

rhelgeby 09-07-2011 07:16

Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
 
Suggestion: Make a plugin whitelist and blacklist to avoid spam when you can't do anything about it.


All times are GMT -4. The time now is 08:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.