1

Topic: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====Ired version 0.8.7
Db Type: mysql
Linux: Centos 6.0
Amavisd version: 2.9.1-2

I have trouble in mail traffic. At least I found amavisd is not working. I had to disable from main.cf but it saves me from lots of spam mail. Please check the command output below.

# /usr/sbin/amavisd -c /etc/amavisd/amavisd.conf debug

Nov 26 07:30:44.834 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: logging initialized, log level 0, syslog: amavis.mail
Nov 26 07:30:44.835 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: starting. /usr/sbin/amavisd at ip-10-58-191-189.eu-west-1.compute.internal amavisd-new-2.9.1 (20140627), Unicode aware, LANG="en_US.UTF-8"
Nov 26 07:30:44.835 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: perl=5.010001, user=, EUID: 496 (496);  group=, EGID: 497 497 (497 497)
Nov 26 07:30:44.867 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: INFO: no optional modules: unicore::lib::Perl::Alnum.pl unicore::lib::Perl::SpacePer.pl unicore::lib::Perl::Word.pl unicore::lib::Alpha::Y.pl unicore::lib::Nt::De.pl Unix::Getrusage
Nov 26 07:30:44.867 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: SpamControl: attempting to load scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Nov 26 07:30:44.867 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: SpamControl: scanner SpamAssassin, module Amavis::SpamControl::SpamAssassin
Nov 26 07:30:45.069 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: INFO: SA version: 3.3.1, 3.003001, no optional modules: Net::CIDR::Lite URI::_idna URI::_punycode Image::Info Image::Info::GIF Image::Info::JPEG Image::Info::PNG Image::Info::BMP Image::Info::TIFF auto::NetAddr::IP::InetBase::inet_any2n auto::NetAddr::IP::InetBase::inet_n2ad auto::NetAddr::IP::InetBase::inet_n2dx auto::NetAddr::IP::InetBase::inet_ntoa auto::NetAddr::IP::InetBase::ipv6_aton auto::NetAddr::IP::InetBase::ipv6_ntoa
Nov 26 07:30:45.069 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: SpamControl: init_pre_chroot on SpamAssassin done
Nov 26 07:30:45.069 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: socket module IO::Socket::INET6, protocol families available: INET, INET6
Nov 26 07:30:45.069 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: bind to /var/spool/amavisd/amavisd.sock|unix, 127.0.0.1:10024/tcp, [::1]:10024/tcp
Nov 26 07:30:45.073 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: Net::Server: 2014/11/26-07:30:45 Amavis (type Net::Server::PreForkSimple) starting! pid(24432)
Nov 26 07:30:45.077 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: Net::Server: Binding to UNIX socket file "/var/spool/amavisd/amavisd.sock"
Nov 26 07:30:45.080 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
Nov 26 07:30:45.080 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: Net::Server: Binding to TCP port 10024 on host ::1 with IPv6
Nov 26 07:30:45.081 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: (!)Net::Server: 2014/11/26-07:30:45 Can't connect to TCP port 10024 on ::1 [Cannot assign requested address]\n  at line 68 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm
Nov 26 07:30:45.081 ip-10-58-191-189.eu-west-1.compute.internal /usr/sbin/amavisd[24432]: Net::Server: 2014/11/26-07:30:45 Server closing!

My Amavisd conf file.

is attached

What be causing amavis not starting?

Post's attachments

amavis.conf 26.56 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

----

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

2

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

onurzaim wrote:

Net::Server: Binding to UNIX socket file "/var/spool/amavisd/amavisd.sock"
Net::Server: Binding to TCP port 10024 on host 127.0.0.1 with IPv4
Net::Server: Binding to TCP port 10024 on host ::1 with IPv6
(!)Net::Server: 2014/11/26-07:30:45 Can't connect to TCP port 10024 on ::1 [Cannot assign requested address]\n  at line 68 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm
Net::Server: 2014/11/26-07:30:45 Server closing!

It means some other service is listening on port 10024, so Amavisd cannot bind to this port number.

Please try to figure out which service is listening on this port, stop it or switch to another port. Then try to start amavisd again.

3 (edited by onurzaim 2014-11-26 21:24:16)

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

Thank you for your reply.

it seems 10024 is not occupied

# netstat -tulpn

