This is a Centos 7 VPS with Postfix, Dovecot, Procmail, etc. installed from scratch with Webmin/Virtualmin some months ago. All is up-to-date.
Mails are received by the mail server almost instantly. If the sender is local there is a delay of around 30 seconds to deliver and if the sender is external the delay is around 1 minute.
Today I made a couple of tests:
- Send mail from Gmail account to this server: u@gmail.com to me@mydomain.com (this belongs to ‘username’):
Jun 13 19:04:40 host postfix/smtpd[9921]: connect from mail-qt1-f170.google.com[209.85.160.170]
...
Jun 13 19:04:41 host postfix/smtpd[9921]: disconnect from mail-qt1-f170.google.com[209.85.160.170]
...
Jun 13 19:05:39 host spamd[4236]: spamd: setuid to username succeeded
Jun 13 19:05:40 host spamd[4236]: spamd: processing message [<ab158c70-7e5f-edcd-f741-e6e56298bd08@gmail.com>](mailto:ab158c70-7e5f-edcd-f741-e6e56298bd08@gmail.com) for username:1018
Jun 13 19:05:42 host spamd[4236]: spamd: clean message (-2.0/5.0) for username:1018 in 3.6 seconds, 3658 bytes.
Jun 13 19:05:42 host spamd[4236]: spamd: result: . -1 - BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TVD_SPACE_RATIO scantime=3.6,size=3658,user=username,uid=1018,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=33638,mid=[<ab158c70-7e5f-edcd-f741-e6e56298bd08@gmail.com>](mailto:ab158c70-7e5f-edcd-f741-e6e56298bd08@gmail.com),bayes=0.000000,autolearn=ham autolearn_force=no
Jun 13 19:05:42 host postfix/local[9927]: 4F7D3C0055B: to=[<username@host.hostname.com>](mailto:username@host.hostname.com), orig_to=[<me@mydomain.com>](mailto:me@mydomain.com), relay=local, delay=61, delays=0.41/0.01/0/61, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
- Send local email from user2@mydomain2.com (username2) to me@mydomain.com (username):
Jun 13 19:16:31 host postfix/cleanup[13448]: 4228CC008E8: message-id=[<f32c361e-422f-5f64-191c-716a1afb1651@mydomain2.com>](mailto:f32c361e-422f-5f64-191c-716a1afb1651@mydomain2.com)
Jun 13 19:16:31 host opendkim[1178]: 4228CC008E8: DKIM-Signature field added (s=209, d=mydomain2.com)
Jun 13 19:16:31 host postfix/qmgr[20478]: 4228CC008E8: from=[<username2@mydomain2.com>](mailto:username2@mydomain2.com), size=1290, nrcpt=1 (queue active)
Jun 13 19:17:02 host spamd[4236]: spamd: setuid to username succeeded
Jun 13 19:17:02 host spamd[4236]: spamd: processing message [<f32c361e-422f-5f64-191c-716a1afb1651@mydomain2.com>](mailto:f32c361e-422f-5f64-191c-716a1afb1651@mydomain2.com) for username:1018
Jun 13 19:17:03 host spamd[4236]: spamd: clean message (-3.0/5.0) for username:1018 in 0.7 seconds, 2022 bytes.
Jun 13 19:17:03 host spamd[4236]: spamd: result: . -2 - ALL_TRUSTED,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HTML_MESSAGE scantime=0.7,size=2022,user=username,uid=1018,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=36684,mid=[<f32c361e-422f-5f64-191c-716a1afb1651@mydomain2.com>](mailto:f32c361e-422f-5f64-191c-716a1afb1651@mydomain2.com),bayes=0.000000,autolearn=ham autolearn_force=no
Jun 13 19:17:03 host postfix/local[13453]: 4228CC008E8: to=[<username@host.hostname.com>](mailto:username@host.hostname.com), orig_to=[<me@mydomain.com>](mailto:username@mydomain.com), relay=local, delay=32, delays=0.78/0.01/0/32, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
What could be cause those delays?
Thank you.