Much - not all - of this boils down to the simple rule of being real with someone. Don't flood them with niceties, if you want to be nice and have something you want to say... say it. If you have to THINK too hard about what you want to say, then perhaps you shouldn't say anything.
Honestly, I wish this would be applied in everyday conversation more often, it would give people practice. I loathe small talk and would rather say nothing than talk about the weather.