1 (edited by TitanFighter 2015-02-13 22:01:46)

Topic: 13 accounts -> mail server stops working

======== Required information ====
- iRedMail version: 0.9.0
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Linux/BSD distribution name and version: Ubuntu Server 14.04
- Related log if you're reporting an issue:
====
Hello guys.
Please help.

We have VPS 1 core\1GB RAM (with average usage about 800-850, but sometimes upto 900MB).
iRedMail + site in development where just I have access.
Once I installed iRedMail everything was ok, (except some issues which I resolved because of sharing an experience of others users on this forum). Then I made few boxes, sended 10's test emails - sending\receiving was ok.

Yerstaday I made new accounts so currently there are 13 boxes and here I faced a problem - people cant connect to their boxes both via Outlook and via web-interface. Web browser says "Cant find a page". I aslo cant open a site (which is in development state). Via SSH I can connect to the server, tried to restart such services as php,apache, postfix & dovecot - didnt help. Just the server reboot helps but just for few mins, then again people cant use emails. If all ppls are not trying to work with mails simultheniously, then 1-2-3 people have no issues.

I also started to receive lots of errors to postmaster@ box.

Subject: Cron <sogo@mail> /usr/sbin/sogo-ealarms-notify

Could not initialise iconv() for UTF16, using UCS-2
Using characters outside 16 bits may give bad results.
: Uncaught exception NSInternalInconsistencyException, reason: Unable to determine current user name
___________

Subject: Cron <sogo@mail> /usr/sbin/sogo-tool expire-sessions 30

Error (objc-load):/usr/lib/GNUstep/SoProducts-4.9/SoCore.sxp/./SoCore: failed to map segment from shared object: Cannot allocate memory
[so-product-registry] could not load product: SoCore
Error (objc-load):/usr/lib/GNUstep/GDLAdaptors-4.9/MySQL.gdladaptor/./MySQL: failed to map segment from shared object: Cannot allocate memory
2015-02-13 14:01:05.112 sogo-tool[5512] Cannot load adaptor bundle 'MySQL'
/usr/sbin/sogo-tool: Uncaught exception InvalidAdaptorBundleException, reason: Cannot load adaptor bundle 'MySQL'
___________

Subject: Cron <www-data@mail> [ -x /usr/share/awstats/tools/update.sh ] && /usr/share/awstats/tools/update.sh

