Yahoo and Google have been hit with separate lawsuits for allegedly violating a California privacy law by scanning emails in order to determine which ads to serve to recipients. One case against Yahoo lawsuit, filed last week by Alabama resident Carson Penkava, alleges that Yahoo intercepts messages sent from non-Yahoo email accounts to recipients who use Yahoo. The company then allegedly deploys "devices and techniques to review those emails for their words, content and thought processes," Penkava says in a complaint filed in federal court in San Jose, Calif. He argues that the practice violates his privacy because he doesn't use Yahoo, and didn't consent to the company's alleged interception of the messages he wrote. Three California residents -- Stuart Diamond, David Sutton and Roland Williams -- also reportedly sued Yahoo and Google in Marin County state court. The consumers argue that the Web companies are violating California's Invasion of Privacy Act -- a state wiretap law that prohibits companies from intercepting communications while they're in transmit, without all parties' consent. "The invasion of privacy by wiretapping or ... seriously threatens the free exercise of personal liberties," reads one of the complaints against Yahoo. Yahoo's current privacy policy allows it to serve ads to users based on terms in their email messages.Google, which has long served contextual ads to Gmail users, has been sued in federal court at least twice since 2010 over the practice. One case, a potential class-action filed by Texas resident Keith Dunbar, was transferred late last month from federal court in Texas to federal court in San Jose, Calif. The other lawsuit against Google about Gmail ads was dropped in May without explanation, according to court records. Google has argued that scanning emails in order to provide targeted ads is "a necessary and fundamental aspect of Google's aim to better serve its Gmail customers." Google also says in an online privacy statement that Gmail "scans and processes all messages using fully automated systems in order to do useful and innovative stuff like filter spam, detect viruses and malware, show relevant ads, and develop and deliver new features." When Google launched Gmail in 2004, the company faced complaints by privacy advocates, but those concerns seemed to fade. At one point, however, more than 30 groups protested Google's "scanning of confidential email," and one California lawmaker unsuccessfully attempted to outlaw the scanning of emails by providers.