Cannot send emails (zimbra on Azure VM) [SOLVED]

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
diznpc
Posts: 6
Joined: Sat Jun 16, 2018 8:49 pm

Cannot send emails (zimbra on Azure VM) [SOLVED]

Post by diznpc »

Hello! I recently installed Zimbra on Microsoft Azure for a project i need to do. The admin panel is working fine and i can receive emails from gmail for example, but i cannot send any emails. MXtoolbox errors:

Code: Select all

Connecting to 104.42.53.2

220-mail.jimkomzimbra.tk ESMTP Postfix
220 mail.jimkomzimbra.tk ESMTP Postfix [6727 ms]
EHLO EC2AMAZ-14J9QQI.mxtoolbox.com
250-mail.jimkomzimbra.tk
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN [681 ms]
MAIL FROM:<supertool@mxtoolbox.com>
250 2.1.0 Ok [672 ms]
RCPT TO:<test@mxtoolboxsmtpdiag.com>
554 5.7.1 <test@mxtoolboxsmtpdiag.com>: Relay access denied [672 ms]
What do i need to do?
Last edited by diznpc on Tue Jun 19, 2018 9:45 pm, edited 1 time in total.
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Cannot send emails

Post by phoenix »

I'm afraid that information you've supplied doesn't show anything other a test of your server by the MXtoolbox test sites and there's nothing wrong with what you've posted. You're going to have to give a bit more information about your exact problem.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
diznpc
Posts: 6
Joined: Sat Jun 16, 2018 8:49 pm

Re: Cannot send emails

Post by diznpc »

phoenix wrote:I'm afraid that information you've supplied doesn't show anything other a test of your server by the MXtoolbox test sites and there's nothing wrong with what you've posted. You're going to have to give a bit more information about your exact problem.
What do you want me to post? I'm a beginner so I don't know much about the logs here. Here is the zimbra log when I'm trying to send from my zimbra account (on azure VM) to my gmail account:

Code: Select all

