Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] Help!

2006-10-27 by eclark

We run 81211 with the patches. But anyway! If you are getting flooded to the 
point where for some unknown reason greylist goes down, you can use a cronjob 
like so:
---
*/10 * * * * /home/gdmilter/is-milter-alive.sh >/dev/null 2>&1
---

#!/bin/bash

pids=($(pgrep gdmilter))
if (( ${#pids[@]} > 3 ))
then
 echo "`date` up with ${#pids[@]}" >> /home/gdmilter/gdmilterlog

else
  echo down with ${#pids[@]} at $(date) >> /home/gdmilter/gdmilterlog

  rm -rf /home/gdmilter/milter-gdmilter.sock
  /etc/rc.d/init.d/gdmilter stop
  killall -9 gdmilter ; kill -9 $(pidof gdmilter)
  sleep 5; kill -9 `pidof gdmilter`

  /etc/rc.d/init.d/gdmilter start
  echo $(date) restarted >> /home/gdmilter/gdmilterlog
fi


---
Obviously we renamed the milter to gdmilter, and stuck the socket elsewhere, 
but you get the general idea. This will help get the milter back up if it 
gets overloaded to the point where it shuts down.


On Friday 27 October 2006 02:49 pm, Oliver Fromme wrote:
> An.H.Nguyen wrote:
>  > - I can't fine /var/milter-greylist/milter-greylist.sock on one of my
>  > two servers, should I copy this file over? (It's size is zero and has
>  > a special permission settings srwxr-xr-x)
>
> No.  You cannot copy a socket.  Sockets are special files
> that are autmatically created when a server process binds
> to a UNIX domain socket.  Restarting the server process
> (in this case, milter-greylist) should be sufficient to
> create the socket.
>
>  > SW Versions:
>  > Sendmail 8.12.10
>
> You should upgrade ASAP.
>
> Best regards
>    Oliver

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.