Oregon
In Oregon we receive our ballots 2-3 weeks before the election. We fill out our ballot, insert it into a secrecy envelope then insert that into an outer envelope with our name on it that we have to sign. When the ballot is received by the county clerk the signature on the outer envelope is compared to the signature on our voter registration and if they match then the secrecy envelope is separated from the outer envelope and put in the pile to be opened in a separate process to later be counted. If the signature doesn't match well enough they will let you know and give you a chance to confirm you signed the envelope. If you're worried about security in the US Mail you can deliver your ballot to the county clerk's office personally. I do that just because it's conveniently only about 5 blocks from my house on my way to work.
The difference between Oregon's vote by mail and online voting is that we fill out a paper ballot that can be recounted if necessary. In online voting there isn't any physical record of your vote, it's all electronic. Even if you make a printout of your ballot at home there is no way it can be used by elections officials to confirm anything.