MRatWork Forum by Mustafa Ramadhan

Sawo Project - Kloxo-MR Discussions => Kloxo-MR Technical Helps => Topic started by: Alex on 2016-03-07, 09:46:50

Title: Can't send mail to external domains
Post by: Alex on 2016-03-07, 09:46:50
Hi, I don't seem to be able to send (external) email from Kloxo.

I can receive emails.
I can send emails to local domains (i.e. on the same VPS)
rDNS is correctly setup by my host.
My host has confirmed that they do not block mail in any way.
intoDNS seems to suggest everything is fine.

I have run through all of the repairs under "additional info" here: http://forum.mratwork.com/kloxo-mr-tips-and-tricks/%28tip%29-how-to-setup-qmail-on-kloxo-mr/ (http://forum.mratwork.com/kloxo-mr-tips-and-tricks/%28tip%29-how-to-setup-qmail-on-kloxo-mr/)

sh /script/sysinfo
Code: [Select]
A. Control Panel:
   - Kloxo-MR: 7.0.0.b-2016030202
   - Web: hiawatha-10.1.0-f.6.mr.el6.x86_64
   - PHP: php54s-5.4.45-2.w6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) x86_64
   - Hostname: xxxx.co.uk
C. Services:
   1. MySQL: MariaDB-server-10.0.24-1.el6.x86_64
   2. PHP:
      - Branch: php56u-cli-5.6.18-1.ius.el6.x86_64
      - Multiple:
        * php52m-5.2.17-102.mr.el6
        * php53m-5.3.29-1.ius.el6
        * php54m-5.4.45-2.w6
        * php55m-5.5.32-1.ius.el6
        * php56m-5.6.18-1.ius.el6
        * php70m-7.0.3-1.w6
      - Used: php56m
   3. Web Used: apache
     - Hiawatha: --unused--
     - Lighttpd: --uninstalled--
     - Nginx: --uninstalled--
     - Httpd: httpd-2.2.31-1.mr.el6.x86_64
       - PHP Type: php-fpm_event
   4. WebCache: none
     - ATS: --uninstalled--
     - Squid: --uninstalled--
     - Varnish: varnish-3.0.7-1.el6.x86_64
   5. Dns: bind
     - Bind: bind-9.9.7-1.mr.el6.x86_64
     - DJBDns: --uninstalled--
     - NSD: --uninstalled--
     - PowerDNS: --uninstalled--
     - Yadifa: --uninstalled--
   6. Mail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
      - pop3/imap4: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64      - spam: spamassassin
D. Memory:
                total       used       free     shared    buffers     cached
   Mem:          1024       1004         19        131          0        682
   -/+ buffers/cache:        322        701
   Swap:          256         40        215
E. Disk Space:
   Filesystem      Size  Used Avail Use% Mounted on
   simfs            25G  1.1G   24G   5% /

*** Process Time: 00:00:00:05.5254 (dd:hh:mm:ss:xxxxxx) ***

* Note: run 'sh /script/sysinfo -y' if you want run 'fix-service-list' also
        (importance after Kloxo-MR update)

