The P.O. will forward first class mail on a temporary basis for up to six months. Media such as magazines will be forwarded for the first two months of that period and discarded thereafter. If you need more than six months of forwarding, you have to file a permanent change of address. With that, they will forward first class mail up to one year (same shorter limit on media) as with temp forwarding). After a year you are out of luck on post office forwarding (they will just throw the stuff away), so in that year you have to make other arrangements and notify the senders of your new address (e.g. a UPS store mail drop, PO Box, FMCA or Escapees mail forwarding service, a friend's house, whatever).
The post office will also hold mail temporarily, but "hold" means keep at the post office until delivery is resumed to the intended address. I believe the local postmaster has discretion on how long they will hold mail, but it is generally measured in weeks rather than months.
Your best bet short term is to have your mail forwarded direct to the friend's address. If the place is to be rented long term, get an alternate address and start sending out change of address forms.