To answer your question: "Very Carefully."
See, whenever I introduce a potential villain in combat, the party assumes they are the villain and try to kill them outright. If I introduce a villain in a social setting without being very careful, they are already assuming they are the villain and will work against them, even if they are really just a frenemy that may or may not evolve into the villain.
My successful villains has been as follows:
The Multiple Mercenary: This is a guy that has a reputation for success (think Fett), hires a bunch of mercs to dress and act like him (i.e. he pays them a good percentage of the jobs they take for him). When the party first met him, it was actually a duplicate. When the party killed the duplicate, they were contacted by the guy at extreme range at a later time (about a week later) congratulating them on a job well done and starting the rivalry.
They never did know if they fought and killed the real one. ..
The Ally Turned Villain: This can have a few approaches, but you basically take a character the party works with and trusts (I've used politicians, soldiers, and even just bartenders). Then add a big issue that puts this person in hot water (new position they can take, being captured and tortured behind enemy lines, watching the bar getting burned down). Make a reason for them to want to turn on the party (it is part of a backroom deal to get the position, part of the brainwashing indoctrination, they had a large tab they never paid). Boom, instant villain that knows the party.
For an actual example, I had a Padawan that survived Order 66 as an NPC to help the force-sensitives in the party learn a few tricks. She was a Y-Wing pilot for the Rebellion and, during a heated battle, ejected but was not recovered due to everyone having to GTFO; it was assumed she was dead. She returned later on with two red lightsabers and bitter feelings of being left behind, tortured, and when her "gift" was discovered, she joined the Inquisitorious.
The Patron Turned Traitor: This one can be cliche depending on how you do it. Yes, in some circles it is expected that the Hutt is going to hunt you down over something stupid. But what if the party always did well by them and they decided to turn against them; not over a botched job, but something bigger. Perhaps because they are worth more money than the services provided. Maybe they are paranoid that the party knows too much of the operation they run. It could even be that the patron is promoting some sort of rivalry and doing a bunch of behind-the-scenes madness that can make the party confront them later.
Here's a kicker for you: I had a Hutt with multiple smugglers working for him. At times, he assigned the same cargo to multiple ships to see who would succeed. This often lead to a lot of rivalry among his smugglers as they sabotaged each other. He would often hire groups to sabotage his own smuggling groups just to hold something over their heads. There was also the time he recorded the multiple parties duking it out and having Imperials come in to cause it. . .which was then mass produced, sent out across the galaxy and the party realized they were essentially blacklisted.
In any case, each of the villain ideas have to be carefully done. Too obvious, and the villain is going to be hated outright and possibly killed too early. Not obvious enough, and the party will feel slighted.
If you really want a villain messing with the ship, there are more creative things than leaving a note. For example, the controls can be locked and you'll need a slicer to get it fixed, but there's a little bit of code that is clearly a foreboding warning.
You could also have different types of sabotage that you wouldn't notice until it's too late. For example, they get settled in with the cargo, hit the comm to request clearance to leave, and boom, the comms blast out a signal to everyone in range with a vague threat planted by the villain.
And, as others have said, it may help if you have a better idea about your villain before you go willy-nilly with things said villain is going to do to the party. . .
Basically, with your idea, get CREATIVE. Don't limit yourself too much.