The most recent two prior years' returns/amendments can be e-filed if you have an Identity Protection PIN (IP PIN). If you don't want to apply for an IP PIN, you can still mail your returns.
Any returns/amendments more than two years prior to the current tax year must be mailed.