I'm running a rails app which, amongst other things, needs to role it's own SMTP server. Mini-SMTP-Server looks very good, but I don't know how to get it to run as a daemon. I'd like to be able to act on incoming messages and I need to have the full Rails stack available for other tasks.
I've looked at the daemons gem and it seems suitable but don't know how to wire it up to start listening for SMTP messages in a sensible fashion.
create a Rake smtp_server rake task, make sure it depends on environment and then write your code for smtp server in that task. Look at this thread for setting up rake task as daemon: Daemoninsing a rake task