<commit_before># LambdaMLM

A mailing list manager (MLM or email discussion list software) that runs on AWS Lambda (with help from SES and S3).

***This is rapidly approaching very basic usability, but it isn't there yet.***

## Goals

### Setup/Development/Deployment via Fabric

- [ ] Command to perform initial AWS setup.
- [x] Command to re-deploy Lambda code.
- [x] Command to set up virtualenv (in .env) based on requirements.txt.

### Command and Control

- [x] Receive commands via a command user at any domain.
- [x] Reply to unsigned commands with signed version to avoid running commands from spoofed emails.
- [x] Process commands like *nix CLI commands.
- [x] Accept single command in subject.
- [ ] Accept multiple commands in body.
- [x] Maintain list configurations in S3 in YAML format

#### Commands

- [ ] Create list
- [ ] Configure list
- [x] Subscribe to list
- [x] Unsubscribe from list
- [ ] Toggle modes: vacation, echo-post, etc.
- [ ] Moderation

### Sending/Receiving Email

- [x] Validate incoming email against posting permissions
- [ ] Modify message per list configuration:
	- [x] Tag subject
	- [x] Reply to list
	- [ ] Message footer
- [x] Send email to list members
- [ ] Handle bounces
	- [x] Variable envelope return path
	- [x] Stop sending emails to addresses that continue to bounce
	- [ ] Differentiate between hard and soft bounces
	- [ ] Notify list member and/or list admin about bounces
- [ ] Handle moderating messages
- [ ] Handle MIME/attachments

## Notes

- 2016-02-04: Sending via Amazon SES is likely not possible, as SES appears to require that the `From:` address be verified, which isn't plausible for discussion lists.  The best option thus far is to use an external SMTP server.  It appears to be possible to configure a given host to receive email through SES and send via an external SMTP server with both SPF and DKIM passing.

## List Configuration File Format

### Top-level properties

- `members` The list of members.
- `name` The descriptive human-readable name of the list.
- `subject-tag` The tag to prepend to the subject.
- `bounce-limit` The number of bounces a member is allowed before they no longer receives list emails (defaults to 5).
- `reply-to-list` Whether the `Reply-to:` header should be set to the list address (defaults to `false`).
- `open-subscription` Whether the list allows users to subscribe themselves (defaults to `false`).
- `closed-unsubscription` Whether the list prevents members from unsubscribing themselves (defaults to `false`).<commit_msg>Detail existing commands and planned list commands in the README.<commit_after># LambdaMLM

A mailing list manager (MLM or email discussion list software) that runs on AWS Lambda (with help from SES and S3).

***This is rapidly approaching very basic usability, but it isn't there yet.***

## Goals

### Setup/Development/Deployment via Fabric

- [ ] Command to perform initial AWS setup.
- [x] Command to re-deploy Lambda code.
- [x] Command to set up virtualenv (in .env) based on requirements.txt.

### Command and Control

- [x] Receive commands via a command user at any domain.
- [x] Reply to unsigned commands with signed version to avoid running commands from spoofed emails.
- [x] Process commands like *nix CLI commands.
- [x] Accept single command in subject.
- [ ] Accept multiple commands in body.
- [x] Maintain list configurations in S3 in YAML format

#### Commands

- [ ] Create list
- [ ] Configure list
- [x] Subscribe to list
- [x] Unsubscribe from list
- [ ] Toggle modes: vacation, echo-post, etc.
- [ ] Moderation

### Sending/Receiving Email

- [x] Validate incoming email against posting permissions
- [ ] Modify message per list configuration:
	- [x] Tag subject
	- [x] Reply to list
	- [ ] Message footer
- [x] Send email to list members
- [ ] Handle bounces
	- [x] Variable envelope return path
	- [x] Stop sending emails to addresses that continue to bounce
	- [ ] Differentiate between hard and soft bounces
	- [ ] Notify list member and/or list admin about bounces
- [ ] Handle moderating messages
- [ ] Handle MIME/attachments

## Notes

- 2016-02-04: Sending via Amazon SES is likely not possible, as SES appears to require that the `From:` address be verified, which isn't plausible for discussion lists.  The best option thus far is to use an external SMTP server.  It appears to be possible to configure a given host to receive email through SES and send via an external SMTP server with both SPF and DKIM passing.

## Commands

A single command is sent as the subject of an email to `lambda@[domain]` where `domain` is a domain on which LambdaMLM receives email.  LambdaMLM will reply with a signed version of the command, in order to validate the address from which the command came.  The command is confirmed and executed by replying to that email.

- `about` returns an about message
- `echo [parameters]` echos the given parameters
- `list [list address]` indicates a list-specific command
	- `create` creates the list _(admin)_
	- `members` returns a list of the members _(admin)_
	- `config` returns the list configuration _(admin)_
	- `set [config option name] [value]` sets the value of a configuration option for the list _(admin)_
	- `subscribe` subscribes the sender to the list
	- `subscribe [address]` subscribes the given address to the list _(admin)_
	- `unsubscribe` removes the sender from the list
	- `unsubscribe [address]` removes the given address from the list _(admin)_
	- `setflag [flag name]` sets the given flag on the sender
	- `setflag [flag name] [address]` sets the given flag on the member with the given address _(admin)_
	- `unsetflag [flag name]` unsets the given flag on the sender
	- `unsetflag [flag name] [address]` unsets the given flag on the member with the given address _(admin)_

## List Configuration File Format

### Top-level properties

- `members` The list of members.
- `name` The descriptive human-readable name of the list.
- `subject-tag` The tag to prepend to the subject.
- `bounce-limit` The number of bounces a member is allowed before they no longer receives list emails (defaults to 5).
- `reply-to-list` Whether the `Reply-to:` header should be set to the list address (defaults to `false`).
- `open-subscription` Whether the list allows users to subscribe themselves (defaults to `false`).
- `closed-unsubscription` Whether the list prevents members from unsubscribing themselves (defaults to `false`).
{'fraction_non_alphanumeric': 0.0826215250815344, 'fraction_numerical': 0.0034166796086348814, 'mean_word_length': 3.9310872894333846, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5336729', 'n_tokens_mistral': 1819, 'n_tokens_neox': 1735, 'n_words': 909}