When I send emails, it takes more than 10-15s for the email to leave the outbox.
It happens on multiple platforms (iPhone and Mac or Windows - using Outlook/Apple Mail/Thunderbird).
No errors in the mail log.
Can you please advise?
What does appear in the log? Is DNS fast and reliable? Check every name server in resolv.conf to be sure it resolves the destination quickly. Mail performance is very DNS dependent, as it a lot of spam-related stuff is running over DNS. Also make sure your DNS servers are fast, and any DKIM/SPF related stuff responds quickly.
In addition to the excellent suggestions made by @Joe, you could also check if you have virus and spam scanning configured to check outgoing email. If so, this could account for the delay.
Everything looks normal in mail logs, no errors, nothing. Should I look for something specific?
DNS servers are the ones from Google. Please let me know if the resolution order should be Local Hostname first.
[root@cpanel ~]# cat /etc/resolv.conf
Generated by NetworkManager
All domains are hosted in Cloudflare and the required records point to the server’s IPs.
Pinging domeniu.com [x.x.x.x] with 32 bytes of data:
Reply from x.x.x.x: bytes=32 time=133ms TTL=44
Ping statistics for x.x.x.x:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 132ms, Maximum = 134ms, Average = 133ms
Please let me know where I should look for those settings.
Can you please let me know how is the best way to disable scanning the outgoing emails?
Scanning outgoing mail does not happen by default. I’m not even sure how one would implement that (it’s possible, but nothing we provide makes it easy…you didn’t accidentally turn it on, I’m pretty sure).
I didn’t implement this option as I don’t even know how to do it
Can you please let me know where are these settings and how to turn this option off?
Please let me know where I can find that setting to disable/enable scanning the outgoing emails.
I could not find it by looking over the Postfix server settings (or any other settings but I am quite sure that I am not looking in the right place ).
There is no setting! It’s not a thing. I don’t know how to be more clear. Virtualmin does not have any implementation of scanning outgoing email.
It can’t be your problem, because it doesn’t exist (unless you set it up yourself outside of Virtualmin, but since you have no idea what it is or how it’s done, we can be confident you didn’t do that). So, stop fixating on this; scanning outgoing mail is not your problem. It cannot be.
@Joe is correct. I am sorry to have caused this confusion when I was attempting to point out that your outgoing email @cipandales could be delayed due to virus and spam scanning configurations (that you may have set up, as I have in deviation to default Virtualmin) to check outgoing email.
On my system it causes exactly the sort of delay you described so in my rush to point this out, I appear to have harmed more than helped. Sorry again, please disregard my earlier comment.
This could be because your hostname isn’t set correctly, as I had a similar issue with delays in outgoing email following a server migration.
In /etc/hosts my hostname value had been truncated…check that the full hostname is present as this is what Postfix uses.
So you should have something like:
192.168.0.15 mail, mail.mydomain.com
That comma is funny. Shouldn’t be there. Just use whitespace between long and short names. And, it should be flipped.
192.168.1.1 myhost.domain.tld myhost
When you run
hostname -f it should return a fully qualified domain name. If it doesn’t,
/etc/hosts is wrong and should be fixed, as it will cause mail problems among other things.
Thanks for the correction. I hand typed it from memory and messed it up.
Hopefully a pointer in the right direction.
Thank you all for your advice.
You were right, the hosts file does not look like you said:
[root@panel ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
When I run hostname or hostname -f I get the correct FQDN though.
Should I make the recommended changes in this case?
As long as
hostname -f is right, it should be fine.
hosts is just one way for a name to be resolved (the most reliable, though).
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.