Postfix SMTP Delegation

Sat 23 December 2017 by Thejaswi Puthraya

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.

Programmable SMTP servers like Haraka, Lamson make building applications on top of email easy but I am not comfortable exposing them as the primary server. In comes SMTP delegation; Postfix forwards mails over to Haraka which then process the mails based on javascript (user-configured) rules.

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

Fri 22 December 2017 by Thejaswi Puthraya

If you host multiple (virtual hosting) python web apps (django, flask etc) behind nginx on a single server, you have two options:

  1. Using subdomains
  2. 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

The First War of Independence

Fri 22 December 2017 by Thejaswi Puthraya

"The First War of Independence" is the translation of Vinayak Damodar Savarakar's Marathi book on the Sepoy Mutiny of 1857. This is a book I will suggest all English readers to avoid because there are a lot of typos, grammatical errors, bad formatting and factual contradictions (within the book). These …

read more

Men without women

Wed 06 December 2017 by Thejaswi Puthraya

I was supposed to have picked up collection of short stories with the same name by Ernest Hemingway but got confused and ended up purchasing this. This was my first Murakami book (also a collection of short stories) and it is a blend of comedy with tragedy. The common theme …

read more

How to create a mind

Sat 02 December 2017 by Thejaswi Puthraya

The human brain is a masterpiece! It can recognize so many patterns and store a lot of memories. But how did the brain evolve and can it be mathematically simulated? Ray Kurzweil's book - "How to create a mind", answers these questions through a series of thought experiments.

Through these experiments …

read more

The Serpent's Revenge: Unusual Tales from the Mahabharata

Fri 24 November 2017 by Thejaswi Puthraya

Sudha Murthy has compiled 25 short stories (some localised) from the fringes of the Mahabharata. Some stories like that of the Akshayapatra are well known whereas the others like the yagna by Janamejaya (great grandson of Arjuna) to slay all snakes (to avenge the death of his father Parikshit) not …

read more

Fahrenheit 451

Thu 23 November 2017 by Thejaswi Puthraya

I used to wonder if only the English wrote dystopian novels. But Ray Bradbury, an American writer swept that doubt away when I picked up "Fahrenheit 451".

In a distant future, firemen are tasked with searching, raiding and destroying books and snuffing out knowledge. The protagonist of this book, Guy …

read more

Untouchable

Mon 20 November 2017 by Thejaswi Puthraya

Untouchable is the story of a teenage boy born into a lower caste of untouchables. He has aspirations like the rest of the kids of his age. Everyday, he is slurred on the basis of his caste and nagged of his ancestors and his subservience to the upper castes. Fed …

read more

The Emperor of All Maladies: A Biography of Cancer

Fri 17 November 2017 by Thejaswi Puthraya

Siddhartha Mukherjee, an oncologist gets his readers up and personal with Cancer through a voluminous history of all the major types of cancer. He scours historical texts, medical journals and all public sources to document the earliest cases, various variants of the disease, treatment procedures, research methodologies and how and …

read more

The Grand Rebel

Sun 22 October 2017 by Thejaswi Puthraya

"The Grand Rebel: An impression of Shivaji, the founder of the Maratha Empire" is Dennis Kincaid's love story for his personal hero. He pieced this book from compilations of folk tales, Marathi books, songs and poems. While most of the book is accurate, he seems to exaggerate Shivaji's political influence …

read more