Expanding Port Use

Nick Phillips nwp at LEMON-COMPUTING.COM
Sun Dec 9 13:48:07 GMT 2001


On Sat, Dec 08, 2001 at 04:05:49PM +0000, Carl Hogue wrote:
> It appears that the default restart every four hours results in a new port
> connection by syslog without the previous connection being terminated:
>
> UDP
>  Lcl port       Rmt port     Status
>   4725=?         514=syslog  01=ESTABLISD
>   4724=?         514=syslog  01=ESTABLISD
>   4718=?         514=syslog  01=ESTABLISD
>   4671=?         514=syslog  01=ESTABLISD
>   4599=?         514=syslog  01=ESTABLISD
>   4580=?         514=syslog  01=ESTABLISD
>   4548=?         514=syslog  01=ESTABLISD
>   4534=?         514=syslog  01=ESTABLISD
>   4461=?         514=syslog  01=ESTABLISD

Thanks for pointing this out.

> Suggestions on how to resolve this problem would be appreciated.

I'm fixing it in CVS now; it will be fixed in the next release. In the
meantime, for anyone who wants to fix it now, you need to modify the bottom
of the main mailscanner script to look something like this:


# I have done a large number of virus scanning runs now,
# so kill and re-run myself.
unless ($Config::Debugging) {
  Log::DebugLog("About to re-exec myself: exec args ($0), (" . @ARGV . "), cwd is (" . `pwd` . ")...");
  # Don't want to leave connections to 514/udp open...
  Sys::Syslog::closelog();
  # But we may need to log here...
  exec $0, @ARGV or do {
    Log::Start($basename);
    DieLog("Could not re-exec myself!");
  };
}

--
Nick Phillips -- nwp at lemon-computing.com
Your boss climbed the corporate ladder, wrong by wrong.



More information about the MailScanner mailing list