Configuration tools: A few thoughts

I just found a post in my drafts folder, summing up my thoughts about CM (Configuration Management) tools from a little under a year ago. Since then, I’ve started using Ansible to set up servers. I’m still not fully converted, but I find Ansible a very useful tool. I have 7 active machines at home, and running my update scripts on each of those is a pain. Ansible makes it a lot easier.


Setting up a simple smtp server for testing

On many websites, there is a need for sending mail from the webserver. While testing, it’s sometimes painful to get a working smtp server to test this.

I’ve used this script for a while now, since it’s the simplest way to get a mailserver running. It will accept any smtp connection and print the mail to the terminal where you started it from.

The script:

import smtpd, asyncore
print 'Mailserver is on port 8025. Press ctrl-c to stop.'
server = smtpd.DebuggingServer(('localhost', 8025), None)

Place those four lines into a python file (I used and then run the python file:


And you’re done!