• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Huge delay in processing incoming emails

nisamudeen97

Regular Pleskian
Hi,

I could see my server is having huge delay in processing incoming emails. I have noticed this delay previously also. Meanwhile this time the delay was around 13 hours which is not acceptable. Let me explain with example. The issue is with delay of email from "instagram.com"

The first connection request happened at Apr 25 09:38:58
meanwhile mail was delivered to inbox at Apr 25 23:05:54

First connection log

Apr 25 09:38:58 srv postfix/smtpd[27362]: input attribute value: 042DD188578
Apr 25 09:38:58 srv postfix/smtpd[27362]: 042DD188578: client=66-220-155-166.outcampmail.facebook.com[66.220.155.166]
Apr 25 09:38:58 srv postfix/smtpd[27362]: milter_macro_lookup: result "042DD188578"
Apr 25 09:38:58 srv postfix/smtpd[27362]: event: SMFIC_DATA; macros: i=042DD188578
Apr 25 09:38:58 srv postfix/smtpd[27362]: 042DD188578: milter-reject: DATA from 66-220-155-166.outcampmail.facebook.com[66.220.155.166]: 451 4.7.1 Service unavailable - try again later; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mx-out.facebook.com>

The above same log happened for around 8 hours att regular intervals. I am not using any kind of premium outgoing spam protection.



cat /etc/postfix/main.cf | grep smtpd_milters = inet:127.0.0.1:12768

I am looking for a proper solution for the same.
 
This is probably because you have greylisting enabled on the server. Plesk allows you to disable greylisting server wide or for just for domains that want it disabled.

Server Level

Tools and Settings -> Spam Filter Settings-> Switch on server-wide greylisting spam protection

Domain Level
Domain -> Mail settings -> Switch on greylisting spam protection for all mail accounts under this domain

Greylisting whitelist server pattern example
/usr/local/psa/bin/grey_listing --update-server -domains-whitelist "add:*outbound.protection.outlook.com"
 
Check and see if the other emails came from 66-220-155-166.outcampmail.facebook.com. If they are coming from different mail IPs then this will cause the big delay as each IP is separately greylisted.
 
Hi nisamudeen97,

I previously explained the "greylisting" - issue in one of my earlier posts here in the forum. Pls. read for example: => #11
 
Hi,

Thanks for the update. Does disabling grey listing in pesk interface will stop "grey listing" feature for ever ?
 
I find greylisting not worth the effort and sometimes it brakes more then it solves. Let me explane.

Greylisting "remembers" the ip, gives an error the first time and whitelist the ip the second time the sending mailserver tries to send the mail.

This only works if every valid sender re-sends the mail after a while. Not going into the delay recipients will have which kills the instant nature of email, this is a nuisance but mail will arrive .... eventualy.
But the big problem is that not all senders re-send mails.

There are applications that have build in smtp clients that not use the local mailserver connection, but try to connect directly to the receiving mailserver. and not incorporate a queueing mechanism for re-sending mails. Mails from these applications will be lost forever.

my 2 cents on greylisting:

- in an ideal world : the best there is
- in the real world: totaly useless

Regards
Jan
 
I have checked the logs in detail and I could see each time the incoming mail connection for "instagram" is from different IP and greylisting will be dlaying the new connection as a part of their feature for first two minutes. Meanwhile the second connection from instagram is found to be happening from different IP hence it is again delayed. This is found to be the root cause of the issue.

The second connection from instagram is found to be happening in an interval of 30 mins. Each time connection is coming from new IP's likewise they have around 14 ips hence the big delay.


Graylisting is something that we cannot relay upon even if it is preventing big amount of spam. Delay more than 5mins with incoming emails cannot be tolerated at all. I have disabled graylist and now there is too much incoming spam. Is there any opensource plesk extensions to prevent incoming spam ?
 
There are a lot anti-spam options for plesk. Some are open source, some are not, but they all cost money is some form.
Either you pay someone else for there time and expertise, or you have to invest your own time learning it.
There is no free solution that you can forget about after installation and will solve all your spam problems forever.

A spamfilter is like everything in life: the more money and/or time you spend on it, the better it gets.

spamassassin:
make sure it is enabled and configured per mailbox.
Sounds funny but we had clients complain about too much spam and spamassassin wasn't enabled on there mailboxen.

extra spamassassin rules from heinlein.
free extra rules, install with
centos 6
sa-update -v --nogpg --channel spamassassin.heinlein-support.de && /etc/init.d/spamassassin restart
centos 7
sa-update -v --nogpg --channel spamassassin.heinlein-support.de && systemctl restart spamassassin.service

magicspam
Plesk add-on, there is a free and a payed for version.
MagicSpam Embedded Protection - Plesk Extensions

Spamexperts
Plesk add-on, not free, but the only (semi) install and forget option.
SpamExperts Email Security - Plesk Extensions

clamav + Sanesecurity signatures: improve ClamAV detection rate rules
free, but needs work and knowledge
Migrate Plesk to ClamAV - My Blog (just the page title, not "my" blog)
CentOS 6 - MAIL Server - Postfix + Clamav : Server World
Resolved - Looking for : ClamAV installation - step by step

assp
free, very good, but needs work and a lot of knowledge
Anti-Spam SMTP Proxy Server / Wiki / Main_Page
Anti-Spam SMTP Proxy Server / Wiki / HOWTOs_and_notes_for_specific_MTAs_and_OSes

regards
Jan
 
Last edited:
Greylisting works fine for most as long as you whitelist the larger providers (office365, google) like I mentioned in my first post. Also Plesk gives you the ability to disable it for any domain that doesn't want it enabled.

In this case its a simple fix:
Code:
/usr/local/psa/bin/grey_listing --update-server -domains-whitelist "add:*.outcampmail.facebook.com"
 
Back
Top