Jun 16 20:57:53 mail amavis[109630]: (109630-07) F8kW7LQEvIjX FWD from <admin@mail.jimkomzimbra.tk> -> <jim.kom.147@gmail.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10030): 250 2.$
Jun 16 20:57:53 mail amavis[109630]: (109630-07) Passed CLEAN {RelayedOutbound}, ORIGINATING/MYNETS LOCAL [127.0.0.1]:43902 <admin@mail.jimkomzimbra.tk> -> <jim.kom.147@gmail.com>, Queue-I$
Jun 16 20:57:53 mail postfix/smtp[42662]: 9515ABF8F0: to=<jim.kom.147@gmail.com>, relay=127.0.0.1[127.0.0.1]:10026, delay=0.16, delays=0.02/0.01/0/0.13, dsn=2.0.0, status=sent (250 2.0.0 f$
Jun 16 20:57:53 mail postfix/qmgr[110059]: 9515ABF8F0: removed
Jun 16 20:57:53 mail amavis[109611]: (109611-06) ESMTP [127.0.0.1]:10032 /opt/zimbra/data/amavisd/tmp/amavis-20180616T192955-109611-JOFQeh01: <admin@mail.jimkomzimbra.tk> -> <jim.kom.147@g$
Jun 16 20:57:53 mail amavis[109611]: (109611-06) Checking: 7CHxa7X849vX ORIGINATING_POST/MYNETS [127.0.0.1] <admin@mail.jimkomzimbra.tk> -> <jim.kom.147@gmail.com>
Jun 16 20:57:54 mail postfix/amavisd/smtpd[42667]: connect from localhost[127.0.0.1]
Jun 16 20:57:54 mail postfix/amavisd/smtpd[42667]: 0B36EBF8F0: client=localhost[127.0.0.1]
Jun 16 20:57:54 mail postfix/cleanup[42661]: 0B36EBF8F0: message-id=<1909918067.34.1529182673517.JavaMail.zimbra@mail.jimkomzimbra.tk>
Jun 16 20:57:54 mail postfix/amavisd/smtpd[42667]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Jun 16 20:57:54 mail postfix/qmgr[110059]: 0B36EBF8F0: from=<admin@mail.jimkomzimbra.tk>, size=1988, nrcpt=1 (queue active)
Jun 16 20:57:54 mail amavis[109611]: (109611-06) 7CHxa7X849vX FWD from <admin@mail.jimkomzimbra.tk> -> <jim.kom.147@gmail.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.$
Jun 16 20:57:54 mail amavis[109611]: (109611-06) Passed CLEAN {RelayedOutbound}, ORIGINATING_POST/MYNETS LOCAL [127.0.0.1]:47450 <admin@mail.jimkomzimbra.tk> -> <jim.kom.147@gmail.com>, Qu$
Jun 16 20:57:54 mail postfix/smtp[42666]: ACF75BF8F1: to=<jim.kom.147@gmail.com>, relay=127.0.0.1[127.0.0.1]:10032, delay=0.36, delays=0.06/0.01/0/0.29, dsn=2.0.0, status=sent (250 2.0.0 f$
Jun 16 20:57:54 mail postfix/qmgr[110059]: ACF75BF8F1: removed
Jun 16 20:58:00 mail postfix/qmgr[110059]: 88770BF8CC: from=<admin@mail.jimkomzimbra.tk>, size=1961, nrcpt=1 (queue active)
Jun 16 20:58:02 mail zmconfigd[107659]: Fetching All configs
Jun 16 20:58:02 mail zmconfigd[107659]: All configs fetched in 0.05 seconds
Jun 16 20:58:06 mail zmconfigd[107659]: Watchdog: service antivirus status is OK.
Jun 16 20:58:06 mail zmconfigd[107659]: All rewrite threads completed in 0.00 sec
Jun 16 20:58:06 mail zmconfigd[107659]: All restarts completed in 0.00 sec
Jun 16 20:58:24 mail postfix/smtp[42668]: connect to gmail-smtp-in.l.google.com[74.125.195.26]:25: Connection timed out
Jun 16 20:58:30 mail postfix/smtp[42674]: connect to aspmx.l.google.com[74.125.197.26]:25: Connection timed out
Jun 16 20:58:38 mail sshd[43493]: Failed password for root from 218.65.30.107 port 13083 ssh2
Jun 16 20:58:43 mail sshd[43493]: message repeated 2 times: [ Failed password for root from 218.65.30.107 port 13083 ssh2]
Jun 16 20:58:43 mail sshd[43493]: Received disconnect from 218.65.30.107 port 13083:11:  [preauth]
Jun 16 20:58:43 mail sshd[43493]: Disconnected from 218.65.30.107 port 13083 [preauth]
Jun 16 20:58:54 mail postfix/smtp[42668]: connect to alt1.gmail-smtp-in.l.google.com[74.125.126.26]:25: Connection timed out
Jun 16 20:59:00 mail postfix/smtp[42674]: connect to alt1.aspmx.l.google.com[74.125.126.26]:25: Connection timed out
Jun 16 20:59:06 mail zmconfigd[107659]: Fetching All configs
Jun 16 20:59:06 mail zmconfigd[107659]: All configs fetched in 0.03 seconds
Jun 16 20:59:10 mail zmconfigd[107659]: Watchdog: service antivirus status is OK.
Jun 16 20:59:10 mail zmconfigd[107659]: All rewrite threads completed in 0.00 sec
Jun 16 20:59:10 mail zmconfigd[107659]: All restarts completed in 0.00 sec
Jun 16 20:59:24 mail postfix/smtp[42668]: connect to alt2.gmail-smtp-in.l.google.com[64.233.185.26]:25: Connection timed out
Jun 16 20:59:30 mail postfix/smtp[42674]: connect to alt2.aspmx.l.google.com[64.233.185.26]:25: Connection timed out
Jun 16 20:59:54 mail postfix/smtp[42668]: connect to alt3.gmail-smtp-in.l.google.com[209.85.144.26]:25: Connection timed out
Jun 16 21:00:00 mail postfix/smtp[42674]: connect to alt3.aspmx.l.google.com[209.85.144.26]:25: Connection timed out
Jun 16 21:00:01 mail zimbramon[43987]: 43987:info: 2018-06-16 21:00:01, QUEUE: 11 6
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Cannot send emails

Post by phoenix »

That information only shows that an attempted connection to gmail "timed out", that's the reason you can't send mail. You'll have to determine why you can't make an outbound connection on port 25, perhaps you have a firewall problem or your ISP is blocking outbound port 25? You can confirm this behaviour by connecting to the ZCS server via ssh then doing a "telnet <gmail ip> 25" - pick one of the gmail IPs and see what happens.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
diznpc
Posts: 6
Joined: Sat Jun 16, 2018 8:49 pm

Re: Cannot send emails

Post by diznpc »

phoenix wrote:That information only shows that an attempted connection to gmail "timed out", that's the reason you can't send mail. You'll have to determine why you can't make an outbound connection on port 25, perhaps you have a firewall problem or your ISP is blocking outbound port 25? You can confirm this behaviour by connecting to the ZCS server via ssh then doing a "telnet <gmail ip> 25" - pick one of the gmail IPs and see what happens.
Ok, so I did a telnet on port 25 and didn't connect, but it did connect on port 465. What do I need to change so that I can work with that port? Also, thank you for your help.
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Cannot send emails

Post by phoenix »

diznpc wrote:Ok, so I did a telnet on port 25 and didn't connect, but it did connect on port 465. What do I need to change so that I can work with that port? Also, thank you for your help.
SMTP doesn't work like that. If you are sending (and receiving) mail to and from other mail servers then they connect over port 25 and only that port for an SMTP connection. Port 465 is a 'submission' port for 'fat' mail clients to connect to a mail server and send mail which then goes out via port 25. You need to determine why you can't connect via port 25, as I mentioned you may have a firewall problem of an ISP that doesn't let you send outbound mail via port 25, as I don't know your configuration I'm not able to advise you what to do next.

A quick internet search found this article: https://blogs.msdn.microsoft.com/mast/2 ... 17-update/

I'm guessing that's your problem, what they're talking about in that article is you using a mail relay service that will allow you to send mail via another server (on port 587 or 465) so that you're not blocked - It's most likely that some of these services charge a fee. You could always use a hosting provider that doesn't block port 25. :)

Another internet search finds these services, one of which is google (although I prefer to steer clear of their services): https://www.startpage.com/do/dsearch?qu ... ge=english
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
diznpc
Posts: 6
Joined: Sat Jun 16, 2018 8:49 pm

Re: Cannot send emails

Post by diznpc »

phoenix wrote:
diznpc wrote:Ok, so I did a telnet on port 25 and didn't connect, but it did connect on port 465. What do I need to change so that I can work with that port? Also, thank you for your help.
SMTP doesn't work like that. If you are sending (and receiving) mail to and from other mail servers then they connect over port 25 and only that port for an SMTP connection. Port 465 is a 'submission' port for 'fat' mail clients to connect to a mail server and send mail which then goes out via port 25. You need to determine why you can't connect via port 25, as I mentioned you may have a firewall problem of an ISP that doesn't let you send outbound mail via port 25, as I don't know your configuration I'm not able to advise you what to do next.

A quick internet search found this article: https://blogs.msdn.microsoft.com/mast/2 ... 17-update/

I'm guessing that's your problem, what they're talking about in that article is you using a mail relay service that will allow you to send mail via another server (on port 587 or 465) so that you're not blocked - It's most likely that some of these services charge a fee. You could always use a hosting provider that doesn't block port 25. :)