tcp        0      0 0.0.0.0:995                 0.0.0.0:*                   LISTEN      2037/dovecot        
tcp        0      0 127.0.0.1:10025             0.0.0.0:*                   LISTEN      2218/master         
tcp        0      0 127.0.0.1:3306              0.0.0.0:*                   LISTEN      1996/mysqld         
tcp        0      0 0.0.0.0:587                 0.0.0.0:*                   LISTEN      2218/master         
tcp        0      0 0.0.0.0:110                 0.0.0.0:*                   LISTEN      2037/dovecot        
tcp        0      0 127.0.0.1:10031             0.0.0.0:*                   LISTEN      2053/perl           
tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN      2037/dovecot        
tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1371/sshd           
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN      2218/master         
tcp        0      0 0.0.0.0:4190                0.0.0.0:*                   LISTEN      2037/dovecot        
tcp        0      0 127.0.0.1:7777              0.0.0.0:*                   LISTEN      2360/python         
tcp        0      0 0.0.0.0:993                 0.0.0.0:*                   LISTEN      2037/dovecot        
tcp        0      0 0.0.0.0:10050               0.0.0.0:*                   LISTEN      2266/zabbix_agentd  
tcp        0      0 :::80                       :::*                        LISTEN      2233/httpd          
tcp        0      0 :::22                       :::*                        LISTEN      1371/sshd           
tcp        0      0 :::443                      :::*                        LISTEN      2233/httpd          
tcp        0      0 :::10050                    :::*                        LISTEN      2266/zabbix_agentd  

Is there another way I can figure this out? I tried ot set another port

I tried using another ports like 10040, 10028, it did not work either.

Addition info:

# ip addr

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:25:90:89:63:f4 brd ff:ff:ff:ff:ff:ff
    inet xxx.xx.xx.xx/32 scope global eth0
    inet6 2a03:f80:ed15:151:236:8:17:1/64 scope global 
       valid_lft forever preferred_lft forever

# ifconfig

eth0      Link encap:Ethernet  HWaddr 00:25:90:89:63:F4  
          inet addr:xxx.xx.xx.xx  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: 2a03:f80:ed15:xxx:xxx:xx:xx:1/64 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:705692237 errors:0 dropped:0 overruns:7489 frame:0
          TX packets:702853642 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:430620729153 (401.0 GiB)  TX bytes:559543211421 (521.1 GiB)
          Memory:fbe20000-fbe40000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:351885086 errors:0 dropped:0 overruns:0 frame:0
          TX packets:351885086 errors:0 dropped:0 overruns:0 carr

should I add IPv6 config in my ifcfg-lo file or can I disable it from amavisd.conf?

4

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

onurzaim wrote:

tcp        0      0 127.0.0.1:10025             0.0.0.0:*                   LISTEN      2218/master

Looks like Amavisd is listening on port 10025. You should try to kill this process and try to restart amavisd service again.

5 (edited by onurzaim 2014-11-28 01:53:25)

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

Hello,
Killing the process did not work. I still get the same error in the debug output.

Additional question:

Can I run amavisd on another server and make my mail server run like that? İt is suppose to run in the same setup?

6

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

onurzaim wrote:

Killing the process did not work. I still get the same error in the debug output.

All i can say is, make sure no other program using port 10024, then try to start amavisd again.

=onurzaim wrote:

Can I run amavisd on another server and make my mail server run like that? İt is suppose to run in the same setup?

Yes, of course you can separate Postfix and Amavisd to two servers.

Update Postfix parameter "content_filter" to use Amavisd running on another server, and update Amavisd parameter "forward_method" (running on another server) to re-inject emails to Postfix.

7

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

Hello,

I seperated amavisd. I think my openVZ hosting does not support IPv6. I could not find the problem

Update Postfix parameter "content_filter" to use Amavisd running on another server, and update Amavisd parameter "forward_method" (running on another server) to re-inject emails to Postfix.

I also had to add
$inet_socket_bind = undef


Now I am dealing with.

lookup_ip_acl (inet_acl) arr.obj: key="::ffff:xx.xx.xx.xx", no match
(!)DENIED ACCESS from IP ::ffff:xx.xx.xx.xx, policy bank ''

I think the related lines are but using my postfx mail server IP adress did not work.

$policy_bank{'AM.PDP-INET'} = {
    protocol => 'AM.PDP',       # select Amavis policy delegation protocol
    inet_acl => qw( 12.34.56.78 ),    # restrict access to these IP addresses
    auth_required_release => 0,    # 0 - don't require secret_id for amavisd-release
    #log_level => 4,
    #always_bcc_by_ccat => {CC_CLEAN, 'admin@example.com'},
};

Hope fully I'll find a solution for it.

8

Re: Amavisd not starting (::1 [Cannot assign requestes address]\n) ...

I found the solution. Of your old mails helped out

http://www.iredmail.org/forum/topic2377 … -mail.html

I added

@inet_acl = qw( 127.0.0.1 xxx.xxx.xx.xx [::1] ),

to the end of the amavisd.conf file.