Email still continues to be a popular communication and collaboration tool especially within enterprises. And Postfix (configurable SMTP server) has withstood the test of time and remains popular.
Postfix needs to be made aware of the domains whose mails are to be delegated. This is achieved through the virtual_mailbox_domains setting in the main.cf configuration file.
Then in the transport configuration file, you need to list out the domains and the locations where the mails have to be delegated/forwarded.
Here's an snippet of a main.cf config file with the relevant change:
virtual_mailbox_domains = domain1.com domain2.com
And the transport file forwarding the emails to Haraka running on port 2525:
domain1.com smtp:127.0.0.1:2525 domain2.com smtp:127.0.0.1:2525
Finally, you restart postfix to reflect the changes.
Hosting multiple python apps different url mount points
If you host multiple (virtual hosting) python web apps (django, flask etc) behind nginx on a single server, you have two options:
- Using subdomains
- On different URL mount points
Using subdomains, you will have to update your DNS records for every app that you deploy. While the deployment is cleaner …read more
Self-signed TLS Certificate in Linux
Today, I had the necessity to embed an iframe on an HTTPS web page and most browsers now won't allow you to embed an HTTP resource on an HTTPS page raising the mixed content warning. Since the code was quite experimental, I didn't want to deploy it out of localhost …read more
Elasticsearch autocomplete on related keywords
Recently, I had to work on a client request to add autocomplete to their site's search based not just on a specific list but on related keywords.
For example, suppose you had a list of TV series like Simpsons, Futurama, Tom and Jerry etc. The autosearch had to suggest the …read more
Simple Command Line Dropbox Uploader in Python
I don't use Dropbox frequently. In fact, I would prefer not to use it but work requires me to use it from time to time. My only use case was to upload files onto a shared folder. So for my usage, it makes no sense to run the desktop client …read more
Nginx Basic Auth without htpasswd-tools
Resize Qemu Image
Upload a directory to Rackspace Cloud Files from command line
Here's a simple bash script that uploads a directory to Rackspace Cloud Files and may later on be served as a static website.
First we have to authenticate to get the authentication token that has to be passed for every request:
$ curl -v -X GET -H "X-Auth-User: <username>" -H "X-Auth-Key …
The missing documentation for django.utils.datastructures
Cross posted from my work blog.
django.utils.datastructures is intentionally not documented by the django core devs because it is an internal API and is liable to change without any notice. This file is not governed by django's lenient backwards-compatible policy. You have been sufficiently warned!
With the …read more
Dissecting Phonegap's architecture
Cross-posted from my work blog.