1

Topic: AMAVISD-NEW listens on unexpected port when server boots?

iRedMail 1.3.2 MARIADB edition. deployed with the downloadable installer on uBuntu 20.04 on Linode, mail accounts are stored MySQL, www server is Nginx.

While testing a brand new mail server I'm seeing something curious when checking netstat -plunt to see what ports are open.

When the server boots as well as the usual :
tcp        0      0 127.0.0.1:10024         0.0.0.0:*               LISTEN      2922/amavisd-new (m
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      2492/master         
tcp        0      0 127.0.0.1:10026         0.0.0.0:*               LISTEN      2922/amavisd-new (m
tcp        0      0 127.0.0.1:10027         0.0.0.0:*               LISTEN      2922/amavisd-new (m
tcp        0      0 127.0.0.1:9998          0.0.0.0:*               LISTEN      2922/amavisd-new (m

amavisd-new is open on
udp        0      0 0.0.0.0:38694           0.0.0.0:*                           1882/amavisd-new (c

The udp port changes to a different port at every boot, and I can't see a reference in the conf files for AMAVISD.

If I restart AMAVIS with systemctl restart amavis, and then run netstat -plunt again the UDP port is gone.

What am I missing?

cheers
Chris

----

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

2

Re: AMAVISD-NEW listens on unexpected port when server boots?

If anybody else is seeing this it appears to relate to the order in which amavis is starting in relation to clam, spamassassin etc.
My server iuBuntu 20.04 is running at a runlevel of 5, so in /etc/rc5.d I had to shift S01amavis -> ../init.d/amavis  down to
S99amavis-> ../init.d/amavis  .

That at least for the moment seems to be the work around.

Cheers

Chris

3

Re: AMAVISD-NEW listens on unexpected port when server boots?

First sign of madness replying to your own posts smile

Forget what I said in the prior post, after rebooting the server many times and monitoring  there are times when amavis is still opening a udp port that I can't explain.
It turned out to be pure coincidence.

4

Re: AMAVISD-NEW listens on unexpected port when server boots?

if Amavisd is trying to connect to something via udp, then system will give it a dynamical port, this is quite normal.