Search

Recent Posts

Tags


« | Main | »

BSD Milter-greylist smfi_main error – won’t start after ‘system upgrade’

By Dale Reagan | November 15, 2012

Ok, you have a system that you partially manage (the ISP updates/installs ‘system’ level goodies like networking, foundation email binaries, system level libraries, etc.)

All works well for months (or longer) and then, you start getting SPAM from Country ZZ (which you are sure you ‘banned’ using milter-greylist.)  Hmm..  In my, case I also get ‘alerts’ when services (like milter-greylist stop working…)

You log into your server and review:

Ok, you try to manually start milter-greylist and get and command line error with something like:

You try a few web searches and only locate developer-email-list type messages – that are mostly old; Until NOW (since you find this post…)  🙂

Hm, not very helpful.  Ok, could be a bunch of problems so you try ‘upgrading’ to the latest version of milter-greylist:

Ok, getting the same error. Time to check ‘all logs’.

You start a ‘tail -f /var/log/messages’ & try to start milter-greylist again.  Hm, same error and nothing in the messages file…

You start a ‘tail -f /var/log/maillog’ & try to start milter-greylist again. Ah HA!.  Now you dig through the ~/maillog and find:

Nov 11 HH:MM:SS Your_Dom sm-mta[20907]: qAF9Zn26020907: Milter add: header: X-Greylist:  <<snip>>
Nov 11 HH:MM:SS Your_Dom milter-greylist: greylist: mi_stop=1
Nov 11 HH:MM:SS Your_Dom milter-greylist: smfi_main() returned 0
Nov 11 HH:MM:SS Your_Dom milter-greylist: Final database dump: no change to dump

Above, last ‘working’ greylist entry followed by a shutdown status.  Below, trying to restart the process:

Nov 11 HH:MM:SS Your_Dom milter-greylist: greylist: smfi_register: version mismatch application: 16777217 != milter: 2
Nov 11 HH:MM:SS Your_Dom milter-greylist: /milter-greylist: smfi_register failed
Nov 11 HH:MM:SS Your_Dom sm-mta[39918]: qAF9qkI4039918: Milter (greylist): local socket name /var/milter-greylist/milter-greylist.sock unsafe
Nov 11 HH:MM:SS Your_Dom sm-mta[39918]: qAF9qkI4039918: Milter (greylist): to error state

After upgrading AND modifying the militer-greylist config file to use a different location for the ‘sock’ file the process works again.  [And, noting that your configuration may vary quite a bit from mine so you may need to also review your Sendmail.[mc,cf] files.,,]

Nov 11 HH:MM:SS Your_Dom milter-greylist: smfi_main() returned 0
Nov 11 HH:MM:SS Your_Dom milter-greylist: greylist: smfi_register: version mismatch application: 16777217 != milter: 2
Nov 11 HH:MM:SS Your_Dom milter-greylist: /milter-greylist: smfi_register failed
<snip>
Nov 11 HH:MM:SS Your_Dom milter-greylist: smfi_main() returned -1
Nov 11 HH:MM:SS Your_Dom milter-greylist: smfi_main() returned 0

 Guessing that the ‘problem’ (unsafe sock file) is related to Sendmail configuration. Does the socket file listed in your sendmail.mc config file (search for INPUT_MAIL_FILTER) match the path on the milter-greylist configuration file?

Need more info on how Sendmail Milters work – visit http://www.milter.org/.

As always, your mileage may vary (but your solution may be similar, at least for this issue…)  🙂

Topics: Problem Solving, System and Network Security, Unix-Linux-Os | Comments Off on BSD Milter-greylist smfi_main error – won’t start after ‘system upgrade’

Comments are closed.


________________________________________________
YOUR GeoIP Data | Ip: 73.21.121.1
Continent: NA | Country Code: US | Country Name: United States
Region: | State/Region Name: | City:
(US only) Area Code: 0 | Postal code/Zip:
Latitude: 38.000000 | Longitude: -97.000000
Note - if using a mobile device your physical location may NOT be accurate...
________________________________________________

Georgia-USA.Com - Web Hosting for Business
____________________________________