MailScanner v5 standardization
Peter C. Ndikuwera
pndiku at gmail.com
Wed Apr 27 07:29:18 UTC 2016
AFAIK, systemd is backwards compatible with init scripts.
So it should work.
--
Evolution (n): A hypothetical process whereby infinitely improbable events
occur with alarming frequency, order arises from chaos, and no one is given
credit.
On 27 April 2016 at 01:11, Dave Jones <dave at jonesol.com> wrote:
> Any thoughts about trying to get a docker image for MailScanner so it
> would be very easy to get running on any OS? It would be a very large and
> interesting Dockerfile... :)
>
> On Mon, Apr 25, 2016 at 5:22 PM, Jerry Benton <jerry.benton at mailborder.com
> > wrote:
>
>> The script to start the process will be here:
>>
>> /usr/share/MailScanner/init/mailscanner
>>
>> Depending on the distribution, it will be symlinked to /etc/init.d/ or
>> /etc/rc.d/init.d/ or … I am still working on FreeBSD and other NIXs.
>>
>> I have not researched the systemd thing yet. I know a similar process can
>> be accomplished. I just don’t have the details yet.
>>
>> -
>> Jerry Benton
>> www.mailborder.com
>>
>>
>>
>> > On Apr 25, 2016, at 6:18 PM, Gao <gao at pztop.com> wrote:
>> >
>> > So we still use init start script and no systemd support? Lots OS moved
>> to systemd although I don't like it.
>> >
>> > Gao
>> >
>> > On 16-04-24 11:49 PM, Jerry Benton wrote:
>> >> One more …
>> >>
>> >> I will be removing the start/stop/restart links to
>> postfix/exim/sendmail, etc within the MailScanner init script. The init
>> script will control MailScanner and MailScanner only. As far I know, this
>> should have no impact on sendmail/exim/postfix operation. From that I mean,
>> “service sendmail restart” should have both the in and out processes
>> restarted without issue. There is no need for MailScanner to start and stop
>> them. I know for a fact this has no impact on using MailScanner with
>> Postfix.
>> >>
>> >> Correct me if I am wrong about Sendmail or Exim.
>> >>
>> >> -
>> >> Jerry Benton
>> >> www.mailborder.com
>> >>
>> >>
>> >>
>> >>> On Apr 25, 2016, at 2:31 AM, Jerry Benton <
>> jerry.benton at mailborder.com> wrote:
>> >>>
>> >>> So I am working v5 now. I am trying to standardize everything across
>> all NIX platforms. Apparently, we all can’t get along.
>> >>>
>> >>>
>> >>> -- FHS layout
>> >>>
>> >>> That /opt bullshit will be gone. This is the directory structure for
>> every NIX:
>> >>>
>> >>> /etc/MailScanner
>> >>> /usr/share/MailScanner
>> >>> /var/lib/MailScanner
>> >>> /var/spool/MailScanner
>> >>>
>> >>> Symlinks will be provided in /etc/MailScanner for the following items:
>> >>>
>> >>> Custom perl modules:
>> >>> /etc/MailScanner/custom -> /usr/share/MailScanner/perl/custom
>> >>>
>> >>> Reports:
>> >>> /etc/MailScanner/reports ->/usr/share/MailScanner/reports
>> >>>
>> >>> Same place. Every OS. Celebrate.
>> >>>
>> >>>
>> >>> -- Basic config file
>> >>>
>> >>> I have a dilemma regarding the /etc/defaults/mailscanner or
>> /etc/sysconfig/mailscanner or on FreeBSD ... I have no idea.
>> >>>
>> >>> The point being they are in different places on each OS. So, I am
>> more than likely going to do this unless someone has a VERY compelling
>> reason not to do this:
>> >>>
>> >>> /etc/MailScanner/defaults
>> >>>
>> >>>
>> >>> Same place. Every OS. Celebrate.
>> >>>
>> >>>
>> >>>
>> >>> -- init scripts
>> >>>
>> >>> I am also coming across standardization issues on init scripts. Like
>> everything else, no one can agree on anything. Debian uses
>> "start-stop-daemon” and RHEL uses “daemon”. FreeBSD? No idea. The
>> check_mailscanner script that checks to see if MailScanner is running and
>> then starts it if it is not running uses MailScanner’s internal method of
>> starting a daemon that is portable across all platforms. This is already in
>> use on all packages on every OS. Very basic and very effective:
>> >>>
>> >>> /usr/sbin/MailScanner /etc/MailScanner/MailScanner.conf
>> >>>
>> >>> This starts the daemon using all of the settings from
>> MailScanner.conf like “Run As User” and “PID File”. Life is easy and, more
>> importantly, consistent.
>> >>>
>> >>> So unless someone has a VERY compelling reason for me to continue to
>> try and Frankenstein a single init script to work on all platforms using
>> the native methods, I am going to use the native MailScanner methods which
>> will be a hell of a lot more predictable and consistent across all
>> platforms.
>> >>>
>> >>>
>> >>> -- who’s on first?
>> >>>
>> >>> Name every MailScanner executable. You probably can’t, because I
>> can’t. So all of the executables (except the primary /usr/sbin/mailscanner)
>> will now be like this:
>> >>>
>> >>> ms-check
>> >>> ms-create-locks
>> >>> ms-peek
>> >>> ms-sa-cache
>> >>>
>> >>> and so on …
>> >>>
>> >>> If you want to know all of the MailScanner commands, type “ms-“ and
>> hit tab and they all magically appear. Imagine that. Note that I do not
>> care how compelling a reason you have not to do this. I am doing it. Deal.
>> >>>
>> >>>
>> >>> -- cron jobs
>> >>>
>> >>> There are a bunch of different cron jobs depending on what package
>> you are using. Again, I am calling bullshit. One cron job in
>> /etc/cron.hourly and one in /etc/cron.daily that each point to a single
>> file in /usr/sbin. The file will read your cron options from
>> /etc/MailScanner/defaults and will be called like this:
>> >>>
>> >>> /usr/sbin/ms-cron hourly
>> >>> /usr/sbin/ms-cron daily
>> >>>
>> >>> “hourly” runs your hourly cron jobs and “daily” runs your daily cron
>> jobs. NIXs that have /etc/cron.hourly/ and /etc/cron.daily/ will have the
>> appropriate scripts to fire the cron jobs placed in those directories. NIXs
>> that don’t simply add the ms-cron commands to your crontab.
>> >>>
>> >>>
>> >>>
>> >>> Feel free to comment, but keep in mind MailScanner needs to be
>> standardized. This will make development, bug tracking, packaging, and just
>> about everything else a hell of a lot more manageable and cross-platform
>> friendly.
>> >>>
>> >>>
>> >>> -
>> >>> Jerry Benton
>> >>> www.mailborder.com
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > MailScanner mailing list
>> > mailscanner at lists.mailscanner.info
>> > http://lists.mailscanner.info/listinfo/mailscanner
>> >
>>
>>
>>
>> --
>> MailScanner mailing list
>> mailscanner at lists.mailscanner.info
>> http://lists.mailscanner.info/listinfo/mailscanner
>>
>>
>
>
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info
> http://lists.mailscanner.info/listinfo/mailscanner
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailscanner.info/pipermail/mailscanner/attachments/20160427/1a0019e2/attachment.html>
More information about the MailScanner
mailing list