The complex sentence is #1. Its independent clause is "the sky became blue." The dependent clause is "after the rain ended."
#2 is a simple sentence: one subject, one verb.
#3 contains two independent clauses. They are connected here by a semi-colon. A semi-colon is one way to connect independent clauses. You could also use "and" in this case. Or, you could make this sentence into a complex sentence making the first clause a dependent clause. Then the sentence would be: "When I came home, I saw an envelope in the mailbox."
#4 is a compound sentence. It has two independent clauses joined by the coordinating conjunction "but."