this is highly illegal. while religious leaders can openly endorse a political candidate, they can not emplore you to vote for one as part of their duties within the religious organisation. if you were speaking to your rabbi because he is your rabbi, and not because you were having him over for dinner or because you bumped into him on the subway, and he told you to vote for trump, then he is in breach of laws that prevent religious organisations from partaking in political advocacy as a condition of their tax exempt status. i won't tell you to snitch on your rabbi, as this could create a lot of drama and tension for you in your community. but next time he tries this i would strongly advice that you remind him of his obligations and responsibilities as a representative of a religious organisation.
Australia