Can anyone explain what are the inbound and outbound relay in the mail server?
An inbound SMTP relay can be seen as a firewall filtering data coming from outside, it receives emails that are destined to your domains and redirects them to your main mail server. It usually filters emails with a destination that is not one of your domains, or emails containing spam or viruses...
An outbound SMTP relay receives all the emails from your main mail server which are destined to the outside world and sends them to the appropriate outside mail servers. It can also filter emails that contain spam or viruses.
Be sure to read about Open mail relay and make sure that your relays are not open relays.