Malaysia's immigration department has detained 501 migrants, including 15 Bangladeshis.