There is a nuclear war. It lasts for 4 hours and most cities are destroyed. How long could a sewer last without maintenance?
Unfortunately not more than 48 hours in many cases
Gone are the days where sewer systems in cities were simple tunnels or underwater rivers, flowing out to sea.
Modern cities are large, complex and cover undulating and complex topography. Population demands are also large - the sheer quantity of effluent requiring disposal is a major factor in a modern city. Gravity fed sewers work to a point, however in most modern cities sewerage is pumped to treatment plants located away from populated areas, in particular in sloping sites, hilly terrain or cities in basin-like areas.
Some cities, in particular those in complex terrain, even use 'vacuum pipes' to assist in drawing effluent through pipes.
A sewer system in a city is one of the most expensive infrastructure costs in modern cities - with new developers often having to contribute large amounts to improve the system when they develop property. Constant maintenance is required, they are constantly being cleaned out, upgraded and worked on - everyday large parts of cities are affected in this manner. Without this the sewer system will quickly fail.
Although treatment itself is varied, with hundreds of utilised techniques to treat waste water, in the end a nuclear attack will likely disable all electrical systems, including water and sewerage pumps and plants.
It would only be a small matter of time for the dormant pipes fill with waste (keep in mind not just blackwater is disposed of in sewerage systems, but grey water and on some occasions stormwater too), without normal operation they would be filled to capacity or clog within a short amount of time, likely within a day or two of disposal entering the pipes.