First If you are able to send mails through terminal to shared hosting server, you can send mails through bugzilla too.
The sendmail option is correct in mail_delivery_method of bugzilla. The smtp option can give errors in some cases. As you have said, you are able to send mails to gmail, yahoo etc but not to shared hosting server.
The problem is in your postfix settings not on the shared mail server.
open /etc/postfix/main.cf
Take back up of your main.cf, Remove lines (myhostname to inet_interfaces) from your file and put these lines into it.
Code:
Serverhostname = mail.abc.com
myhostname = mail.abc.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = abc.com
mydestination = mail.abc.com
relayhost =
mynetworks = 127.0.0.1/8 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.2.4
mailbox_size_limit = 0
recipient_delimiter =
inet_interfaces = all
relaydomains =
mydomain = abc.com
abc.com is domain of your shared hosting server and mail.abc.com is address of mail server on your hosting server.
Now it will send mails on all sites plus shared hosting servers.
OR
Take backup of your main.cf and remove all contents of it and put these lines in main.cf.
Code:
#See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myorigin = /etc/mailname
relayhost =
inet_interfaces = loopback-only
local_transport = error:local delivery is disabled
This is complete text of /etc/main.cf. Both ways worked for me.
Put your domain name of server in file /etc/mailname instead of your system name.