GithubHelp home page GithubHelp logo

exec64 / nanolist Goto Github PK

View Code? Open in Web Editor NEW
182.0 10.0 25.0 52 KB

mailing lists - the unix way

License: BSD 3-Clause "New" or "Revised" License

Go 100.00%
email mailing-list smtp discussion-platform

nanolist's Introduction

nanolist

nanolist is a lightweight mailing list manager written in Go. It's easy to deploy, and easy to manage. It was written as an antithesis of the experience of setting up other mailing list software.

Usage

nanolist is controlled by emailing nanolist with a command in the subject.

The following commands are available:

  • help - Reply with a list of valid commands
  • lists - Reply with a list of available mailing lists
  • subscribe list-id - Subscribe to receive mail sent to the given list
  • unsubscribe list-id - Unsubscribe from receiving mail sent to the given list

Frequently Asked Questions

Is there a web interface?

No. If you'd like an online browsable archive of emails, I recommend looking into tools such as hypermail, which generate HTML archives from a list of emails.

If you'd like to advertise the lists on your website, it's recommended to do that manually, in whatever way looks best. Subscribe buttons can be achieved with a mailto: link.

How do I integrate this with my preferred mail transfer agent?

I'm only familiar with postfix, for which there are instructions below. The gist of it is: have your mail server pipe emails for any mailing list addresses to nanolist message. nanolist will handle any messages sent to it this way, and reply using the configured SMTP server.

Why would anyone want this?

Some people prefer mailing lists for patch submission and review, some people want to play mailing-list based games such as nomic, and some people are just nostalgic.

Installation

First, you'll need to build and install the nanolist binary: go get github.com/eXeC64/nanolist

Second, you'll need to write a config to either /etc/nanolist.ini or /usr/local/etc/nanolist.ini as follows:

You can also specify a custom config file location by invoking nanolist with the -config flag: -config=/path/to/config.ini

# File for event and error logging. nanolist does not rotate its logs
# automatically. Recommended path is /var/log/mail/nanolist
# You'll need to set permissions on it depending on which account your MTA
# runs nanolist as.
log = /path/to/logfile

# An sqlite3 database is used for storing the email addresses subscribed to
# each mailing list. Recommended location is /var/db/nanolist.db
# You'll need to set permissions on it depending on which account your MTA
# runs nanolist as.
database = /path/to/sqlite/database

# Address nanolist should receive user commands on
command_address = [email protected]

# SMTP details for sending mail
smtp_hostname = "smtp.example.com"
smtp_port = 25
smtp_username = "nanolist"
smtp_password = "hunter2"

# Create a [list.id] section for each mailing list.
# The 'list.' prefix tells nanolist you're creating a mailing list. The rest
# is the id of the mailing list.

[list.golang]
# Address this list should receieve mail on
address = [email protected]
# Information to show in the list of mailing lists
name = "Go programming"
description = "General discussion of Go programming"
# bcc all posts to the listed addresses for archival
bcc = [email protected], [email protected]

[list.announcements]
address = [email protected]
name = "Announcements"
description = "Important announcements"
# List of email addresses that are permitted to post to this list
posters = [email protected], [email protected]

[list.fight-club]
address = [email protected]
# Don't tell users this list exists
hidden = true
# Only let subscribed users post to this list
subscribers_only = true

Lastly, you need to hook the desired incoming addresses to nanolist:

In /etc/aliases:

nanolist: "| /path/to/bin/nanolist message"

And run newaliases for the change to take effect.

This creates an alias that pipes messages sent to the nanolist alias to the nanolist command.

The final step is telling your preferred MTA to route mail to this address when needed.

For postfix edit /etc/postfix/aliases and add:

and restart postfix.

Congratulations, you've now set up 3 mailing lists of your own!

License

nanolist is made available under the BSD-3-Clause license.

nanolist's People

Contributors

ajdiaz avatar exec64 avatar rjected avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nanolist's Issues

Support rejection rules

It'd be nice if nanolist could have some custom rules for rejecting emails to lists based on an external script.

For example:

  • Reject [PATCH] emails where the patch has been corrupted (broken whitespace)
  • Reject emails that top-post
  • Require subjects to be formatted a certain way
  • Banning the word "generics" from a golang mailing list

nanolist would not implement such logic itself, but would allow messages to be piped into an external command. If the return code is 0, the message is posted to the list. If it is 1, the stdout of the script is sent as a reply to the sender.

two suggestion: dynamically add alias and summery send out

Hi!
Cool program with a unix philosophy doing one thing good. Thanks!
What do you think of these two suggestions or thought:

Do you know any cli tool that might in future be wrapped in a method (createlist) in nanolist that can add users to /etc/postfix/aliases ? That way we can create lists dynamically as well as subscribers.

Secondly adding some goroutine or existing scheduler library to do "summery" send out of dialogs in a list.

Handle attachments

Attachments have never been tested with nanolist. At some point nanolist's behaviour should be tested, and a plan for how it should behave needs to be created.

Admin commands

Administrators should be able to subscribe, unsubscribe, and block users from a mailing list via commands.

use IMAP instead of MTA forwarding [feature request]

It would be awesome if you could also integrate an easy way to do this without changing the mail server config.

E.g. enter IMAP and SMTP details and create a systemd timer/cronjob to fetch mails every 10 minutes, then forward based on the mailing list settings.

While this would require storing every already received message ID in a database (or utilising IMAP "read" flags), it'd also be a super easy way to manage mailinglists which is not available in any other mailing list manager.

Add debug flag

To help with development, add a flag that stops mailmule from sending messages over SMTP - instead writing them to stdout.

Add a check command

To ease configuration woes, we should have a command that checks permissions for the log and database files are working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.