Raised This Month: $32 Target: $400
 8% 

[ANY] SM:Error Mail - Send new error logs to your email! (Version 2.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Plugin ID:
2541
Plugin Version:
2.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Sends new sourcemod errors to specified email addresses
    Old 09-05-2011 , 08:01   [ANY] SM:Error Mail - Send new error logs to your email! (Version 2.0)
    Reply With Quote #1

    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)
    Attached Files
    File Type: sp Get Plugin or Get Source (smerrormail.sp - 764 views - 13.7 KB)
    File Type: smx smerrormail.smx (8.6 KB, 630 views)
    File Type: sp Get Plugin or Get Source (smerrormail2.sp - 554 views - 15.8 KB)
    File Type: smx smerrormail2.smx (10.9 KB, 571 views)
    __________________

    Last edited by Peace-Maker; 12-06-2016 at 05:09. Reason: Release 2.0
    Peace-Maker is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 09-05-2011 , 08:15  
    Reply With Quote #2

    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 ??
    __________________
    Happy Happy Joy Joy


    Last edited by sinblaster; 09-05-2011 at 08:18.
    sinblaster is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 09-05-2011 , 08:20   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #3

    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.
    __________________
    Peace-Maker is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 09-05-2011 , 08:26   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #4

    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.
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 09-05-2011 , 08:31   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #5

    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.

    EDIT:
    Fastest Approval in history lol
    __________________
    Happy Happy Joy Joy


    Last edited by sinblaster; 09-05-2011 at 09:16.
    sinblaster is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 09-05-2011 , 11:02   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #6

    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.
    __________________
    Peace-Maker is offline
    sinblaster
    Grim Reaper
    Join Date: Feb 2010
    Location: Australia
    Old 09-05-2011 , 12:19   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #7

    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.
    __________________
    Happy Happy Joy Joy

    sinblaster is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 09-05-2011 , 16:28   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #8

    This is a great plugin

    Helps get the server admins attention when issues arise. Thanks
    TnTSCS is offline
    sipster19
    Senior Member
    Join Date: Mar 2011
    Old 09-07-2011 , 03:15   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #9

    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");

    Last edited by sipster19; 09-07-2011 at 03:20.
    sipster19 is offline
    rhelgeby
    Veteran Member
    Join Date: Oct 2008
    Location: 0x4E6F72776179
    Old 09-07-2011 , 07:16   Re: [ANY] SM:Error Mail - Send new error logs to your email! (Version 1.0)
    Reply With Quote #10

    Suggestion: Make a plugin whitelist and blacklist to avoid spam when you can't do anything about it.
    __________________
    Richard Helgeby

    Zombie:Reloaded | PawnUnit | Object Library
    (Please don't send private messages for support, they will be ignored. Use the forum.)
    rhelgeby is offline
    Send a message via MSN to rhelgeby
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 06:23.


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