If it's an issue caused by having foreign mines in your territory, try giving them mining rights. This effectively makes the mines legal (which should remove the 'disputed bases' relationship modifier from your race, improving what your faction thinks of theirs, not that you can see the modifiers on your own faction's opinions), rather than an intrusion into your territory, and I suspect that the automation routines will no longer consider such mines to be valid targets (though it may still do so if your faction hates theirs enough, and the computer may suggest that you revoke the mining rights or, if you allow it control over diplomatic relations, revoke those rights itself, if your faction has a particularly low opinion, especially coupled with a high aggression).
In a case like this, I would generally try to obtain any of the concessions that improve relations to cause the computer to stop sending out raiders. Get free trade agreements, figure out how to encourage trade between your empire and theirs, legalize their mining stations within your territory (and perhaps try to obtain mining rights within theirs), give them military refueling rights so you don't have "their ships are in our space! Kill them!" events. Alternatively, wipe them out. The computer is less likely to send attacks against empires that it thinks you like, and you can see which empires it thinks you like by going to the diplomacy menu and clicking through the empires. The opinions of all the empires, including your own, towards the selected empire will be displayed next to the name of the empire holding this opinion (the opinions range from furious to pleased, and will be blank if the empires haven't made contact with one another yet; this is the same area where you can see the official relations status - red for war, orange for trade sanctions, yellow for subjugation, green for free trade agreements, blue for alliances, and the flags indicating mining or refueling rights). More aggressive and more reckless species seem more likely to make these kinds of attacks, and increasing the game aggression setting also makes these kinds of raids more likely.