The app uses:
1 - the IMAP "XLIST" extension, where the server says "this folder Foo is for drafts, and this folder Bar is the trash can".
2 - a predefined set of common names for these folders, like "Spam", "Junk", "Sent Items", etc. for those servers that don't support the extension (Yahoo, I'm looking at you).
Other than that, Thomas' answer is spot on, as usual. In the folder list window, tap one of those server folders that have a special meaning, and choose to "Sync with [ Sent ]", etc. as appropriate.