1

Topic: Huge delay in mail delivery!!

==== Required information ====
- iRedMail version: Pro 1.6.0
- Store mail accounts in which backend (MySQL):
- Linux/BSD distribution name and version: Ubuntu 12.04.2 LTS

2 Domains
1600 Mailboxes
====

I have just migrated from a Sendmail server to a new iRedmail server setup.  Mail is flowing, however, I am seeing about a 30 min delay on all message delivery.  I've played with the greylisting a bit to deal with several Black Listed friendly IP/Hosts.  Any idea what I might have going on?

Thank you,

tonyd

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Huge delay in mail delivery!!

Follow up:

I have over 17K of these in the amavisd, msgrcpt table.

0    dBz8NsS1+INR    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    Y77p7jbeSX8a    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    EngW4Xce4kLm    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    2rILWjDq928B    0    3            P        N    N    0.01    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    8g4BCSik8wbl    0    3            P        N    N    0.01    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    EbJGsZQ10eL7    0    3            P        N    N    0.01    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    JA9VVcyaZUGL    0    3            P        N    N    0.01    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    Ozj8+8iNQfXW    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    SSC0pY4PFlH6    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    1zSTD-+IqcdS    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    DKc2NYzfuMBB    0    3            P        N    N    0.011    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    Ai8HJExmZlgv    0    3            P        N    N    0.011    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    MKthikzqAXZa    0    1            P        N    N    -0.001    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    uKdPJwHFGMiP    0    3            P        N    N    0.011    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    rYv08GBnte62    0    3            P        N    N    0.02    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...
0    Te75fBHiL0XB    0    3            P        N    N    0.011    250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 O...

I have over 11K records in the maddr table
I have over 17k records in the msgs table

0    0+9q912Dxtsw    mcly6AAixPk2    29303-05    1367868489    20130506192809    7447        216.xx.xx.15    23394        C            N    0.921    <300.0.47.5F5.1CE4A8C29F5376C.93609@me-ss2-uinvig....    "Adrift Adventures" <rafting@whitewater.net>    JUNK: 2 for 1 Yampa River Rafting Trip    mail3.mydomain.net
0    0+PELr7SfvDH    VKj6jWoXHiZQ    11393-04    1367849158    20130506140558    1180        216.xx.xx.15    47415        C            N    2.737    <59aafc6d9861ad792de1d32fb2f7d41b57d.2013050614025...    Today's Tanga Deals <service@tanga.com>    JUNK: 2-Pack Green Coffee Bean Extract All-Natural...    mail3.mydomain.net

3

Re: Huge delay in mail delivery!!

Tonyd,
Have you tried disabling grey listing (GREYLISTING=0) and restarting /etc/init.d/postfix-policyd restart.

thanks,
-Tim

4

Re: Huge delay in mail delivery!!

Hey time4e...  Yeah, I had, I believe.  The setting is a little differnt and I don't have postfix-policyd.  I set enable=0 and did a restart on postfix-cluebringer.  I also disabled it in the sql table

1    3 [->]    Greylisting Inbound Emails    0    240    SenderIP:/24    604800    86400    1    604800    100    90    1    604800    100    20        0

However, even if I disable the greylisting, how can I get the queued msgs to deliver?

Thanks smile

#/etc/cluebringer/cluebringer.conf
...
# Greylisting module
[Greylisting]
enable=0
...

root@mail3:/home/tonyd# /etc/init.d/po
postfix              postfix-cluebringer 
root@mail3:/home/tonyd# /etc/init.d/postfix

5

Re: Huge delay in mail delivery!!

I don't know if this is related as I'm not sure what I'm seeing here, but it would appear the messages are getting queued and not released.  I've got 1600 customers breathing fire and I could sure use some help here.  I'm about ready to go back to the pos Sendmail server.... It worked...

Thanks

1037535:May  6 17:56:11 mail3 postfix/qmgr[6618]: 56E20103EAA: from=<tonyd@esedona.net>, size=480, nrcpt=1 (queue active)
1037536:May  6 17:56:11 mail3 roundcube: User tonyd@esedona.net [216.19.2.153]; Message for tonyd@commspeed.net; 250: 2.0.0 Ok: queued as 56E20103EAA

6

Re: Huge delay in mail delivery!!

Tonyd,
to answer your question regarding getting queued messages to deliver try postqueue -f to flush the queue and than check logs for any errors.

7 (edited by tonyd 2013-05-08 19:29:22)

Re: Huge delay in mail delivery!!

I tried that and the queues remained unchanged as well as no change to the entries in the mysql amavisd tables. smile

8

Re: Huge delay in mail delivery!!

*) Delay of receiving emails is caused by greylisting, enabled in Policyd or Cluebringer.
*) If you configure Amavisd to store basic info of in/out emails in SQL server, Amavisd will insert records into SQL database "amavisd". You should use script provided by iRedAdmin-Pro (iRedAdmin-Pro-x.y.z/tools/cleanup_amavisd_db.py) to remove old records this database. Please open this file, read comments on top of this file, you will know how to use it. You can execute it manually, but please setup a daily cron job to execute it.

9

Re: Huge delay in mail delivery!!

ZhangHuangbin wrote:

*) Delay of receiving emails is caused by greylisting, enabled in Policyd or Cluebringer.
*) If you configure Amavisd to store basic info of in/out emails in SQL server, Amavisd will insert records into SQL database "amavisd". You should use script provided by iRedAdmin-Pro (iRedAdmin-Pro-x.y.z/tools/cleanup_amavisd_db.py) to remove old records this database. Please open this file, read comments on top of this file, you will know how to use it. You can execute it manually, but please setup a daily cron job to execute it.

Hi Zhang,

I didn't configure amavisd to store x,y, or z, this was a product of the iRedMail install and configuration.  I'm struggling for an explanation of  the relationship of these files in the db and in the mail queue.  Do I understand that 1) mail in queue can be delivered, but fail to get removed from mysql tables?, 2) removing the messages via the script does no harm with respect to msgs in the mail queue?  I have read and ran the script, but again, nowhere do I find a clear explanation of how these tables do or do not relate to the mail queue leaving room for confusion.

Thank you

10

Re: Huge delay in mail delivery!!

tonyd wrote:

Do I understand that 1) mail in queue can be delivered, but fail to get removed from mysql tables?

Yes, records in SQL db won't be removed automatically. but iRedAdmin-Pro provides a script (iRedAdmin-Pro-x.y.z/tools/cleanup_amavisd_db.py) to help you remove old records.

tonyd wrote:

2) removing the messages via the script does no harm with respect to msgs in the mail queue?

Yes, records in Amavisd SQL db is just a log, not real email messages.

tonyd wrote:

I have read and ran the script, but again, nowhere do I find a clear explanation of how these tables do or do not relate to the mail queue leaving room for confusion.

This records were inserted by Amavisd, used to help track in/out emails, but they're not real email messages like the ones in Postfix mail queues (/var/spool/postfix/). You can delete records in Amavisd SQL db anytime you want, but please don't delete messages in Postfix mail queues.

11

Re: Huge delay in mail delivery!!

Thank you for that breakdown, much clearer now. smile