I have an Elastix server box that I want to send email notifications of voice mails from. I'd like to send them through our company email (hosted by shared web host provider Bluehost). I have followed instructions on how to use Postfix as a relay server. Emails don't go out tho. I get the following in the logs (slightly obfuscated):
Sep 27 16:31:51 TD1000 postfix/smtp: 1B2C357117: to=<firstname.lastname@example.org>, relay=boxNNN.bluehost.com[a.b.c.d]:465, delay=5241, delays=5076/0.03/165/0, dsn=4.4.2, status=deferred (lost connection with boxNNN.bluehost.com[a.b.c.d] while receiving the initial server greeting)
Various places suggest that it might be a blacklisting issue. However, it seems like that would be an issue for my outlook running on my PC also. What I am trying to do is get the postfix to act like Outlook, and send through Bluehost, using SSL. (my outlook settings: boxNNN.bluehost.com:465, SSL, authentication required)
When I up the debugging level, I get the following message:
dns_query: boxNNN.bluehost.com (MX): Host found but no data record of requested type
But since the ultimate message is no response, and it finds an IP address for the server, I don't the DNS issues are the problem.
postconf -n reveals:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 5 debug_peer_list = boxNNN.bluehost.com html_directory = no inet_interfaces = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost mydomain = cenginc-office.local myhostname = td1000.my-office.local mynetworks = /etc/postfix/network_table newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.5.6/README_FILES relayhost = boxNNN.bluehost.com:465 sample_directory = /usr/share/doc/postfix-2.5.6/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_connect_timeout = 300 smtp_enforce_tls = yes smtp_helo_name = my-phone-system smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = smtp_sasl_type = cyrus smtpd_sasl_auth_enable = yes smtpd_sasl_path = smtpd unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual virtual_mailbox_base = /var/mail/vhosts virtual_mailbox_domains = virtual_transport = lmtp:unix:/var/lib/imap/socket/lmtp
(we are using Postifix 2.3.3 according to the Elastix UI, so I'm not sure why the samples say 2.5.6)
When I telnet to the bluehost box and port, the connection remains open for a short time, and then closes, I think because I'm not coming in as SSL.
I used this site (among others) for the configuration, but I don't see what I'm missing. https://www.zulius.com/how-to/set-up-postfix-with-a-remote-smtp-relay-host/
Any ideas on what I'm doing wrong? My theory is that postfix isn't doing something that bluehost expects in the initial connection, but I have no idea what. Thanks for your help.