Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# MailHog Dockerfile
#

FROM golang:1.18-alpine as builder
FROM golang:1.13-alpine as builder

# Install MailHog:
RUN apk --no-cache add --virtual build-dependencies \
git \
&& mkdir -p /root/gocode \
&& export GOPATH=/root/gocode \
&& go install github.com/mailhog/MailHog@latest
&& go get github.com/secforge/MailHog

FROM alpine:3
# Add mailhog user/group with uid/gid 1000.
Expand Down
Binary file added MailHog
Binary file not shown.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ See [MailHog libraries](docs/LIBRARIES.md) for a list of MailHog client librarie
* See [Introduction to Jim](/docs/JIM.md) for more information
* HTTP API to list, retrieve and delete messages
* See [APIv1](/docs/APIv1.md) and [APIv2](/docs/APIv2.md) documentation for more information
* Email blacklist functionality to reject messages from/to specific addresses via SMTP
* [HTTP basic authentication](docs/Auth.md) for MailHog UI and API
* Multipart MIME support
* Download individual MIME parts
Expand Down
108 changes: 108 additions & 0 deletions docs/APIv2/swagger-2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,60 @@ paths:
created:
type: string
format: date-time
/api/v2/blacklist:
get:
description: |
Retrieve a list of blacklisted email addresses
responses:
200:
description: Successful response
schema:
title: Blacklisted Emails
type: array
items:
type: string
description: Email address
/api/v2/blacklist/{email}:
post:
description: |
Add an email address to the blacklist
parameters:
-
name: email
in: path
description: Email address to blacklist
required: true
type: string
responses:
200:
description: Email successfully added to blacklist
schema:
type: object
properties:
success:
type: boolean
400:
description: Email address is required
delete:
description: |
Remove an email address from the blacklist
parameters:
-
name: email
in: path
description: Email address to remove from blacklist
required: true
type: string
responses:
200:
description: Email successfully removed from blacklist
schema:
type: object
properties:
success:
type: boolean
400:
description: Email address is required
/api/v2/search:
get:
description: |
Expand Down Expand Up @@ -190,3 +244,57 @@ paths:
created:
type: string
format: date-time
/api/v2/blacklist:
get:
description: |
Retrieve a list of blacklisted email addresses
responses:
200:
description: Successful response
schema:
title: Blacklisted Emails
type: array
items:
type: string
description: Email address
/api/v2/blacklist/{email}:
post:
description: |
Add an email address to the blacklist
parameters:
-
name: email
in: path
description: Email address to blacklist
required: true
type: string
responses:
200:
description: Email successfully added to blacklist
schema:
type: object
properties:
success:
type: boolean
400:
description: Email address is required
delete:
description: |
Remove an email address from the blacklist
parameters:
-
name: email
in: path
description: Email address to remove from blacklist
required: true
type: string
responses:
200:
description: Email successfully removed from blacklist
schema:
type: object
properties:
success:
type: boolean
400:
description: Email address is required
10 changes: 10 additions & 0 deletions docs/RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
MailHog Releases
================

### [v1.0.1](https://github.com/secforge/MailHog/releases/v1.0.1)

- Add email blacklist functionality
- Add APIv2 endpoints for blacklist management:
- `GET /api/v2/blacklist` - List blacklisted email addresses
- `POST /api/v2/blacklist/{email}` - Add email to blacklist
- `DELETE /api/v2/blacklist/{email}` - Remove email from blacklist
- Add SMTP rejection for blacklisted sender and recipient addresses
- Minimal changes to maintain upstream compatibility

### [v1.0.0](https://github.com/mailhog/MailHog/releases/v1.0.0)

There's still outstanding PRs and issues which haven't been addressed in this release.
Expand Down
68 changes: 68 additions & 0 deletions vendor/github.com/mailhog/MailHog-Server/api/v2.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/mailhog/MailHog-Server/config/config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions vendor/github.com/mailhog/MailHog-Server/smtp/session.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/mailhog/MailHog-Server/smtp/smtp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.