Question: I finished my PhD a few years ago, and since then have been hopping from temporary job to temporary job every year. They've all been research-and-teaching jobs, which has been exactly what I wanted. I applied to a whole host of jobs this year, and got one. It's a secure, open-ended job, in a location I think I could be happy living in for a long time. I'm incredibly relieved about this.

The one downside is that it's a teaching-only job.

Now, I honestly enjoy teaching, but it alone is not enough to keep me in this career in the long run. This job seems like a poisoned chalice for my research career: not only does it mean less research time, it also means I'm less likely to be able to attend seminars, I'll have minimal free time during other mathematicians' work hours to liaise with them, I'll receive no funding to attend conferences, I won't be able to swap out duties with other people to give talks, and so on. I won't even be housed in the same building as the research mathematicians, so even interacting with them over lunch is going to be difficult. I'm basically excluded from all of the things that are involved in being an active member of the community!

How do I avoid being funnelled into a permanent teaching-only career? How do I make the most of the time I have during this job? Am I going to find it more difficult to be taken seriously as a researcher after a few years in this job?

---

Edited to clarify: my department is not the mathematics department. It is part of the university, but it is a "learning and teaching"-style department: the vast majority of staff there are teaching-only. I don't know whether this makes a concrete difference, but it might well impact funding, internal policy regarding grants, the priorities of my line managers, etc. I have no idea. Anecdotes and experiences related to this might also be useful.

Answer: 
It sounds like the research mathematicians are at the same campus. If so, even if not in the same building, you can cultivate collegiate relationships:

* Go to the seminars held by the research group
* Be a co-supervisor for PhD students in the research group

If you spend some time finding out peoples' interests, then you could potentially write a grant application during the summer teaching break with one of the research mathematicians, and that grant could include buyout time for you. Find out the buyout policy for your department.

Do the research mathematicians also teach? That is, would you be able to apply for jobs with the research group where your teaching experience is relevant? If so, becoming familiar with the group would also be an advantage in any application for a position.
The obvious answer is to shirk teaching and divert time to research. Do it in a stealthy manner of course (just be perceived as efficient, not blowing things off). Use your massive Ph.D. brain to figure out how to do that. (limit graded homework, use established texts and curricula versus trying new ones, etc. etc. use your noggin.)

But really, you are already pretty far off the beaten track ("job to job" along with taking a teaching only post, versus finding another one with partial research). At this point, you really need to re-evaluate your goals and see if pursuing hard core academia research is in the cards for you. It is a tournament system (like being a rock star...lots of aspiring musicians, few headliners). Consider if you will be happy being a postdoc in your 40s. Or an adjunct forever. Or if you even might want to look at alternate fields (more applied, BUT don't take more school) or going to work for government or the like.