To be more specific, I work in pure mathematics and I am applying for a postdoc position in the US.
Prior to this, I have only had my recommendation letters written by my former advisors and PhD defense committee members. However, my recent research, as well as the scientific profile of the job I'm applying for, deviates from what I did as a PhD. So I feel it more useful to have professor A (an expert in the field) reference me rather than those people.
But I merely have email correspondence with A and we have never met. Indeed, in the past year I released a paper which generalizes A's earlier work, and our emails are mainly technical discussions on his work and mine. So my question is: in these circumstances, is it appropriate to ask A for a reference letter?