Another internet search finds these services, one of which is google (although I prefer to steer clear of their services): https://www.startpage.com/do/dsearch?qu ... ge=english
I see. So, I created a sendgrid account. Do I need to follow this article https://wiki.zimbra.com/wiki/Outgoing_S ... entication now?
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Cannot send emails

Post by phoenix »

Yes, that article should be the one you use AFAIK.
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
diznpc
Posts: 6
Joined: Sat Jun 16, 2018 8:49 pm

Re: Cannot send emails

Post by diznpc »

phoenix wrote:Yes, that article should be the one you use AFAIK.
I'm halfway of completing the article , but I got a problem. It says here to use the "zmproc" command :

Code: Select all

postconf -e smtp_cname_overrides_servername=no
On 8.0:
zmlocalconfig -e postfix_smtp_cname_overrides_servername=no
On 8.5 and later:
zmproc ms <server> zimbraMtaSmtpCnameOverridesServername no
But it returns a "command not found" and I also searched the "zmproc" command on google, but only "zmprov" shows up. Could that be a mispelling?

Edit: I'm sure it's a misspelling because almost all commands are "zmprov" but I'm pointing it out, so that someone can change it. :)
phoenix
Ambassador
Ambassador
Posts: 27272
Joined: Fri Sep 12, 2014 9:56 pm
Location: Liverpool, England

Re: Cannot send emails

Post by phoenix »

It is a spelling error. I've pointed people to that article for years and you're the first one to point out that error, thanks for that and I've corrected it. :)

BTW, I'd be interested to hear how you get on with using the mail relay service. If you have the time when you' got it running and a spare moment could you post an update in this thread? If if your issue is resolved could you also mark this thread as ["Solved]" (unfortunately you'll have to edit your first post to modify the title)?
Regards

Bill

Rspamd: A high performance spamassassin replacement

Per ardua ad astra
Post Reply