mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.71k stars 1.17k forks source link

SLOW - SMTP Connection/Transaction Time #1439

Closed ErminMerdanovic closed 5 years ago

ErminMerdanovic commented 6 years ago

Hi tested my mailserver with https://mxtoolbox.com and it said SMTP Connection/Transaction Time was very slow and i noticed on my forum that the Mails where send very slow.

What can i do about it?

hVpQ.png

andryyy commented 6 years ago

That's just Postscreen waiting for impatient spam boxes. It is an anti-spam feature and wanted. It will whitelist sane senders for a while. Am Di., Mai 29, 2018 00:19 schrieb Brattee :

Hi tested my mailserver with https://mxtoolbox.com (https://mxtoolbox.com) and it said SMTP Connection/Transaction Time was very slow and i noticed on my forum that the Mails where send very slow. 

What can i do about it? 

 (https://camo.githubusercontent.com/1b54aab7f2d61c0ff659cf5d04149f0b25079b0d/68747470733a2f2f696d672e70656e74752e65752f696d616765732f685670512e706e67) 

—

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/mailcow/mailcow-dockerized/issues/1439), or mute the thread (https://github.com/notifications/unsubscribe-auth/AC1dFsLpw6YQjikxDMk9G8lC2ACpoe8Zks5t3HffgaJpZM4UQpC2).

ErminMerdanovic commented 6 years ago

is there any way of whitlisting ips for this because some of my users wait up to 3 Minutes and the website gets stuck in that moment for the user dosent know why or should i change from ssl to tls?

andryyy commented 6 years ago

No user waits because of this...

This also never happens on port 587 and 465. Plus it never sticks the whole website. You are doing something very wrong. :-(

Is netfilter banning users? Check the netfilter logs. And never use port 25 for authenticated mailing. :-)

Am 29.05.2018 um 00:44 schrieb Brattee notifications@github.com:

is there any way of whitlisting ips for this because some of my users wait up to 3 Minutes and the website gets stuck in that moment for the user dosent know why or should i change from ssl to tls?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Viktova commented 6 years ago

@andryyy same issue is happening in here since day 1 i started using mailcow. At first, I thought it's a DNS issue and some spam thingy (hotmail, gmail and such email companies/services might take a while to trust your domain) but it's not getting any further.. sent emails are taking from 20 to 30mins and the received ones are taking up to 3 mins to get into the inbox, although i can see the emails in the logs of raspamd interface. but they wont show up in the inbox until some time later as mentioned previously. Do you suggest disabling some services? i have a Droplet on Digital Ocean with 1GB of RAM, 25GB of HDD space, and 1vCPU, i'm using it for some internal work, and i currently have 30 mailboxes (30 active users).

here're some info:

root@mail:~# free
              total        used        free      shared  buff/cache   available
Mem:        1016032      596804      105896        4340      313332      189352
Swap:       8388604     1341304     7047300
root@mail:~# netstat -tuplen
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          14705       1464/sshd
tcp        0      0 127.0.0.1:19991         0.0.0.0:*               LISTEN      0          17725       2422/docker-proxy
tcp        0      0 127.0.0.1:13306         0.0.0.0:*               LISTEN      0          18736       2857/docker-proxy
tcp6       0      0 :::22                   :::*                    LISTEN      0          14715       1464/sshd
tcp6       0      0 :::25                   :::*                    LISTEN      0          53174       6362/docker-proxy
tcp6       0      0 :::443                  :::*                    LISTEN      0          16950       1953/docker-proxy
tcp6       0      0 :::4190                 :::*                    LISTEN      0          19376       2978/docker-proxy
tcp6       0      0 :::993                  :::*                    LISTEN      0          19865       3151/docker-proxy
tcp6       0      0 :::995                  :::*                    LISTEN      0          19629       3080/docker-proxy
tcp6       0      0 :::587                  :::*                    LISTEN      0          53091       6317/docker-proxy
tcp6       0      0 :::110                  :::*                    LISTEN      0          20971       3486/docker-proxy
tcp6       0      0 :::143                  :::*                    LISTEN      0          19933       3188/docker-proxy
tcp6       0      0 :::80                   :::*                    LISTEN      0          17210       2104/docker-proxy
tcp6       0      0 :::465                  :::*                    LISTEN      0          53134       6341/docker-proxy
root@mail:~# du -hs /
18G     /
root@mail:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            487M     0  487M   0% /dev
tmpfs           100M   12M   88M  12% /run
/dev/vda1        25G   16G  8.7G  64% /
tmpfs           497M     0  497M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           497M     0  497M   0% /sys/fs/cgroup
/dev/vda15      105M  3.4M  102M   4% /boot/efi
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/e7bce1ae0183e83c8e7f72e0722869cb841c1359e2cd32cdbbb5911f826720f2/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/2d74b5f601a774428d1005f4ba515dce0768081cbb6c4b797c31a040fe8d8bad/merged
shm              64M     0   64M   0% /var/lib/docker/containers/fd7bd7b2ddf2535191cf5fcd63a02c8c1039d2d90fe9c5e6ee4c8b83a8a7d26e/mounts/shm
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/b8cc38597f36398b44f8e7b2bb42a50e4251c6556b8b21a7afc9cd0603ac81ec/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/d87f0d0e7b53eb74c9b8246f2d6d4097ce171d8b6d629c0a8a707f204f2d9deb/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/f4c37e58221a2ab034106f3774dba75f74190b24a2a2c46c581f21ed8b109ce5/merged
shm              64M     0   64M   0% /var/lib/docker/containers/ab8e88a5c8b00b080c67c99b8271dd212024885a286c9988a7685ebdc05e9bdf/mounts/shm
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/142179fa862f6ccf664bb725f937525a8ab1e140986ad64a40582262ac6fd323/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/2d7208c0bf500b0eddc55fcc65b22202c0fce8367d1d9bfae6910f0a13dbaf0d/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/c58608350948db40ed791c72cb9e3ce49c2b1cabb0a7a641c82132bb35cf18cc/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/317933949a0b1e2b4e6d3e202b2c30879993916b734a65c84cd53ea43d7f457e/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/c6f30300afd8c88cbaba5acd7db3876bf1ef09a840bebba96198099f11613e5c/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/e34e90f4c836ab7578a28e469cd894f78484bab61fe9b4697681db1abd946d71/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/969544f414f24593c191b51f8e48d88ee73dbc392f2bedb5bc6c943dd1ac7800/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/b58e806a9144b2dfc1aded96c581fbc92b7216ff8b7b4795c489b38d9947c779/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/b26719407ed5c33d61a128511f0361cd017c99b18c00a7413f8dbec7dda42968/merged
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/a4d60584b776b4f7cbbd29d6a14558bf707979f6b1a69a7f3e3829f1d5dfa445/merged
shm              64M     0   64M   0% /var/lib/docker/containers/449f4884ad2858d271cd9bbbb51cd77495bfa14bad17a5a1e5b0d2bb67fdb1ba/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/31652547ee7724692c938ee51c7a4166f4fe4503ea0e2401f57bd645b01b15ce/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/fb0e8b4fec1b857b63c0a3d616654128bdcbf09022e7bfe34c34008a306e3770/mounts/shm
shm              64M  128K   64M   1% /var/lib/docker/containers/0967db494cbb4568e3e497152b6de76353c6c2ed75ee35614eea89bfb0799966/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/d4ee0907528bfe4b65faeb29573d29dd726855e2b500a9e6afe0e0cf0f51d1b6/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/5a7ac166d209778bfd6f982a2539008b7f85d5dd516423da8f327627f8d2e8dc/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/6a92c4354105de50a2d2090d21a80f650e990625135cd53377c4acd317b10b4a/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/54adeafb3cb68cb06e7b6cae725dbebcacfca269ce9eb811c0cbed168ecf9e11/mounts/shm
shm              64M  8.0K   64M   1% /var/lib/docker/containers/04bb1eac84cc30e803242872e61e4ad22a0a88b4e065c3fa5b9dbf55c0cd7b75/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/5510337f2e80065fc96489d30c106cffad74e1c9c063579cde7a4d94a29e0dd3/mounts/shm
shm              64M     0   64M   0% /var/lib/docker/containers/b45d53f7e49bddb4262859a9cd4662c20da1f2b7ebc6473260a2107f1c909852/mounts/shm
shm              64M  8.0K   64M   1% /var/lib/docker/containers/54588bc5dd39e2cc1646b6c9c4a7de25d8f0af6db0969264c3a6620c69079d99/mounts/shm
overlay          25G   16G  8.7G  64% /var/lib/docker/overlay2/e6a126b621a27779b245052fe905774a4d9b5998160b142d4ef6cb5ebbd3ea9d/merged
shm              64M     0   64M   0% /var/lib/docker/containers/0e2366257c463e25b3f633903f7c4d716676b745ef1cbf7896a8287122ed682a/mounts/shm
shm              64M  8.0K   64M   1% /var/lib/docker/containers/e64ef2e822d2f1a51132d527c9a94cfb9208bf5dd4f2d225ff4fd059dd0f03c4/mounts/shm
tmpfs           100M     0  100M   0% /run/user/0

thanks for the efforts

andryyy commented 6 years ago

1GB of RAM is not enough with SOGo and 30 users.

But besides that, we would need postfix-mailcow and dovecot-mailcow logs when you receive a mail or a mail gets stuck. It might be a IPv6 related problem. ip6tables -L -vn and iptables -L -vn can help (don't forget the logs mentioned about).

ErminMerdanovic commented 6 years ago

@andryyy sry for the late reply had things to do in RL and thanks for taking time to investiget my problem but i probably expalned it very badly so i will try in German i hope you speak german too because on your website you do. ^^

Das Problem was ich habe passiert wenn sich zb. ein User auf meiner Website Registriert und nur in dem Moment wo der Button fürs Registrieren gedrückt wird ladet die Website für diesen User so lange bis der SMTP Login + das senden der Bestätigungs E-Mail abgeschlossen wird (siehe bild) und in dem Moment kann der User nichts machen (website ladet nur) und dies dauert auch ca. 5-25 Sekunden je nach dem. Daher bin ich davon ausgegangen das es was mit der SMTP Connection/Transaction Time zu tun hat.

Mein Server: 8 Kerne 4GHz 16GB RAM RZ: OVH

hSuB.png
ErminMerdanovic commented 6 years ago

by the way i run apache as main webserver and nginx only as mail

phipag97 commented 6 years ago

@Brattee you should not send emails directly when a user registers. Instead you should queue them and send them in the background. This is not a mailcow error.

Viktova commented 6 years ago

@andryyy Kindly find below the logs (taken immediately when i sent the email to multiple addresses) and find also the iptable rules of both v4 and v6 as requested.

https://pastebin.com/RRvrUaf0 https://pastebin.com/rrj6BpeL https://pastebin.com/6B0tCnN0 https://pastebin.com/kTXvr3kX

ofcourse my domain has been replaced with @blabla.com, also note the following:

x.x.x.{something} every IP address string looks similar to this have the same x values same thing applies to y.y.y.{something} with y values, z.z.z.z with z values and a.a.a.a with a values etc.

edit: also kindly find below my current DNS records:

;; NS Records (YOU MUST CHANGE THIS) blabla.com. 1 IN NS ns3.digitalocean.com. blabla.com. 1 IN NS ns2.digitalocean.com. blabla.com. 1 IN NS ns1.sparkpostmail.com. <---- I THINK THIS SHOULD BE DISABLED AS I'M NOT USING IT ANYMORE

;; MX Records blabla.com. 1 IN MX 10 mail.blabla.com. mail.blabla.com. 1 IN MX 10 mail.blabla.com.

;; TXT Records dkim._domainkey.mail.blabla.com. 1 IN TXT "v=DKIM1;k=rsa;t=s;s=email;p=...." "..." scph0616._domainkey.blabla.com. 1 IN TXT "v=DKIM1" _caldavs._tcp.blabla.com. 1 IN TXT "path=/SOGo/dav/" mail.blabla.com. 1 IN TXT "v=spf1 a:mail.blabla.com -all" scph0616._domainkey.blabla.com. 1 IN TXT "v=DKIM1; k=rsa; h=sha256; p=...." _dmarc.blabla.com. 1 IN TXT "v=DMARC1; p=none" _carddavs._tcp.blabla.com. 1 IN TXT "path=/SOGo/dav/" blabla.com. 1 IN TXT "amazonses:...." _amazonses.blabla.com. 1 IN TXT "...." blabla.com. 1 IN TXT "google-site-verification=...." blabla.com. 1 IN TXT "v=spf1 mx include:_spf.google.com include:mail.zendesk.com include:spf.protection.outlook.com -all" dkim._domainkey.blabla.com. 1 IN TXT "v=DKIM1;k=rsa;t=s;s=email;p=...." "..." _dmarc.mail.blabla.com. 1 IN TXT "v=DMARC1; p=none" 20150117._domainkey.blabla.com. 1 IN TXT "v=DKIM1"

;; SRV Records (Service locator) _pop3._tcp.blabla.com. 1 IN SRV 0 1 110 blabla.com. _imap._tcp.blabla.com. 1 IN SRV 0 1 143 blabla.com. _pop3s._tcp.blabla.com. 1 IN SRV 0 1 995 blabla.com. _imaps._tcp.blabla.com. 1 IN SRV 0 1 993 blabla.com. _smtps._tcp.blabla.com. 1 IN SRV 0 1 465 blabla.com. _carddavs._tcp.blabla.com. 1 IN SRV 0 1 443 blabla.com. _autodiscover._tcp.mail.blabla.com. 1 IN SRV 0 1 443 mail.blabla.com. _caldavs._tcp.blabla.com. 1 IN SRV 0 1 443 blabla.com. _sieve._tcp.blabla.com. 1 IN SRV 0 1 4190 blabla.com. _autodiscover._tcp.blabla.com. 1 IN SRV 0 1 443 mail.blabla.com. _submission._tcp.blabla.com. 1 IN SRV 0 1 587 blabla.com.

;; CNAME Records www.blabla.com. 1 IN CNAME blabla.com. autodiscover.blabla.com. 1 IN CNAME mail.blabla.com.

;; A Records (IPv4 addresses) blabla.com. 1 IN A d.d.d.d mail.blabla.com. 1 IN A f.f.f.f

;; CAA Records blabla.com. 1 IN CAA 0 issue letsencrypt.org mail.blabla.com. 1 IN CAA 0 issue letsencrypt.org

edit2: also note that i didnt receive the email i sent to myself (its actually sent to multiple addresses including my self) while they received it.

edit3: also note that i have upgraded my droplet's RAM, CPU, and HDD space. to 2GB, 2vCPUs, and 60GB accordingly

andryyy commented 6 years ago
"sent emails are taking from 20 to 30mins and the received ones are taking up to 3 mins to get into the inbox, although i can see the emails in the logs of raspamd interface."

Something is very wrong with your installation then. Check the time the mail enters Postfix and then check the time dovecot-mailcow logs it has stored it to INBOX. I don't really see a delay in the logs. When Rspamd logs the message, it has been processed. You should also check your mail client.

"x.x.x.{something} every IP address string looks similar to this have the same x values

same thing applies to y.y.y.{something} with y values, z.z.z.z with z values and a.a.a.a with a values etc."

I don't understand.

Viktova commented 6 years ago

i'm using gmail as a mail client. can i use the helper script for db backup and delete everything then re clone the project? and do a restore?

andryyy commented 6 years ago

Hm, do you use GMail with ActiveSync? :-O

Viktova commented 6 years ago

some of the users use mac outlook desktop client, others use the mail.app in OSX, but others use gmail (like me forexample) so basically the option is enabled

andryyy commented 6 years ago

So?

Viktova commented 6 years ago

should i disable it ? ._. if so any hint where it could be located?

andryyy commented 6 years ago

I was wondering if you use it with EAS. :-) SOGo nightlies have a bug when using the GMail app with ActiveSync. It floods your drafts folder.

You can check it, for example, like this: ncdu /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/ Browse your domain, mailbox and check ".Drafts" for each mailbox. Any strangely large Drafts folders here?

When SOGo hangs in a EAS loop, it fails due to missing workers. This might be the reason for the huge delay.

Viktova commented 6 years ago

nothing seems unusual. there're no large drafts folders (only 1 per user) nor are files with large sizes. since you mentioned SOGo, maybe since i'm not using it i should disable it, or is it mandatory? anyway since there's nothing we can do in my case, one last question, do you know by anychance why i'm not being able to send my self an email.. its not just me.. all users cant send their-self emails.

andryyy commented 6 years ago

It is not about multiple folders or large files, it would be more like a bunch of small files inside these folders.

Are you using IMAP and SMTP and not EAS? Are you sure?

Watch docker-compose logs --tail=10 -f dovecot-mailcow postfix-mailcow and send yourself a mail. Post the output then, please.

Viktova commented 6 years ago

yeah man Secured connection on port 587 using TLS thats for SMTP (on gmail) and POP3 for incoming emails. (although i should switch to IMAP like my other users)

and here's the log:


postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: connect from mail-wm0-f45.google.com[74.125.82.45]
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: setting up TLS connection from mail-wm0-f45.google.com[74.125.82.45]
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: mail-wm0-f45.google.com[74.125.82.45]: TLS cipher list "EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA:!ECDHE-RSA-RC4-SHA:!RC4:!aNULL"
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:before SSL initialization
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:before SSL initialization
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS read client hello
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write server hello
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write certificate
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write key exchange
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write server done
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write server done
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS read client key exchange
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS read change cipher spec
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS read finished
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: mail-wm0-f45.google.com[74.125.82.45]: Issuing session ticket, key expiration: 1528364593
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write session ticket
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write change cipher spec
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: SSL_accept:SSLv3/TLS write finished
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: Anonymous TLS connection established from mail-wm0-f45.google.com[74.125.82.45]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: 596D13F3C6: client=mail-wm0-f45.google.com[74.125.82.45], sasl_method=PLAIN, sasl_username=me@blabla.com
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/cleanup[6579]: 596D13F3C6: message-id=<CANOLQAO18PZXD5NO3t0FAgZ=8BD8sucwLv7Q_GSe4hnEDaRM5g@mail.gmail.com>
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/qmgr[358]: 596D13F3C6: from=<me@blabla.com>, size=4158, nrcpt=1 (queue active)
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/smtpd[6556]: disconnect from mail-wm0-f45.google.com[74.125.82.45] ehlo=2 starttls=1 auth=1 mail=1 rcpt=1 data=1 quit=1 commands=8
dovecot-mailcow_1    | Jun  7 09:24:31 mail dovecot: lmtp(17448): Connect from 172.22.1.10
dovecot-mailcow_1    | Jun  7 09:24:31 mail dovecot: lmtp(me@blabla.com)<17448><rA0INs/5GFsoRAAAITa7Kw>: sieve: msgid=<CANOLQAO18PZXD5NO3t0FAgZ=8BD8sucwLv7Q_GSe4hnEDaRM5g@mail.gmail.com>: stored mail into mailbox 'INBOX'
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/lmtp[6580]: 596D13F3C6: to=<me@blabla.com>, relay=dovecot[172.22.1.9]:24, delay=0.58, delays=0.52/0.03/0.01/0.02, dsn=2.0.0, status=sent (250 2.0.0 <me@blabla.com> rA0INs/5GFsoRAAAITa7Kw Saved)
postfix-mailcow_1    | Jun  7 09:24:31 mail postfix/qmgr[358]: 596D13F3C6: removed
dovecot-mailcow_1    | Jun  7 09:24:31 mail dovecot: lmtp(17448): Disconnect from 172.22.1.10: Client has quit the connection (state = READY)

okay found the issue: i'm using POP3 and SMTP. i should use IMAP and SMTP in order to be able to send and receive emails from my self. im really sorry for bothering you and wasting your time with this, but can i do one last thing? post my mailcow.conf? and postfix main.conf? to see if there are delays or something like that?

andryyy commented 6 years ago

Pop3 is just not "live". It will need to sync until it does anything.

Sending is not affected, though.

Viktova commented 6 years ago

here's the postfix main.cf: https://pastebin.com/u8XgpfW5 here's the mailcow.conf: https://pastebin.com/XCn4ucvT

i'm really thankful @andryyy for your time assisting me

edit as of 15/10/2018: Everything is working super perfect for me, and i can confirm that there're no more delayed emails or slowness using SMTP. fixed by upgrading to the latest master branch commits, and upgrading my server resources.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

jovobe commented 5 years ago

I still have the problem.

andryyy commented 5 years ago

Any logs? What exactly is slow?

jovobe commented 5 years ago

Just check this tool: https://mxtoolbox.com/SuperTool.aspx?action=smtp%3aYOUR_DMOAIN&run=toolpage

The test output looks like this:

screenshot 2018-12-14 at 17 17 50

The logs from postfix:


14/12/2018, 17:14:51 | info | disconnect from keeper-us-east-1c.mxtoolbox.com[18.205.72.90] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4
14/12/2018, 17:14:50 | info | NOQUEUE: reject: RCPT from keeper-us-east-1c.mxtoolbox.com[18.205.72.90]: 554 5.7.1 <test@mxtoolboxsmtpdiag.com>: Relay access denied; from=<supertool@mxtoolbox.com> to=<test@mxtoolboxsmtpdiag.com> proto=ESMTP helo=<FOO_BAR.mxtoolbox.com>
14/12/2018, 17:14:47 | info | connect from keeper-us-east-1c.mxtoolbox.com[18.205.72.90]
14/12/2018, 17:14:45 | info | PASS NEW [18.205.72.90]:14791
14/12/2018, 17:14:42 | info | addr 18.205.72.90 listed by domain hostkarma.junkemailfilter.com as 127.0.1.1
14/12/2018, 17:14:42 | info | addr 18.205.72.90 listed by domain hostkarma.junkemailfilter.com as 127.0.0.1
14/12/2018, 17:14:42 | info | Look up 18.205.72.90 on whitelist, result 200 DUNNO
14/12/2018, 17:14:42 | info | CONNECT from [18.205.72.90]:14791 to [172.22.1.3]:25

This results in mails being sent very slowly. Sometimes I have to wait about 10 seconds.

andryyy commented 5 years ago

That's the time on port 25 and wanted due to Postscreen.

Postscreen does not add a delay on port 465 and 587.

jovobe commented 5 years ago

Just switched to port 465 and it's fast like hell 🎉 Thank you very much!


That's the time on port 25 and wanted due to Postscreen.

Is this behaviour documented somewhere? Because in my case Apple Mail used port 25 by default.

andryyy commented 5 years ago

I think it is in the client docs. But we could disable auth on that port.

MatthiasHertel commented 5 years ago

it is planned to disable it ? (disable auth on 25 port)

andryyy commented 5 years ago

Just added it. :) Need to check some other things before pushing.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.