I have just released a new version of Tethys, you can find it here: Tethys SMTP server 2.0.3 .

This version changes the following things:

  • Allows to specify a maximun number of thread spawned (config command “max_threads = X”)
  • Allows to specify a timeout on socket operations to kill clients that keep connections open forever
  • Self contained version available (contains all needed lua libs and lua itself)
  • Allows to specify a maximun number of connections from a single IP
  • Two process models to choose from: lua coroutines or process forking
  • New “smtp” plugin type, allows to extend the smtp command-set

Have fun!

I have just released a new version of Tethys, you can find it here: Tethys SMTP server 2.0.2 .

This version changes the following things:

  • Correct SMTP AUTH code when success (235 instead of 334)
  • MySQL plugins now keep their connections open and are able to reopen them should the SQL server go away in between
  • New config parameter “user_manager.failsafe_user”, if a deposit plugin fails to read the data that tells it which user to deliver to, it will deliver to this one. (So a mysql failure will not mean incomming mails are lost)
  • tethys2.plugins.user_manager.MySQL plugin must now be preloaded in the “preload.plugins.receiver” section of the config file, if used
  • FixMail plugin now can now replace receiving Date field by the current server date. It will keep the original date in a X-Tethys-Original-Date field. Activate it using the “filter.fixmail.replace.date = true” line in your config file
  • A simple “Log” deposit that just prints the mail body to the log file, for easier debuging
  • New “log.level” config directive (MUST be set, 0=no log, 1=errors, 2=info, 3=debug)
  • Logs are sent to console if not running as a daemon
  • Default config file now has a default user_manager (UnixAlias)

Have fun!

MailCatch is my first website in Lua. Its purpose is to allow any incomming emails on any accoutns to be available for a while. That is, it is a temporary email address system, or virtual inbox. It all started one year and a half ago when I got pissed off while trying to install a mail server for my newly aquired server(which now hosts NetCore and my services). I tried postfix, qmail, sendmail and more but each time I stumbled upon some annoying road blocks (like not being able to use mysql for virtual users). So being the Lua geek I am I decided to make my own smtp server (Tethys) instead of trying to work around the bloated config files other the “big ones”.

My goal was simple: fulfill my specific needs, which were at the time:

  • maildir support
  • virtual users using a mysql database for definition
  • subdomains support
  • easy configuration
  • easily extensible by plugins
  • probably some more I forgot now :)

After reading the SMTP RFCs,  I set out to find some nice Lua packages (LOOP OO programing lib, LuaSocket, …), made a few on my own (Telestos) and started having great fun! After a few days I had a basic implementation going and go onto the plugins part.

Then an idea hit me in the head (yes it hurts a bit), as I wanted to be able to make new virtual addresses easily to handle spam sent to me I thought “but why define addresses ? Just let them all in on a subdomain!”, and so the basic idea for MailCatch was born (which was totaly a non-new idea for the rest of the world it seems as therer are otehr such services, but I was not aware of them by then).

The MailCatch plugin for Tethys was started, it was to be simple and pretty fast. I did not want to burn my hard drive by writing spam to it, there is no use, usualy mail spam addresses are one time use only, so I made the plugin a delivery plugin. That means when Tethys has finished receiving a mail it passes it to a delivery plugin to do something with it, the default one writes it to a maildir spool, but this one just keeps it in memory for a little while and then forgets about it. No hard drive access!

Once I was satisfied I made a quick website in Lua (which I’ll explain in an other post) to display the mails in the plugin memory. This site later became MailCatch (which you all know .. obviously!) when I decided other people might find a use for it.