New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/actcoding/smtp-cli

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/actcoding/smtp-cli

  • v0.0.0-20240929194957-c61d286284c7
  • Source
  • Go
  • Socket score

Version published
Created
Source

smtp-cli

📨 Send emails right from your terminal.

We use this tool to send an informational email whenever someone logs in to one of our servers. Intended usage is via pam_exec(8).

Emails are sent directly via SMTP. The config is read from a json file, see Config.

The message body is produced via go templates, see Templates.

Installation

Download an archive (.tar.gz) from the latest release and run the install.sh script.

Usage

Add the following snippet to /etc/pam.d/sshd:

session    required     pam_exec.so /usr/local/bin/smtp-cli -config /usr/local/etc/smtp-cli/config.json -template /usr/local/etc/smtp-cli/template.gotmpl

Config

{
    "host":  "mail.example.org",
	"port":  465,
	"username":  "no-reply@example.org",
	"password":  "",
	"from":  "monitor <no-reply@example.org>",
	"to":  [
		"info <info@example.org>"
	],
	"subject": "New login to the server"
}

Templates

The following variables are made available to the go template:

VariableType
Hoststring
Userstring
RemoteUserstring
RemoteHoststring
Ttystring
Timestamptime.Time

License

MIT

FAQs

Package last updated on 29 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc