[SOLVED] amavis service is running but no port 10024 and 10026
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I run service amavis status there is a line as below.
Code:
(!)Net::Server: 2020/09/10-17:42:22 Can't connect to TCP port 10026 on ::1 [Cannot assign requested address]\n at line 64 in file /usr/share/perl5/Net/Server/Proto/TCP.pm
What could be the problem?
On the other hand, I did a lot of search, all of them mention about amavisd service but my ubuntu-18-04.5 has amavis service only.
. it asks to install policycoreutils-python-utils. After apt install policycoreutils-python-utils and run
Code:
#semanage port -l | grep amavis
it show:
Code:
Traceback (most recent call last):
File "/usr/sbin/semanage", line 28, in <module>
import seobject
File "/usr/lib/python3/dist-packages/seobject.py", line 1039, in <module>
class portRecords(semanageRecords):
File "/usr/lib/python3/dist-packages/seobject.py", line 1041, in portRecords
valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"])
File "/usr/lib/python3/dist-packages/sepolicy/__init__.py", line 196, in <genexpr>
return ({
File "/usr/lib/python3/dist-packages/setools/typeattrquery.py", line 65, in results
for attr in self.policy.typeattributes():
AttributeError: 'NoneType' object has no attribute 'typeattributes'
It might SE Linux that prevents Amavis to bind to ports others than 10024 and 10025.
OP runs ubuntu-18-04.5, so I don't think it's a SELinux problem
@OP
Quote:
(!)Net::Server: 2020/09/10-17:42:22 Can't connect to TCP port 10026 on ::1 [Cannot assign requested address]\n at line 64 in file /usr/share/perl5/Net/Server/Proto/TCP.pm
Doh, maybe your box does not support IPV6.
Try to restart amavis and watch the logs to see what happens.
Thank you everyone. I fixed it by adding a line to 50-user config file
Code:
$inet_socket_bind = '127.0.0.1';
It's like Magic!
As I thought. Your server didn't understand the ::1 (the localhost IPv6 address), so it now binds just on 12.0.0.1
Anyway, glad it worked. You may mark the thread "Solved" from the thread tools on top of the page
Hope this thread can help somebody who have suffered from amavis. Amavis has suffered me for a couple of week. Now I changed to Rspamd. It has nice web gui.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.