{"id":50902935,"url":"https://github.com/stacksjs/post","last_synced_at":"2026-06-16T04:31:27.242Z","repository":{"id":278318164,"uuid":"935217770","full_name":"stacksjs/post","owner":"stacksjs","description":"📫 The Post. A modern mail server \u0026 utilities. Ships with a CLI, library, and UI. ","archived":false,"fork":false,"pushed_at":"2026-06-13T12:57:05.000Z","size":1045,"stargazers_count":7,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-13T14:23:56.686Z","etag":null,"topics":["app","cli","developer-tool","email","email-testing","library","mail-server","smtp","smtp-server","typescript"],"latest_commit_sha":null,"homepage":"https://the-post.netlify.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stacksjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["stacksjs","chrisbbreuer"],"open_collective":"stacksjs"}},"created_at":"2025-02-19T05:03:11.000Z","updated_at":"2026-06-10T11:49:40.000Z","dependencies_parsed_at":"2025-02-28T15:45:28.646Z","dependency_job_id":"f0d4e90c-b7f1-4635-9ada-cbe1adde9165","html_url":"https://github.com/stacksjs/post","commit_stats":null,"previous_names":["stacksjs/smtpx","stacksjs/post"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stacksjs/post","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fpost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fpost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fpost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fpost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stacksjs","download_url":"https://codeload.github.com/stacksjs/post/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Fpost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34391702,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-16T02:00:06.860Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app","cli","developer-tool","email","email-testing","library","mail-server","smtp","smtp-server","typescript"],"created_at":"2026-06-16T04:31:26.241Z","updated_at":"2026-06-16T04:31:27.235Z","avatar_url":"https://github.com/stacksjs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/stacksjs","https://github.com/sponsors/chrisbbreuer","https://opencollective.com/stacksjs"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/stacksjs/mail-server/blob/main/.github/art/cover.jpg?raw=true\" alt=\"Social Card of this repo\"\u003e\u003c/p\u003e\n\n[![npm version](https://img.shields.io/npm/v/@stacksjs/mail-server?style=flat-square)](https://npmjs.com/package/@stacksjs/mail-server)\n[![GitHub Actions](https://img.shields.io/github/actions/workflow/status/stacksjs/mail-server/ci.yml?style=flat-square\u0026branch=main)](https://github.com/stacksjs/mail-server/actions?query=workflow%3Aci)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\u003c!-- [![npm downloads](https://img.shields.io/npm/dm/@stacksjs/mail-server?style=flat-square)](https://npmjs.com/package/@stacksjs/mail-server) --\u003e\n\u003c!-- [![Codecov](https://img.shields.io/codecov/c/gh/stacksjs/mail-server/main?style=flat-square)](https://codecov.io/gh/stacksjs/mail-server) --\u003e\n\n# The Post\n\n\u003e Finally a mail server that can be managed.\n\u003e\n\u003e **Note:** Perfect for local development and testing environments. _Production-ready release coming soon!_\n\u003e\n\u003e While this mail server works in a zero-setup \u0026 zero-config way, you still have to maintain the infrastructure that the server is deployed \u0026 running on. To automate it, including pretty server metrics visualizations \u0026 alerting, you may want to check out [Stacks](https://github.com/stacksjs/stacks), as it ships a full-featured mail server with a management interface/dashboard.\n\n## Features\n\n- 📨 **Mail Server** _lightweight \u0026 configurable_\n- 🛠️ **Mail Utilities** _send, receive, and manage emails_\n- 📦 **Mail UI** _web interfaces for managing emails, including a component library_\n- 🤖 **CLI** _command-line interface for managing emails_\n- 🔒 **Security** _TLS support, authentication, and spam protection_\n- 🚀 **Performance** _optimized for high-throughput environments_\n- 🎯 **Modern** _built with TypeScript, zero dependencies_\n- 📝 **Logging** _detailed logging and monitoring capabilities_\n\n## Install\n\n```bash\nbun install -d @stacksjs/post\n```\n\n\u003c!-- _Alternatively, you can install:_\n\n```bash\nbrew install post # wip\npkgx install post # wip\n``` --\u003e\n\n## Get Started\n\nThere are two ways of using the mail server: _as a library or as a CLI._\n\n### Library Usage\n\n```ts\nimport { SMTPServer } from '@stacksjs/post'\n\n// Basic SMTP Server\nconst server = new SMTPServer({\n  secure: true,\n  name: 'mail.example.com',\n  banner: 'Welcome to My Mail Server',\n})\n\nserver.listen(25)\n\n// Advanced Configuration\nconst secureServer = new SMTPServer({\n  // TLS Configuration\n  secure: true,\n  needsUpgrade: false,\n  sniOptions: new Map([\n    ['example.com', {\n      key: fs.readFileSync('certs/example.com.key'),\n      cert: fs.readFileSync('certs/example.com.cert')\n    }]\n  ]),\n\n  // Authentication\n  authMethods: ['PLAIN', 'LOGIN'],\n  onAuth: (auth, session, callback) =\u003e {\n    if (auth.username === 'user' \u0026\u0026 auth.password === 'pass')\n      callback(null, { user: 'user' })\n    else\n      callback(new Error('Invalid credentials'))\n  },\n\n  // Message Handling\n  size: 1024 * 1024, // 1MB limit\n  onData: (stream, session, callback) =\u003e {\n    stream.pipe(process.stdout) // Echo message to console\n    stream.on('end', callback)\n  },\n\n  // Logging\n  logger: {\n    info: console.log,\n    debug: console.debug,\n    error: console.error\n  }\n})\n\nsecureServer.listen(465) // SMTPS port\n```\n\n### Event Handling\n\n```ts\nserver.on('connect', (session) =\u003e {\n  console.log('New connection from', session.remoteAddress)\n})\n\nserver.on('error', (err) =\u003e {\n  console.error('Server error:', err)\n})\n\nserver.on('close', () =\u003e {\n  console.log('Server shutting down')\n})\n```\n\n### CLI Usage\n\nThe Post CLI provides a comprehensive set of commands for managing your mail server:\n\n```bash\n# Start the server\npost start                   # Start with default config\npost start --config custom   # Use custom config file\npost start --port 25         # Specify port\npost start --secure          # Start in TLS mode\n\n# Configuration\npost init                   # Create default config file\npost config show            # Display current configuration\npost config set key=value   # Update configuration\n\n# Monitoring\npost status                 # Show server status\npost logs                   # View server logs\npost logs --live            # Live log streaming\npost stats                  # Show server statistics\n\n# User Management\npost users list            # List all users\npost users add \u003cemail\u003e     # Add new user\npost users remove \u003cemail\u003e  # Remove user\npost users quota \u003cemail\u003e   # Show/set user quota\n\n# Queue Management\npost queue list            # List queued messages\npost queue flush           # Process all queued messages\npost queue remove \u003cid\u003e     # Remove message from queue\n\n# Security\npost tls setup            # Configure TLS certificates\npost tls renew            # Renew certificates\npost blacklist add \u003cip\u003e   # Add IP to blacklist\npost whitelist add \u003cip\u003e   # Add IP to whitelist\n\n# Maintenance\npost backup              # Create server backup\npost restore \u003cfile\u003e      # Restore from backup\npost cleanup             # Clean old logs/messages\n\n# Advanced\npost test             # Run server tests\npost benchmark        # Run performance tests\npost debug            # Start in debug mode\n```\n\n## Configuration\n\nThe Mail Server can be configured using a `post.config.ts` _(or `post.config.js`)_ file:\n\n```ts\n// post.config.ts\nexport default {\n  // Server Configuration\n  server: {\n    name: 'mail.example.com',\n    secure: true,\n    ports: {\n      smtp: 25,\n      smtps: 465,\n      submission: 587\n    }\n  },\n\n  // TLS Configuration\n  tls: {\n    cert: '/path/to/cert.pem',\n    key: '/path/to/key.pem',\n    domains: ['example.com', 'mail.example.com']\n  },\n\n  // Authentication\n  auth: {\n    methods: ['PLAIN', 'LOGIN'],\n    database: 'sqlite://users.db'\n  },\n\n  // Storage\n  storage: {\n    type: 'disk',\n    path: '/var/mail',\n    quota: '1GB'\n  },\n\n  // Security\n  security: {\n    rateLimit: {\n      window: '1h',\n      max: 1000\n    },\n    spamProtection: true,\n    dnsbl: ['zen.spamhaus.org']\n  },\n\n  // Logging\n  logging: {\n    level: 'info',\n    file: '/var/log/post.log',\n    format: 'json'\n  }\n}\n```\n\nThen run:\n\n```bash\npost start\n```\n\nTo learn more, head over to the [documentation](https://the-post.sh/).\n\n## Testing\n\n```bash\nbun test\n```\n\n## Changelog\n\nPlease see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.\n\n## Contributing\n\nPlease review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.\n\n## Community\n\nFor help, discussion about best practices, or any other conversation that would benefit from being searchable:\n\n[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)\n\nFor casual chit-chat with others using this package:\n\n[Join the Stacks Discord Server](https://discord.gg/stacksjs)\n\n## Postcardware\n\nTwo things are true: Stacks OSS will always stay open-source, and we do love to receive postcards from wherever Stacks is used! _We also publish them on our website. And thank you, Spatie_\n\nOur address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094 🌎\n\n## Sponsors\n\nWe would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.\n\n- [JetBrains](https://www.jetbrains.com/)\n- [The Solana Foundation](https://solana.com/)\n\n## Credits\n\n- [Andris Reinman](https://github.com/andris9) _(Author of `nodemailer` \u0026 `smtp-server`)_\n- [Ralph Slooten](https://avatars.githubusercontent.com/u/1463435?s=64\u0026v=4) _(Author of `mailtrap`)_\n- [Chris Breuer](https://github.com/chrisbbreuer)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.\n\nMade with 💙\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksjs%2Fpost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstacksjs%2Fpost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksjs%2Fpost/lists"}