Error while processing /etc/awstats/awstats.smtp.conf
Create/Update database for config "/etc/awstats/awstats.smtp.conf" by AWStats version 7.2 (build 1.992)
From data in log file "perl /usr/share/doc/awstats/examples/maillogconvert.pl standard < /var/log/mail.log |"...
Error: Couldn't open server log file "perl /usr/share/doc/awstats/examples/maillogconvert.pl standard < /var/log/mail.log |" : Cannot allocate memory
Setup ('/etc/awstats/awstats.smtp.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
___________

Subject: Cron <root@mail> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

/etc/cron.daily/spamassassin:
command 're2c -i -b -o scanner1.c scanner1.re' failed: exit 2
___________

Subject: Logwatch for mail (Linux)

################### Logwatch 7.4.0 (05/29/13) ####################
        Processing Initiated: Fri Feb 13 06:25:08 2015
        Date Range Processed: yesterday
                              ( 2015-Feb-12 )
                              Period is day.
        Detail Level of Output: 0
        Type of Output/Format: mail / text
        Logfiles for Host: mail
##################################################################

--------------------- Amavisd-new Begin ------------------------

       24   *Warning: Virus scanner connection failure
       31   Miscellaneous warnings 

        6   Total messages scanned ------------------  100.00%
   65.539K  Total bytes scanned                         67,112
========   ==================================================

        6   Passed ----------------------------------  100.00%
        6     Unchecked passed                         100.00%
========   ==================================================

        6   Unchecked -------------------------------  100.00%
        6     Unchecked passed                         100.00%
========   ==================================================



**Unmatched Entries**
        1   Deleting db files snmp.db,__db.001,__db.003,nanny.db,__db.002 in /var/lib/amavis/db

---------------------- Amavisd-new End -------------------------


--------------------- barracuda spam firewall Begin ------------------------



**Unmatched Entries**

Feb 12 02:01:12 mail amavis[28719]: (28719-03) (!)run_av (ClamAV-clamscan) FAILED - unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (512000 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 16384 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 433905\nLibClamAV Error: cli_loadhash: Problem parsing database at line 433905\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396245\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.642 sec (0 m 2 s)"
Feb 12 02:01:12 mail amavis[28719]: (28719-03) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (512000 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 16384 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 433905\nLibClamAV Error: cli_loadhash: Problem parsing database at line 433905\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396245\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.642 sec (0
m 2 s)" at (eval...
Feb 12 03:30:11 mail amavis[28720]: (28720-03) (!)run_av (ClamAV-clamscan) FAILED - unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 4097 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 260235\nLibClamAV Error: cli_loadhash: Problem parsing database at line 260235\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396245\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.316 sec (0 m 2 s)"
Feb 12 03:30:11 mail amavis[28720]: (28720-03) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 4097 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 260235\nLibClamAV Error: cli_loadhash: Problem parsing database at line 260235\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396245\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.316 sec (0 m
  2 s)" at (eval ...
Feb 12 06:25:21 mail amavis[28721]: (28721-03) (!)run_av (ClamAV-clamscan) FAILED - unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 1 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 239091\nLibClamAV Error: cli_loadhash: Problem parsing database at line 239091\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396245\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.475 sec (0 m 2 s)"
Feb 12 06:25:21 mail amavis[28721]: (28721-03) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 1 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 239091\nLibClamAV Error: cli_loadhash: Problem parsing database at line 239091\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396245\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.475 sec (0 m 2
s)" at (eval 140...
Feb 12 20:33:41 mail amavis[12863]: (12863-01) (!)run_av (ClamAV-clamscan) FAILED - unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: cli_mpool_strdup(): Can't allocate memory (21 bytes).\nLibClamAV Error: cli_loadhash: Problem parsing database at line 802687\nLibClamAV Error: Can't load main.mdb: Malformed database\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396841\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 4.265 sec (0 m 4 s)"
Feb 12 20:33:41 mail amavis[12863]: (12863-01) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: cli_mpool_strdup(): Can't allocate memory (21 bytes).\nLibClamAV Error: cli_loadhash: Problem parsing database at line 802687\nLibClamAV Error: Can't load main.mdb: Malformed database\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396841\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 4.265 sec (0 m 4 s)" at (eval 140) line 899.
Feb 12 21:03:57 mail amavis[12860]: (12860-01) (!)run_av (ClamAV-clamscan) FAILED - unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 4098 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 259239\nLibClamAV Error: cli_loadhash: Problem parsing database at line 259239\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396841\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.474 sec (0 m 2 s)"
Feb 12 21:03:57 mail amavis[12860]: (12860-01) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 2, output="WARNING: Ignoring deprecated option --disable-summary\nLibClamAV Error: mpool_malloc(): Can't allocate memory (262144 bytes).\nLibClamAV Error: hm_addhash_bin: failed to grow hash array to 4098 entries\nLibClamAV Error: cli_loadhash: Malformed hash string at line 259239\nLibClamAV Error: cli_loadhash: Problem parsing database at line 259239\nLibClamAV Error: Can't load main.mdb: Can't allocate memory\nLibClamAV Error: cli_tgzload: Can't load main.mdb\nLibClamAV Error: Can't load /var/lib/clamav/main.cvd: Malformed database\nLibClamAV Error: cli_loaddbdir(): error loading database /var/lib/clamav/main.cvd\nERROR: Malformed database\n\n----------- SCAN SUMMARY -----------\nKnown viruses: 1396841\nEngine version: 0.98.5\nScanned directories: 0\nScanned files: 0\nInfected files: 0\nData scanned: 0.00 MB\nData read: 0.00 MB (ratio 0.00:1)\nTime: 2.474 sec (0 m
  2 s)" at (eval ...

---------------------- barracuda spam firewall End -------------------------


--------------------- clam-update Begin ------------------------


Last ClamAV update process started at Thu Feb 12 23:34:05 2015

Last Status:
    WARNING: Your ClamAV installation is OUTDATED!
    WARNING: Local version: 0.98.5 Recommended version: 0.98.6
    DON'T PANIC! Read http://www.clamav.net/support/faq
    main.cvd is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
    Downloading daily-20062.cdiff [100%]
    daily.cld updated (version: 20062, sigs: 1324264, f-level: 63, builder: jesler)
    bytecode.cld is up to date (version: 246, sigs: 42, f-level: 63, builder: neo)
    Database updated (3748531 signatures) from db.local.clamav.net (IP: 213.174.32.130)

---------------------- clam-update End -------------------------


--------------------- httpd Begin ------------------------


Connection attempts using mod_proxy:
    1.164.46.10 -> mx0.mail2000.com.tw:25: 1 Time(s)
    1.169.88.208 -> mx0.mail2000.com.tw:25: 1 Time(s)

Requests with error response codes
    400 Bad Request
       /w00tw00t.at.ISC.SANS.DFind:): 3 Time(s)
    404 Not Found
       /favicon.ico: 2 Time(s)
       /mysql: 2 Time(s)
       /sql: 2 Time(s)
       /MySQLDumper: 1 Time(s)
       /SQLite/SQLiteManager-1.2.4/main.php: 1 Time(s)
       /SQLiteManager-1.2.4/main.php: 1 Time(s)
       /SQLiteManager/main.php: 1 Time(s)
       /SQlite/main.php: 1 Time(s)
       /jenkins/script: 1 Time(s)
       /jmx-console: 1 Time(s)
       /login: 1 Time(s)
       /manager/html: 1 Time(s)
       /msd: 1 Time(s)
       /msd1.24.4: 1 Time(s)
       /msd1.24stable: 1 Time(s)
       /mySqlDumper: 1 Time(s)
       /myadmin: 1 Time(s)
       /mysqldumper: 1 Time(s)
       /phpMyAdmin: 1 Time(s)
       /phpMyAdmin-4.2.1-all-languages: 1 Time(s)
       /phpMyAdmin-4.2.1-english: 1 Time(s)
       /phpmyadmin: 1 Time(s)
       /script: 1 Time(s)
       /sqlite/main.php: 1 Time(s)
       /sqlitemanager/main.php: 1 Time(s)
       /vtigercrm/: 1 Time(s)
    405 Method Not Allowed
       mx0.mail2000.com.tw:25: 2 Time(s)
    503 Service Unavailable
       /: 3 Time(s)

---------------------- httpd End -------------------------


--------------------- pam_unix Begin ------------------------

su:
    Sessions Opened:
       root -> debian-spamd: 3 Time(s)


---------------------- pam_unix End -------------------------


--------------------- Postfix Begin ------------------------

  135.123K  Bytes accepted                             138,366
   80.339K  Bytes sent via SMTP                         82,267
   62.960K  Bytes delivered                             64,471
   39.791K  Bytes forwarded                             40,746
========   ==================================================

       12   Accepted                                   100.00%
--------   --------------------------------------------------
       12   Total                                      100.00%
========   ==================================================

       11   Connections             
        2   Connections lost (inbound)
       11   Disconnections         
       17   Removed from queue     
        7   Delivered               
        7   Sent via SMTP           
        3   Forwarded               
        2   Notifications sent     

        2   SASL authenticated messages


---------------------- Postfix End -------------------------


--------------------- SSHD Begin ------------------------


Users logging in through sshd:
    antonio:
       31.43.102.240 (unallocated.sta.lan.ua): 1 time

---------------------- SSHD End -------------------------


--------------------- Disk Space Begin ------------------------

Filesystem      Size  Used Avail Use% Mounted on
/dev/vda2        24G  2.5G   21G  11% /
udev            486M  4.0K  486M   1% /dev
/dev/vda1       488M   67M  396M  15% /boot


---------------------- Disk Space End -------------------------


###################### Logwatch End #########################

___________

Subject: Cron <amavis@mail> test -e /usr/sbin/amavisd-new-cronjob && /usr/sbin/amavisd-new-cronjob sa-sync

rules: failed to run T_SPF_HELO_TEMPERROR test, skipping:
    (Can't locate object method "check_for_spf_helo_temperror" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1183) line 123.
)
rules: failed to run T_SPF_PERMERROR test, skipping:
    (Can't locate object method "check_for_spf_permerror" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1183) line 1782.
)
rules: failed to run T_SPF_TEMPERROR test, skipping:
    (Can't locate object method "check_for_spf_temperror" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1183) line 1881.
)
rules: failed to run T_SPF_HELO_PERMERROR test, skipping:
    (Can't locate object method "check_for_spf_helo_permerror" via package "Mail::SpamAssassin::PerMsgStatus" at (eval 1183) line 1980.
)
___________

Sorry that the post is so long.
What to check, what to look?
Please help.

Thanks in advance!!!

Best Regards,
Anton.

----

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

2

Re: 13 accounts -> mail server stops working

Looks like caused by lack of memory on this server. How much memory do you have on this server?
Also, please show me output of below commands:

# grep 'max_servers' /etc/amavis/conf.d/50-user
# grep 'smtp-amavis' /etc/postfix/master.cf

3

Re: 13 accounts -> mail server stops working

ZhangHuangbin wrote:

Looks like caused by lack of memory on this server. How much memory do you have on this server?

I have 1GB. Max usage what I have seen was about 900MB when people faced the issue of impossible connection to mail server.
Few hours ago I made a 2GB swap file.

ZhangHuangbin wrote:

Also, please show me output of below commands:

# grep 'max_servers' /etc/amavis/conf.d/50-user
# grep 'smtp-amavis' /etc/postfix/master.cf

$max_servers = 4;
and
#  -o content_filter=smtp-amavis:[127.0.0.1]:10026
smtp-amavis unix -  -   -   -   4  smtp

4

Re: 13 accounts -> mail server stops working

As you can see, there're 2 '4' in output. Please change them both to 2, restart both Postfix and amavisd services. then keep monitoring server status.

5

Re: 13 accounts -> mail server stops working

Thanks a lot. Seems to work ok now.

6

Re: 13 accounts -> mail server stops working

Did the trick for me as well. Thanks ZhangHuangbin and TitanFighter!