Delay receiving postfix ISPConfig 3

Discussion in 'General' started by ruswandi, Jun 7, 2015.

  1. ruswandi

    ruswandi New Member

    Hallo Everyone,

    Before, I introduce myself. my name is Wandi from Indonesia.
    I use ISPConfig 3 (Debian 8), before i use debian 7 from one years ago. i have 200 user mail. before, no problem with mail. user can send or receive normaly, but approximately from 5 month ago i have problem. i have delay receiving mail.
    i searching for solution but not yet found it.
    maybe you can help me ?
    thank you very much.
    forgive me for bad english.

    regards,

    Wandi
     
  2. webguyz

    webguyz Active Member HowtoForge Supporter

    Maybe your waiting on amavis to process the mail. Try the recommendation below to increase the number of amavis processes from the default.
    -------------------------------------------------------------------------
    To increase the number of processes that amavisd-new uses above the default 2 edit the file /etc/amavis/conf.d/50-user inserting the line:
    $max_servers = X;
    above the line:
    #------------ Do not modify anything below this line -------------
    where X is the number of processes you wish amavis to use.
     
  3. webguyz

    webguyz Active Member HowtoForge Supporter

  4. ruswandi

    ruswandi New Member

    Hi Webguyz,

    Thank you for your advice.

    I will try this on my server. can you please give me recommendation for 'X' value.

    Thanks in advance.

    Regards,
    Wandi
     
  5. webguyz

    webguyz Active Member HowtoForge Supporter

    I would double it from the default of 2 to 4 and see if it helps with the delay your seeing. With the default of 2 it can only process that many messages at a time. If you have 20 emails come in at once then they have to wait their turn for the amavis process which controls spamassassin and anti-virus. Make sure to change the default in both places as specified in the article.
     
  6. ruswandi

    ruswandi New Member

    Hello,

    Thanks for your reply.

    I configure my server with x = 2,
    but I have not felt the change in receiving emails.
    I tried from some domains, some is fast (1-2 minutes directly received) some again are slow more than 20 minutes, even some time can be up to 2-6 hours.
    whether there is influence from the server specification? because only 2GB ram ECC with 4 core Xeon E5506 2.13GHz. or influence of routing router? because I use a tunneling to get public IP from different internet providers.
    sorry if I was a lot to ask.

    Thank you for your answer.
    Once again thank you.

    regards,

    Wandi
     
  7. webguyz

    webguyz Active Member HowtoForge Supporter

    The default is 2. I would change it to at least 4. But with the further explaination of what the delays are that your experiencing I doubt that's your problem. If the amavis was an issue the symptom would be that the email would get to the postfix server but not get delivered to the mailbox until many minutes later. Lets say that 20 incoming emails hit your server all at the same time. With the default amavis setting, 2 emails at a time would be processed for antivirus and spamassassin. By increasing the number of amavis process then incoming mail will get processed quicker and into the mailboxes faster instead of waiting.
     
  8. florian030

    florian030 Well-Known Member HowtoForge Supporter

    A normal mailserver can handle 20 mails without any problems. I would check the mail.log to find the bottleneck. Maybe amavis uses dns-lookups.
     
  9. ruswandi

    ruswandi New Member

    Hello All,

    This is my log in /var/log/mail.log

    Jun 15 08:03:42 server1 amavis[9312]: starting. /usr/sbin/amavisd-new at server1.mydomain amavisd-new-2.10.1 (20141025), Unicode aware, LANG="en_US.UTF-8"
    Jun 15 08:03:43 server1 amavis[9317]: Net::Server: Group Not Defined. Defaulting to EGID '122 122'
    Jun 15 08:03:43 server1 amavis[9317]: Net::Server: User Not Defined. Defaultingto EUID '115'
    Jun 15 08:03:43 server1 amavis[9317]: Module Amavis::Conf 2.404
    Jun 15 08:03:43 server1 amavis[9317]: Module Archive::Zip 1.39
    Jun 15 08:03:43 server1 amavis[9317]: Module BerkeleyDB 0.54
    Jun 15 08:03:43 server1 amavis[9317]: Module Compress::Raw::Zlib 2.065
    Jun 15 08:03:43 server1 amavis[9317]: Module Compress::Zlib 2.064
    Jun 15 08:03:43 server1 amavis[9317]: Module Crypt::OpenSSL::RSA 0.28
    Jun 15 08:03:43 server1 amavis[9317]: Module DBD::mysql 4.028
    Jun 15 08:03:43 server1 amavis[9317]: Module DBI 1.631
    Jun 15 08:03:43 server1 amavis[9317]: Module DB_File 1.831
    Jun 15 08:03:43 server1 amavis[9317]: Module Digest::MD5 2.53
    Jun 15 08:03:43 server1 amavis[9317]: Module Digest::SHA 5.88
    Jun 15 08:03:43 server1 amavis[9317]: Module Encode 2.60
    Jun 15 08:03:43 server1 amavis[9317]: Module File::Temp 0.2304
    Jun 15 08:03:43 server1 amavis[9317]: Module IO::Socket::INET6 2.72
    Jun 15 08:03:43 server1 amavis[9317]: Module IO::Socket::IP 0.32
    Jun 15 08:03:43 server1 amavis[9317]: Module MIME::Entity 5.505
    Jun 15 08:03:43 server1 amavis[9317]: Module MIME::parser 5.505
    Jun 15 08:03:43 server1 amavis[9317]: Module MIME::Tools 5.505
    Jun 15 08:03:43 server1 amavis[9317]: Module Mail::DKIM::Verifier 0.4
    Jun 15 08:03:43 server1 amavis[9317]: Module Mail::Header 2.13
    Jun 15 08:03:43 server1 amavis[9317]: Module Mail::Internet 2.13
    Jun 15 08:03:43 server1 amavis[9317]: Module Mail::SPF v2.009
    Jun 15 08:03:43 server1 amavis[9317]: Module Mail::SpamAssassin 3.004000
    Jun 15 08:03:43 server1 amavis[9317]: Module Net::DNS 0.81
    Jun 15 08:03:43 server1 amavis[9317]: Module Net::LibIDN 0.12
    Jun 15 08:03:43 server1 amavis[9317]: Module Net::Server 2.008
    Jun 15 08:03:43 server1 amavis[9317]: Module NetAddr::IP 4.075
    Jun 15 08:03:43 server1 amavis[9317]: Module Scalar::Util 1.38
    Jun 15 08:03:43 server1 amavis[9317]: Module Socket 2.013
    Jun 15 08:03:43 server1 amavis[9317]: Module Socket6 0.25
    Jun 15 08:03:43 server1 amavis[9317]: Module Time::HiRes 1.9726
    Jun 15 08:03:43 server1 amavis[9317]: Module URI 1.64
    Jun 15 08:03:43 server1 amavis[9317]: Module Unix::Syslog 1.1
    Jun 15 08:03:43 server1 amavis[9317]: Amavis::ZMQ code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: Amavis::DB code loaded
    Jun 15 08:03:43 server1 amavis[9317]: SQL base code loaded
    Jun 15 08:03:43 server1 amavis[9317]: SQL::Log code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: SQL::Quarantine NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: Lookup::SQL code loaded
    Jun 15 08:03:43 server1 amavis[9317]: Lookup::LDAP code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: AM.PDP-in proto code loaded
    Jun 15 08:03:43 server1 amavis[9317]: SMTP-in proto code loaded
    Jun 15 08:03:43 server1 amavis[9317]: Courier proto code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: SMTP-out proto code loaded
    Jun 15 08:03:43 server1 amavis[9317]: Pipe-out proto code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: BSMTP-out proto code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: Local-out proto code loaded
    Jun 15 08:03:43 server1 amavis[9317]: OS_Fingerprint code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: ANTI-VIRUS code loaded
    Jun 15 08:03:43 server1 amavis[9317]: ANTI-SPAM code loaded
    Jun 15 08:03:43 server1 amavis[9317]: ANTI-SPAM-EXT code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: ANTI-SPAM-C code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: ANTI-SPAM-SA code loaded
    Jun 15 08:03:43 server1 amavis[9317]: Unpackers code loaded
    Jun 15 08:03:43 server1 amavis[9317]: DKIM code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: Tools code NOT loaded
    Jun 15 08:03:43 server1 amavis[9317]: Found $file at /usr/bin/file
    Jun 15 08:03:43 server1 amavis[9317]: Found $altermime at /usr/bin/altermime
    Jun 15 08:03:43 server1 amavis[9317]: Internal decoder for .mail
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .Z at /bin/uncompress
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .gz at /bin/gzip -d
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .bz2 at /bin/bzip2 -d
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .xz at /usr/bin/xz-dc
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .lzma at /usr/bin/xz-dc --format=lzma
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .lrz, tried: lrzip -q -k -d -o -, lrzcat -q -k
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .lzo at /usr/bin/lzop -d
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .lz4, tried: lz4c -d
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .rpm, tried: rpm2cpio.pl, rpm2cpio
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .cpio at /bin/pax
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .tar at /bin/pax
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .deb at /usr/bin/ar
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .rar, tried: unrar-free
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .arj at /usr/bin/arj
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .arc at /usr/bin/nomarch
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .zoo at /usr/bin/zoo
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .doc at /usr/bin/ripole
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .cab at /usr/bin/cabextract
    Jun 15 08:03:43 server1 amavis[9317]: Internal decoder for .tnef
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .zip, tried: 7za, 7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .kmz, tried: 7za, 7z
    Jun 15 08:03:43 server1 amavis[9317]: Internal decoder for .zip
    Jun 15 08:03:43 server1 amavis[9317]: Internal decoder for .kmz
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .7z, tried: 7zr, 7za,7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .jar, tried: 7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .rar, tried: 7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .swf, tried: 7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .lha, tried: 7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .iso, tried: 7z
    Jun 15 08:03:43 server1 amavis[9317]: No ext program for .rpm, tried: 7z
    Jun 15 08:03:43 server1 amavis[9317]: Found decoder for .exe at /usr/bin/arj
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .7z
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .F
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .iso
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .jar
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .lha
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .lrz
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .lz4
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .rar
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .rpm
    Jun 15 08:03:43 server1 amavis[9317]: No decoder for .swf
    Jun 15 08:03:43 server1 amavis[9317]: Using primary internal av scanner code for ClamAV-clamd
    Jun 15 08:03:43 server1 amavis[9317]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
    Jun 15 08:03:43 server1 amavis[9317]: Deleting db files __db.001,__db.003,__db.002,snmp.db,nanny.db in /var/lib/amavis/db
    Jun 15 08:03:43 server1 amavis[9317]: Creating db in /var/lib/amavis/db/; BerkeleyDB 0.54, libdb 5.3
    Jun 15 08:08:09 server1 postfix/smtpd[9887]: connect from unknown[103.3.214.145]
    Jun 15 08:08:13 server1 postfix/smtpd[9887]: warning: unknown[103.3.214.145]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
    Jun 15 08:08:13 server1 postfix/smtpd[9887]: disconnect from unknown[103.3.214.145]
    Jun 15 08:08:24 server1 postfix/smtpd[9887]: connect from unknown[103.3.214.145]
    Jun 15 08:08:24 server1 postfix/smtpd[9887]: 7F3EFE817FC: client=unknown[103.3.214.145]
    Jun 15 08:08:24 server1 postfix/cleanup[9892]: 7F3EFE817FC: message-id=<[email protected]>
    Jun 15 08:08:24 server1 postfix/smtpd[9887]: disconnect from unknown[103.3.214.145]
    Jun 15 08:08:24 server1 postfix/qmgr[9753]: 7F3EFE817FC: from=<[email protected]>, size=45013, nrcpt=3 (queue active)
    Jun 15 08:08:26 server1 postfix/smtpd[9899]: connect from localhost.localdomain[127.0.0.1]
    Jun 15 08:08:26 server1 postfix/smtpd[9899]: 401C7E81800: client=localhost.localdomain[127.0.0.1]
    Jun 15 08:08:26 server1 postfix/cleanup[9892]: 401C7E81800: message-id=<[email protected]>
    Jun 15 08:08:26 server1 postfix/qmgr[9753]: 401C7E81800: from=<[email protected]>, size=45220, nrcpt=6 (queue active)
    Jun 15 08:08:26 server1 amavis[9322]: (09322-01) Passed CLEAN {RelayedOpenRelay}, [103.3.214.145]:48845 [150.129.190.6] <[email protected]> -> <[email protected]>,<[email protected]>,<[email protected]>, Queue-ID: 7F3EFE817FC, Message-ID: <[email protected]>, mail_id: uOtt43xqQT1L, Hits: 3.882, size: 45011, queued_as: 401C7E81800, 1490 ms

    I hope this can help find a solution for my server. because I often receiving complaints from user, why I slow received an email.
    thank you for your help All.

    God bless you

    Thank you.

    regards,

    Wandi
     
  10. florian030

    florian030 Well-Known Member HowtoForge Supporter

    The mail needs 2 seconds from the connect to the queue...
     
  11. ruswandi

    ruswandi New Member

    maybe I found my big problem. my ISP has blocked port 25 for incoming and outgoing, for outgoing I setting relay host to another server in postfix. but for incoming I have no idea. any solution ?

    please help me.

    Thank you.

    regards,

    Wandi
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Move the server to a datecenter or use a cheap vm in a datecenter instead of running the server at home.
     

Share This Page