hostname -f
Code: [Select]
xxxx.co.uk
hostname -s
Code: [Select]
xxxx
I do see an error in /var/log/maillog (I've XXXXX'ed the gmail address that I've tried to send to).  I do see the same error trying to send to other domains as well.
Code: [Select]
Mar  7 08:54:54 xxxx logger: sendmail: CALLER="php-fpm: pool default" PWD="/home/kloxo/httpd/webmail/roundcube" BAN="no"
Mar  7 08:54:55 xxxx send: new msg 45090342
Mar  7 08:54:55 xxxx send: info msg 45090342: bytes 438 from <contact@xxxx.co.uk> qp 1164 uid 48
Mar  7 08:54:55 xxxx imap4: tcpserver: status: 1/40
Mar  7 08:54:55 xxxx imap4: tcpserver: pid 1165 from ::1
Mar  7 08:54:55 xxxx imap4: tcpserver: ok 1165 xxxx.co.uk:::1:143 :::1::48963
Mar  7 08:54:55 xxxx send: starting delivery 3: msg 45090342 to remote XXXXXX@gmail.com
Mar  7 08:54:55 xxxx send: status: local 0/10 remote 1/60
Mar  7 08:54:55 xxxx imap4: DEBUG: Connection, ip=[::1]
Mar  7 08:54:55 xxxxx imap4: INFO: LOGIN, user=contact@xxxx.co.uk, ip=[::1], protocol=IMAP
Mar  7 08:54:55 xxxx imap4: INFO: LOGOUT, user=contact@xxxx.co.uk, ip=[::1], headers=0, body=0, rcvd=488, sent=274, time=0
Mar  7 08:54:55 xxxx imap4: tcpserver: end 1165 status 0
Mar  7 08:54:55 xxxx imap4: tcpserver: status: 0/40
Mar  7 08:54:55 xxxx send: delivery 3: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Mar  7 08:54:55 xxxx send: status: local 0/10 remote 0/60
Mar  7 08:54:56 xxxx imap4: tcpserver: status: 1/40
Mar  7 08:54:56 xxxx imap4: tcpserver: pid 1184 from ::1
Mar  7 08:54:56 xxxx imap4: tcpserver: ok 1184 xxxx.co.uk:::1:143 :::1::48988
Mar  7 08:54:56 xxxx imap4: DEBUG: Connection, ip=[::1]
Mar  7 08:54:56 xxxx imap4: INFO: LOGIN, user=contact@xxxx.co.uk, ip=[::1], protocol=IMAP
Mar  7 08:54:56 xxxx imap4: INFO: LOGOUT, user=contact@xxxx.co.uk, ip=[::1], headers=0, body=0, rcvd=78, sent=639, time=0
Mar  7 08:54:56 xxxx imap4: tcpserver: end 1184 status 0
Mar  7 08:54:56 xxxx imap4: tcpserver: status: 0/40

Any suggestions?
Thanks,
Alex
Title: Re: Can't send mail to external domains
Post by: nikobellicgamerin on 2016-03-07, 11:06:04
Yes same problum with me in kloxo 6.5 , it says mail sent but no mail received by any gmail or any other mail.
Title: Re: Can't send mail to external domains
Post by: MRatWork on 2016-03-07, 12:06:24
Your hostname must be 'server1.xelaser.co.uk' instead 'xelaser.co.uk'.

Try 'yum reinstall *-toaster; sh /script/fixmail-all; sh /script/restart-mail'.
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-07, 13:01:30
Done that, still the same issue.

hostname -f
Code: [Select]
alpha.xxxx.co.uk
hostname -s
Code: [Select]
aplha
/var/log/maillog
Code: [Select]
Mar  7 12:08:42 alpha logger: sendmail: CALLER="php-fpm: pool default" PWD="/home/kloxo/httpd/webmail/roundcube" BAN="no"
Mar  7 12:08:42 alpha send: new msg 45090226
Mar  7 12:08:42 alpha send: info msg 45090226: bytes 440 from <contact@xxxx.co.uk> qp 2481 uid 48
Mar  7 12:08:42 alpha send: starting delivery 7: msg 45090226 to remote XXXXXX@gmail.com
Mar  7 12:08:42 alpha send: status: local 0/10 remote 1/60
Mar  7 12:08:42 alpha imap4: tcpserver: status: 1/40
Mar  7 12:08:42 alpha imap4: tcpserver: pid 2483 from ::1
Mar  7 12:08:42 alpha imap4: tcpserver: ok 2483 alpha.xxxx.co.uk:::1:143 :::1::55926
Mar  7 12:08:42 alpha imap4: DEBUG: Connection, ip=[::1]
Mar  7 12:08:42 alpha imap4: INFO: LOGIN, user=contact@xxxx.co.uk, ip=[::1], protocol=IMAP
Mar  7 12:08:42 alpha imap4: INFO: LOGOUT, user=contact@xxxx.co.uk, ip=[::1], headers=0, body=0, rcvd=490, sent=274, time=0
Mar  7 12:08:42 alpha imap4: tcpserver: end 2483 status 0
Mar  7 12:08:42 alpha imap4: tcpserver: status: 0/40
Mar  7 12:08:42 alpha send: delivery 7: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Mar  7 12:08:42 alpha send: status: local 0/10 remote 0/60
Title: Re: Can't send mail to external domains
Post by: MRatWork on 2016-03-07, 13:29:57
Make sure every domain must enable spf (in 'email auth') and enable domainkeys (in 'server mail settings').
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-07, 13:39:38
Yep, those are already on.

I'm assuming that based on the error "Sorry,_I_wasn't_able_to_establish_an_SMTP_connection." that spf or domainkeys aren't going to be the issue though?
Title: Re: Can't send mail to external domains
Post by: MRatWork on 2016-03-07, 13:53:13
Check your domain with mxtoolbox.com. Look like spf didn't exists.;
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-07, 14:09:34
Where can I find the details required for the spf record?  Kloxo VPS isn't the name server, so it will need to be added separately to the name server
Title: Re: Can't send mail to external domains
Post by: MRatWork on 2016-03-07, 14:15:52
Find out 'manage dns' in your Kloxo-MR and copy all records (except 'ns record') to your external dns server. Make sure, enable spf and domainkeys first.
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-07, 14:44:19
Thanks. Done that, same effect still I'm afraid.
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-08, 12:11:41
So I've managed to get some messages through, it looks like my host is blocking some for some reason.  Currently messages from the webserver (running Magento) get through, but messages from roundcube webmail are eaten.

A rejected message header from roundcube looks like this:
Code: [Select]
Received: (qmail 18850 invoked by uid 48); 7 Mar 2016 16:20:24 -0000
To: XXXXXX@gmail.com
Subject: test message
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII;
format=flowed
Content-Transfer-Encoding: 7bit
Date: Mon, 07 Mar 2016 16:20:24 +0000
From: contact@xxxx.co.uk
Message-ID: <c28bdce4822ee9c562b62c6bf7597c3a@xxxx.co.uk>
X-Sender: contact@xxxx.co.uk
User-Agent: Roundcube Webmail/1.1.2

Whereas a successful message from the webserver looks like:
Code: [Select]
Received: (qmail 2964 invoked by uid 7797); 8 Mar 2016 11:58:28 -0000
Date: 8 Mar 2016 11:58:28 -0000
Message-ID: <20160308115828.2963.qmail@alpha.xxxx.co.uk>
To: XXXXXX XXXXXX <XXXXXX@gmail.com>
Subject: Reset your xxxx password
From: xxxx <contact@xxxx.co.uk>
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
MIME-Version: 1.0
Title: Re: Can't send mail to external domains
Post by: MRatWork on 2016-03-08, 16:14:43
How many IP Address you have?.
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-08, 16:17:38
Just 1
Title: Re: Can't send mail to external domains
Post by: MRatWork on 2016-03-08, 16:22:39
If you enable 'DMARC' in 'Email Auth', gmail.com will be send you reports related to email received from you.
Title: Re: Can't send mail to external domains
Post by: Alex on 2016-03-08, 16:27:30
Don't think that helps as they're being rejected by my hosting company before they make it to gmail.

Currently they're accepting messages sent by apache (Magento), and rejecting messages sent by roundcube or android mail client via smtp