New rules that take effect Sunday will prohibit banks from charging overdraft fees on most debit and ATM card transactions without a customer’s permission. But the rules will not prevent banks from posting a customer’s daily checking account transactions in a way that maximizes these fees.

Neither will this week’s court ruling against Wells Fargo, at least not immediately.

On Tuesday, U.S. District Court Judge William Alsup found that Wells Fargo’s transaction-ordering process violated California law and ordered the bank to refund about $203 million in overdraft fees.

At the end of each day, Wells processes the day’s transactions in a customer’s checking account. It first posts deposits and other credits. According to the lawsuit, it then posted checks, cash and ATM withdrawals, debit card purchases and other debits, starting with the highest dollar amount and working down to the lowest dollar amount.

Before 2001, Wells posted debit items smallest to largest, to minimize fees. In 2001, it began processing items highest to lowest to maximize fees, Alsup wrote in his opinion. He added that Wells “went to considerable effort to hide these manipulations while constructing a facade of phony disclosure.”

Wells plans to appeal the decision. Spokeswoman Richele Messick says Wells will continue posting items high to low, but it now puts debit items into two groups and processes each one separately high to low.

Unless customers opted out, Wells and other banks often allowed debit and ATM card transactions to go through even if there was not enough money in the account, thereby generating overdraft fees.

Starting July 1 for new accounts and on Sunday for existing accounts, banks can no longer charge fees for this service unless the customer opts in. Customers who do not opt in will generally have insufficient funds transactions denied. Consumers only need to opt in once, but they can opt out at any time.

The new regulations apply only to overdrafts caused by one-time purchases made with a debit or ATM card and to cash-machine withdrawals. They do not apply to recurring debit-card transactions such as gym memberships.

They also do not apply to plans in which a bank covers an insufficient funds transaction with money from the customer’s savings account or credit card. Most banks have always required customers to enroll in these plans in advance.

The new rules, which amend Federal Reserve Regulation E, do not limit how much banks can charge for overdraft fees or how many fees can be charged in a day, although some banks have begun imposing voluntary limits.

Wells Fargo, which charges $35 per overdraft, now limits them to four per day. For a survey of other bank overdraft fees, see here.

More importantly, the new rules do not tell banks in what order they can post transactions. “All they do is get consumers to affirmatively agree to allow overdrafts and pay a fee,” says Jean Ann Fox, director of financial services with the Consumer Federation of America.

In a July poll, the National Foundation for Credit Counseling found that 26 percent of the 2,089 respondents intended to opt in to overdraft protection despite the steep fees. A survey in May by Credit.com found that 48 percent of consumers planned to opt in to credit overdraft protection.

Fox says that two bills in Congress would prevent banks from posting items in ways that maximize overdraft fees, but neither bill has gotten out of committee.

Consumer groups hope the new consumer financial protection bureau, created in the financial regulation bill, will clamp down on this practice.

“It will be able to write its own rules to deal with unfair, deceptive and abusive trade practices. We think ordering payments to trigger a fee are unfair and abusive,” Fox says.

On Wednesday, the Federal Deposit Insurance Corp. proposed guidance for banks it regulates on overdraft fees. “We want them to place appropriate limits on overdraft transaction fees, such a dollar limit in a given day,” says Sandra Thompson, director of the FDIC’s division of supervision and consumer protection. “We specifically don’t want banks to process transactions in a manner that is designed to maximize the cost to the customer.”

The FDIC will issue final guidance sometime after a 45-day comment period. The FDIC supervises state banks that are not members of the Federal Reserve system. It does not supervise the large national banks.

San Francisco attorney Jim Sturdevant says the decision in the Wells Fargo case “will not by itself put an end” to practices designed to wring overdraft fees from customers. He says other banks will try to determine whether Wells is likely to win its appeal before changing their overdraft-ordering policies.