MX Record Configuration in Dnsmasq

Lately when i want to setup DNS server for small until medium environment system, dnsmasq is my choice. Because it has small footprint on memory and simple configuration rather than his big brother Bind-DNS.

If you want to add mx record for such domain just add these lines on dnsmasq main configuration file (/etc/dnsmasq.conf)


from configuration above will add 2 MX record for domain mail.local with priority value 10 for ini.mail.local and value 30 for ini2.mail.local.

By the way dnsmasq it’s not just a DNS server but can be used for dns caching, dhcp server, etc. Visit this page to see available features more detail.

[NGINX] Interpreted css file as plain text

There is some strange situation after reconfigure nginx configuration, where static file such as css and javascript files are interpreted as plain text (text/plain) as this message on chrome page inspector



Also it’s makes my HTML layout become mess, Then i realized that i forgot to add list of mime type file 😀 as per these lines


http {

   include /etc/nginx/conf/mime.types;
   default_type application/octet-stream;

Hope this will help you when found same problem 🙂

Set Mutable on Django QueryDict

There is special custom data type in django that used for object GET and POST in HttpRequest called QueryDict, it’s just like a Dictionary but immutable such as tuple so the data cannot be changed once it’s created. In my case sometime i need to add some data on it, then i need to set QueryDict to enable mutable, here the example code

postdata = req.POST
postdata._mutable = True
postdata['domain'] = 'thisisadmin'

Hopefully this help you when found the same problem 🙂