HAMILTON - Canada Post and the city of Hamilton are bracing for battle -- and municipalities across the country are watching to see who wins.

The fight is over just how much of a say local governments can have over where new community mailboxes can be installed.

In the face of declining traditional mail volumes, Canada Post announced a plan in December 2013 to end door-to-door delivery and gave itself five years to implement the move to community mailboxes.

In Hamilton, after hearing resident complaints over where mailboxes were being placed, city council amended a bylaw which now requires Canada Post to obtain a permit to install the mailboxes on municipal land.

City staff would assess each mailbox's location to ensure it meets city standards before granting the permit.

But Canada Post is ignoring the bylaw, saying it has exclusive jurisdiction over postal services and the legal authority to install community mailboxes on municipally owned property.

When the city issued an order in late April for the mail service to stop installing the community mailboxes until it complied with the bylaw, Canada Post filed a notice in Ontario Superior Court asking for the bylaw to be declared invalid.

The issue will be heard before a court later this month