MailScanner 5 on Gentoo

Jerry Benton jerry.benton at mailborder.com
Mon Nov 14 04:05:37 UTC 2016


Ok, I can’t tell if you are happy about v5 or not. So, here is some of the logic:


- I put the config in /etc/MailScanner/defaults because configs are in a different place on every distro. This keeps it in one place no matter what distro you are using. I support a lot of different distros, and trying to find it in 5 different places on 5 different distros is a pain in the ass. I would suggest leaving it where it is and using a symlink for your distro. 

- The same logic was used for ms-init, /var/lock/subsys/Mailscanner, and /var/log/MailScanner.off

- run_mailscanner is in place so that MailScanner does not get started accidentally before MailScanner.conf has been setup. 

- The PID of the mater process is put in the PID file. If ms-check does not find a matching PID of what it should be, it restarts everything. 


If you have some suggestions for changes that will work across all distros, please do post it here so I can review and implement them. 



Jerry Benton
www.mailborder.com
+1 - 844-436-6245



> On Nov 13, 2016, at 4:00 PM, Michael Weiser <michael at weiser.dinsnail.net> wrote:
> 
> Hey guys and especially Jerry,
> 
> I know I'm ridiculously late to the party here but I still need to get
> this off my chest: Jerry, you're my hero! :)
> 
> I just updated my Gentoo-based MailScanner installation from something
> ancient to MailScanner 5.0.3-7 and just couldn't believe how insanely
> sane this new MailScanner is. So I went right ahead and reworked the
> Gentoo package to reflect that.
> 
> I couldn't resist sticking with Gentoo's /etc/conf.d for what
> /etc/MailScanner/defaults does now. Also I couldn't bring myself to even
> try to install ms-init and stuck with an updated openrc
> start-stop-daemon-based init script. And finally I patched around in
> ms-check because I couldn't really wrap my head around the benefit of
> having a stopped_lockfile *and* a run_mailscanner setting. I've tried to
> formulate my thoughts on all this in a README.Gentoo
> (https://584524.bugs.gentoo.org/attachment.cgi?id=453228).
> 
> Anyway, I found an already open bug on updating the Gentoo package and
> stuck my stuff into it. There's lots of explanations and rationale in
> the ebuild, the ms-check patch and the README.Gentoo if anyone's
> interested: https://bugs.gentoo.org/show_bug.cgi?id=584524.
> Now we'll have to see if it gets picked up.
> 
> Here are some additional points for your consideration hidden away as
> comments in the ebuild:
> 
> On /etc/conf.d/MailScanner (aka /etc/MailScanner/defaults):
> - nothing is using the ms_re2c setting (ms-update-sa finds it on its own)
> - ms_etc isn't used anywhere
> 
> On calls to ms-init in /usr/sbin/ms-update-bad-emails and
> /usr/sbin/ms-update-sa:
> 
> change restarts via ms-init after e.g. rules updates into
> reloads via /etc/init.d/MailScanner
> a.) reloads should be enough because they restart all children and the
>    parent MailScanner doesn't do anything so doesn't need the update
> b.) this way we'll never accidentally start MailScanner when it's
>    supposed to be switched off without mucking about with
>    $run_mailscanner and $stopped_lockfile
> 
> What I mean there is: A simple SIGHUP instead of ms-init restart
> should do the trick and be safer at the same time, shouldn't it?
> 
> Feel free to bash me (a bit :) for stuff I got wrong.
> 
> And thanks again! This is awesome! :)
> -- 
> Michael
> 
> 
> -- 
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailscanner.info/pipermail/mailscanner/attachments/20161113/0aaf8886/attachment.html>


More information about the MailScanner mailing list