About Archive Tags RSS Feed


Symbiosis is wonderful

4 March 2012 21:50


Symbiosis is the collective name given to a group of Debian GNU/Linux packages which implement simple virtual hosting. It is developed by my employers Bytemark.

Symbiosis is basically a collection of configuration snippets, code, and libraries which works to offer virtual hosting in a reliable consistent and easy to understand fashion.

You implement hosting for a new domain by merely creating a directory tree. So for example you might configure the hosting for the domain example.com by running:

mkdir -p /srv/example.com/public/htdocs
echo "hello, world" >> /srv/example.com/public/htdocs/index.html

mkdir -p /srv/example.com/mailboxes/webmaster
echo "super-secret" > /srv/example.com/mailboxes/webmaster/password

mkdir -p /srv/example.com/config
echo "3l33t" > /srv/example.com/mailboxes/config/ftp-password

There you are, now http://www.example.com/ and http://example.com/ will work, and you may login to check mail with the email address webmaster@example.com via POP3, IMAP, IMAPS, or POP3S. Finally you can FTP with username example.com and be dropped into the public directory.

The mail handling is very flexible, and the webhosting supports wonderful things.

I don't generally talk about work-stuff explicitly, but we've just made a major new release of the Symbiosis system such that it works upon Squeeze and has lots of IPv6 support out of the box. (Email, DNS, HTTP, Firewalling, FTP etc.)

All in all it is simple, well-documented, and open-source with a reasonably large user-base. More external testers, users, and developers would be a wonderful thing..

Mutt Mailboxes & Idle Hooks?

Mutt is wonderful but I'm starting to get annoyed by its lack of auto-mailbox discovery.

Assuming you use procmail you might deliver mail to ~/Maildir/.foo/ and mutt won't notice that if the directory is created once it starts.

(This is because generally mailboxes are defined via "mailboxes =one =two ..", even if you use a shell snippet it won't get updated unless you re-read configuration, or re-exec mutt).

I wish it were possible to use inotify/dnotify/something magic such that everything beneath ~/Maildir would just work.

(Re-reading mailboxes manually is one solution but it is .. nasty?)

I'm thinking that of all the possible solutions one of the most potentially interesting would be to define a new hook: "idle-hook command .."

That way "command" would be executed every time the client is idle. (This is a distinct state unrelated to IMAP IDLE times.)

Nopte: There is already "mail_check" & "timeout" options. Even running a defined command immediately following the code for mail_check would be reasonable.

Reverse Proxy

I continue to use, love, and enjoy my node.js-based reverse HTTP proxy, and pub discussions seemed to suggest it is a great idea (due to flexibility) but it will never take on because people don't trust node.

I'm almost tempted to re-code it in LUA & C. But I can't help but think that would be a waste of time which would not increase adoption - after all most people use "simple" reverse proxies, and they are well suited by Apache, nginx, or even varnish.

Still no rush I suppose.

In more personal news after living in this flat for 7 years, or so, I'm getting a new bathroom designed and deployed. Good times.

In the meantime I've been steadily watching Stargate SG-1 having recently purchased a box-set of series 1-10. I've just started series six this evening, and I'm enjoying it a lot.

ObQuote: "You have been recruited by the Star League to defend the frontier against Xur and the Ko-Dan armada. " - The Last Starfighter (1984). First film I ever saw at a cinema as a child.



Comments on this entry

icon Paul Wise at 01:07 on 24 February 2012

Symbiosis is also part of the Debian derivatives census, would you consider adding yourself as a second maintainer of the Symbiosis census page?


According to the census package checker, your apt repository is not signed using OpenPGP keys:


In addition, lenny is now EOL:


I wonder if Symbiosis should consider maintaining it as a Debian Pure Blend instead, with all packages and install media fully available in Debian, it seems like there aren't too many packages to add to me:


icon Steve Kemp at 09:44 on 24 February 2012

Thanks for the comment - and the mail-followup - I'll ensure we reply to your mail shortly, but in the meantime the issue with the key is due to the wrong repository being listed.

You'll find the current repository is signed:

# Bytemark Symbiosis.
deb     http://symbiosis.bytemark.co.uk/squeeze ./ 
deb-src http://symbiosis.bytemark.co.uk/squeeze ./ 
icon Surfer at 17:18 on 24 February 2012

That's interesting (if your customers are geeks themself).

BTW is /srv/example.com/mailboxes/webmaster/password, gulp, cleartext?

Is that data imported to its database (dovecot / exim database's in that case) by a collector script or are the daemons patched to lookup those files?

icon Steve Kemp at 17:20 on 24 February 2012

That example did use a plaintext password yes, but we support hashed passwords too - and they are obviously preferred.

We've got an updated exim4 and dovecot configuration such that these things are all looked up dynamically at runtime - want to create a new localpart? Just create the directory.

You still have the flexibility to do rewriting, and use Exim filter scripts if you want too.

icon acathur at 19:22 on 24 February 2012

Nice, Thanks.

For that inotfy thing, there's already the "incron" package in debian which might be useful, Though I haven't tried it myself yet.
Here: http://inotify.aiken.cz/?section=incron&page=why&lang=en

icon Steve Kemp at 19:24 on 24 February 2012

in-cron isn't new to me, I wrote about it previously - and we added it as a dependency to symbiosis this week too!

But it doesn't help in this case, unless I were to write a config file that just listed mailboxes, and then triggered updates of that via in-cron. I'd still need to cause mutt to re-read that file "every now and again" for the change to be made live..

icon Anonymous at 08:58 on 7 March 2012

If you don't mind running a local IMAP server, mutt does notice new IMAP mailboxes, as long as you have the various IMAP options turned on (such as imap_check_subscribed).

icon Colin at 09:46 on 7 March 2012

> ObQuote: "You have been recruited by the Star League to defend the frontier against Xur and the Ko-Dan armada. " - The Last Starfighter (1984). First film I ever saw at a cinema as a child.

But have you read the book?

icon Steve Kemp at 13:56 on 7 March 2012

Good call on the IMAP approach - we've just updated Symbiosis so that deliveries also trigger subscriptions to folders!

Colin in my ignorance I didn't even know there was a book. I will go search Amazon for a used copy. Thanks!