All Projects → muhammadmuzzammil1998 → Log-mailer

muhammadmuzzammil1998 / Log-mailer

Licence: MIT license
Log mailer is a program I made to email log files.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Log-mailer

mail
Actively maintained fork of gomail. The best way to send emails in Go.
Stars: ✭ 376 (+717.39%)
Mutual labels:  mailer, smtp
Meteor-Mailer
📮 Bulletproof email queue on top of NodeMailer with support of multiple clusters and servers setup
Stars: ✭ 21 (-54.35%)
Mutual labels:  mailer, smtp
Mailer
A lightweight PHP SMTP mail sender
Stars: ✭ 53 (+15.22%)
Mutual labels:  mailer, smtp
email
Aplus Framework Email Library
Stars: ✭ 127 (+176.09%)
Mutual labels:  mailer, smtp
Airform
Functional HTML forms for Front-End Developers.
Stars: ✭ 307 (+567.39%)
Mutual labels:  mailer, smtp
Lettre
a mailer library for Rust
Stars: ✭ 713 (+1450%)
Mutual labels:  mailer, smtp
Magento 2 Smtp
Magento 2 SMTP Extension helps the owner of store simply install SMTP (Simple Mail Transfer Protocol) server which transmits the messages into codes or numbers.
Stars: ✭ 228 (+395.65%)
Mutual labels:  mailer, smtp
ansible-role-fluentbit
Ansible role that install FluentBit
Stars: ✭ 18 (-60.87%)
Mutual labels:  logs
grblogtools
Extract and visualize information from Gurobi log files
Stars: ✭ 57 (+23.91%)
Mutual labels:  logs
imail
small mail server
Stars: ✭ 88 (+91.3%)
Mutual labels:  smtp
SWELF
Simple Windows Event Log Forwarder (SWELF). Its easy to use/simply works Log Forwarder and EVTX Parser. Almost in full release here at https://github.com/ceramicskate0/SWELF/releases/latest.
Stars: ✭ 23 (-50%)
Mutual labels:  logs
parse-smtp-template
Parse Server Module to easy send emails via SMTP with a customizable template option
Stars: ✭ 18 (-60.87%)
Mutual labels:  smtp
share
A collection of libraries and tools written in Go.
Stars: ✭ 35 (-23.91%)
Mutual labels:  smtp
f3-mailer
Fat-Free Sugar Mailer Plugin
Stars: ✭ 18 (-60.87%)
Mutual labels:  smtp
mclogs
Paste, share and analyse Minecraft logs
Stars: ✭ 100 (+117.39%)
Mutual labels:  logs
abap-log-exporter
Exports SAP Netweaver logs to a log system of your choice.
Stars: ✭ 31 (-32.61%)
Mutual labels:  logs
crystal-email
Simple e-mail sending library
Stars: ✭ 110 (+139.13%)
Mutual labels:  smtp
Smtp-cracker
[NEW] : Simple Mail Transfer Protocol (SMTP) CHECKER - CRACKER Tool V2
Stars: ✭ 67 (+45.65%)
Mutual labels:  smtp
DebugWindow
一个在真机上测试时方便查看输出日志的小工具。(A debug tool which helps you view the console logs on the device when you test you APP.)
Stars: ✭ 36 (-21.74%)
Mutual labels:  logs
email-actions
email-actions is a tiny SMTP server with a rules based engine to trigger any actions (notifications/commands etc) based on the emails sent to this server
Stars: ✭ 31 (-32.61%)
Mutual labels:  smtp

Log mailer CircleCI

Log mailer is a program I made to email log files from a server to me so I don't have to manually check logs everytime. It uses GoLang's "net/smtp" to email.

Build

Prerequisites: Git, Go, SMTP server credentials.

$ git clone https://github.com/muhammadmuzzammil1998/Log-mailer
$ cd Log-mailer
$ go build

asciicast

Generating configuration file.

$ ./Log-mailer -generate
Location to store configuration file (default: ./configuration.json):
Enter "From" name:      Muhammad Muzzammil
Enter "From" email:     [email protected]
Enter "To" name:        Muhammad Muzzammil
Enter "To" email:       [email protected]
Enter subject:          Error logs from server
Enter SMTP server:      smtp.server.lnk
Port:                   25
Username:               [email protected]
Password:               r34lly53cur3p455w0rd
Location of logs:       /path/to/logs.log
Interval:               6h
Reset log file? (y/n):  y
Configuration file generated: configuration.json.

asciicast

Description

Input Description
Configuration File A single file to store data. Default is ./configuration.json in current directory.
"From" data       The author of the message. Used for "From" header                                          
"To" data The address of the primary recipient of the message. Used for "To" Header
"Subject" What you want the subject to be. Used for "Subject" header.
SMTP Server Link to your mail server.
Port Port to use for the server.
Username Username for SMTP server
Password Password for SMTP server
Location Location of the log file which is to be emailed
Interval The duration in which email is repeated. Valid units are "ns", "us", "ms", "s", "m", "h".
Reset logfile Empties the log file after a successful email.

JSON structure of configuration file

{
    "from": {
        "name": "Muhammad Muzzammil",
        "email": "[email protected]"
    },
    "to": {
        "name": "Muhammad Muzzammil",
        "email": "[email protected]"
    },
    "subject": "Error logs from server",
    "server": "smtp.server.lnk",
    "port": "25",
    "credentials": {
        "user": "[email protected]",
        "password": "r34lly53cur3p455w0rd"
    },
    "logs": "/path/to/logs.log",
    "interval": "6h",
    "reset": "true"
}

Go structure of configurations

type Config struct {
	From        EmailStruct `json:"from"`
	To          EmailStruct `json:"to"`
	Subject     string      `json:"subject"`
	Server      string      `json:"server"`
	Port        string      `json:"port"`
	Credentials Credentials `json:"credentials"`
	Logs        string      `json:"logs"`
	Interval    string      `json:"interval"`
	Reset       string      `json:"reset"`
}

type EmailStruct struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type Credentials struct {
	Username string `json:"user"`
	Password string `json:"password"`
}

Generating an empty configuration file.

Just in case someone doesn't want to do it interactively.

$ .\Log-mailer.exe -generate -empty
Location to store configuration file (default: ./configuration.json): configuration_template.json
Empty configuration file generated: configuration_template.json.

Starting Log mailer

Using default (configuration.json) configuration

$ ./Log-mailer

Using different configurations

$ ./Log-mailer -conf [filename]

You can start it as different background processes with -conf flag and different configurations for multiple log files.

Help

Usage of ./Log-mailer:
  -conf string
        Configuration file to load. (default "configuration.json")
  -empty
        Generate an empty configuration file. Use with -generate.
  -generate
        Generate configuration file interactively.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].