Possible send mail problem

Discussion in 'General' started by Toucan, Mar 16, 2011.

  1. Toucan

    Toucan Member

    I'm having problems using mail on one server. Any mail that seems to be generated seems to just get stuck in the outgoing mail queue. Most are sent from a php script but some may not be. The messages reports look like this:

    EB68F28D 444 Wed Mar 16 01:32:29 [email protected]
    (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    david@myother server.com


    all other messages also seem to be connection refused

    netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 3417/master
    tcp 0 0 *:mysql *:* LISTEN 8190/mysqld
    tcp 0 0 localhost.localdo:spamd *:* LISTEN 2730/spamd.pid
    tcp 0 0 *:sunrpc *:* LISTEN 2292/portmap
    tcp 0 0 *:ftp *:* LISTEN 14776/pure-ftpd (SE
    tcp 0 0 badbison.badbiso:domain *:* LISTEN 1640/mydns
    tcp 0 0 localhost.locald:domain *:* LISTEN 1640/mydns
    tcp 0 0 *:munin *:* LISTEN 3568/munin-node
    tcp 0 0 *:ssh *:* LISTEN 2502/sshd
    tcp 0 0 *:smtp *:* LISTEN 3417/master
    tcp 0 0 localhost.localdoma:671 *:* LISTEN 3463/famd
    tcp 0 0 localhost.localdo:45931 localhost.locald:sunrpc TIME_WAIT -
    tcp 0 0 localhost.localdo:39425 localhost.localdoma:671 TIME_WAIT -
    tcp 0 0 badbison.badbison:39470 badbison.co.uk:mysql TIME_WAIT -
    tcp 0 52 badbison.badbison.c:ssh 5acbb067.bb.sky.c:49447 ESTABLISHED 7097/0
    tcp 0 0 badbison.badbison:36356 badbison.badbison:imap2 TIME_WAIT -
    tcp6 0 0 [::]:imaps [::]:* LISTEN 3331/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 3349/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 3337/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 3314/couriertcpd
    tcp6 0 0 [::]:http-alt [::]:* LISTEN 13764/apache2
    tcp6 0 0 [::]:www [::]:* LISTEN 13764/apache2
    tcp6 0 0 [::]:tproxy [::]:* LISTEN 13764/apache2
    tcp6 0 0 [::]:ftp [::]:* LISTEN 14776/pure-ftpd (SE
    tcp6 0 0 localhost:domain [::]:* LISTEN 1640/mydns
    tcp6 0 0 [::]:ssh [::]:* LISTEN 2502/sshd
    tcp6 0 0 [::]:https [::]:* LISTEN 13764/apache2
    tcp6 0 0 badbison.badbison.c:www 5acbb067.bb.sky.c:50248 TIME_WAIT -
    tcp6 0 0 badbison.badbison.c:www 5acbb067.bb.sky.c:50252 FIN_WAIT2 -




    uname -a
    Linux badbison.badbison.com 2.6.26-2-amd64 #1 SMP Tue Jan 25 05:59:43 UTC 2011 x86_64 GNU/Linux
     
    Last edited: Mar 16, 2011
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The amavisd service is not started. To fix that, start amavisd.
     
  3. Toucan

    Toucan Member

    Till, thank you for that.

    starting the service and flushing the mail queue worked.

    How did you know that was the issue? Was it just the lack of service for amavisd from the netstat command?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    It was the error of the message in the mailqueue:

    connect to 127.0.0.1[127.0.0.1]:10024: Connection refused

    The normal email port is 25, but the error occured on port 10024, which is the port of the amavisd daemon.
     
  5. Toucan

    Toucan Member

    Thank you. A good learning problem solving exercise for me.
     
  6. Toucan

    Toucan Member

    Sadly I should have asked the question, why was amavisd offline to start with....

    It is running now but mails are still getting caught in the queue with errors. When sending an email through roundcube, the server load went sky high and caused it to become completely unresponsive. The load went up beyond 50.

    It's now down to:
    Code:
    uptime
     23:01:30 up 33 days, 21:28,  1 user,  load average: 0.59, 0.31, 0.45
    uptime
     23:02:26 up 33 days, 21:29,  1 user,  load average: 0.23, 0.26, 0.43
    uptime
     23:03:06 up 33 days, 21:29,  1 user,  load average: 0.12, 0.22, 0.41
    
    





    The queue looks like this:
    Code:
    C05392E        1495 Wed Mar 16 22:18:26  [email protected]
    (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=21674-01, parts_decode_ext FAILED: file(1) utility (/usr/bin/file) error: run_command (open pipe): Can't fork at /usr/lib/perl/5.10/IO/File.pm line 66. at /usr/sbin/amavisd-new line 2892. (in reply to end of DATA command))
                                             [email protected]
    
    CC038208       1781 Wed Mar 16 22:45:40  [email protected]
    (host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to MAIL FROM command))
                                             [email protected]
    
    430DE286        519 Wed Mar 16 22:22:31  [email protected]
    (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=21694-01, parts_decode_ext FAILED: file(1) utility (/usr/bin/file) error: run_command (open pipe): Can't fork at /usr/lib/perl/5.10/IO/File.pm line 66. at /usr/sbin/amavisd-new line 2892. (in reply to end of DATA command))
                                             [email protected]
    
    37C3E30         548 Wed Mar 16 22:04:54  [email protected]
    (host 127.0.0.1[127.0.0.1] said: 421 4.3.2 Service shutting down, closing channel (in reply to MAIL FROM command))
                                             [email protected]
    
    The free memory looks like this:
    Code:
    free
                 total       used       free     shared    buffers     cached
    Mem:        511312     494168      17144          0       1764      29508
    -/+ buffers/cache:     462896      48416
    Swap:       498004     497860        144
    
    Is it possible a new mail gets dealt with either in or out amavis kicks in and can't handle it all?
     
    Last edited: Mar 17, 2011
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you need more memory. I use 2gb ram for my email vm's.
     
  8. Toucan

    Toucan Member

    Thanks Till
    Increased ram to 1gb - and munin reports actually show some white space now.

    For info of others who ask about minimum spec and performance, the server with 512kb was running fine serving about 20 CMS sites but when mail services were added it needed the extra memory most probably for the intense amavisd service. The extra ram has coincidently made web serving MUCH faster. Full spec as below on a vds:

    250 MHz processing reservation though no limit on bursts
    1Gb of ram
    1Gbps connectivity
     

Share This Page