Loading ...
Sorry, an error occurred while loading the content.

(Debian) startup script?

Expand Messages
  • Nick
    Hi! After many years away from doing any kind of (mail) server administration, I have been called into duty again... (-; As I always did I installed everything
    Message 1 of 20 , Jun 22, 2014
    • 0 Attachment
      Hi!

      After many years away from doing any kind of (mail) server
      administration, I have been called into duty again... (-;

      As I always did I installed everything from source and if I start
      Postfix manually everything works great...

      Thing is, I don't want to start things manually every time the server is
      rebooted...

      I *think* there used to be a SYSV style init.d script distributed with
      Postfix and I thought postfix-script looked like the thing but it
      doesn't seem to be...

      This Postfix install is on a VPS which is based on Debian Wheezy AFAIK...

      Could somebody please tell me what script I should use, what am I doing
      wrong?

      (and no, telling me to use a package is not an answer, once it's started
      the Postfix I compiled from source works perfectly, I only need to be
      able to get it to start automatically)

      Thank you and have a nice day!

      Nick
    • lists@rhsoft.net
      ... well, you could build a package at your own or just take the init-script from the debian packages, no idea why people bypass the package management and
      Message 2 of 20 , Jun 22, 2014
      • 0 Attachment
        Am 22.06.2014 23:47, schrieb Nick:
        > After many years away from doing any kind of (mail) server administration, I have been called into duty again... (-;
        >
        > As I always did I installed everything from source and if I start Postfix manually everything works great...
        >
        > Thing is, I don't want to start things manually every time the server is rebooted...
        >
        > I *think* there used to be a SYSV style init.d script distributed with Postfix and I thought postfix-script looked
        > like the thing but it doesn't seem to be...
        >
        > This Postfix install is on a VPS which is based on Debian Wheezy AFAIK...
        >
        > Could somebody please tell me what script I should use, what am I doing wrong?
        >
        > (and no, telling me to use a package is not an answer, once it's started the Postfix I compiled from source works
        > perfectly, I only need to be able to get it to start automatically)

        well, you could build a package at your own or just take the
        init-script from the debian packages, no idea why people
        bypass the package management and then seek for help

        however postfix is simply stopped and started by calling it's binary

        so the init-script is simple

        thats what systemd is calling:
        ExecStart=/usr/sbin/postfix -c /etc/postfix start
        ExecStop=/usr/sbin/postfix -c /etc/postfix stop
        ExecReload=/usr/sbin/postfix -c /etc/postfix reload

        that's what Redhat ist using :

        [root@localhost:~]$ cat /etc/init.d/postfix
        #!/bin/bash
        #
        # postfix Postfix Mail Transfer Agent
        #
        # chkconfig: 2345 80 30
        # description: Postfix is a Mail Transport Agent, which is the program \
        # that moves mail from one machine to another.
        # processname: master
        # pidfile: /var/spool/postfix/pid/master.pid
        # config: /etc/postfix/main.cf
        # config: /etc/postfix/master.cf
        #
        # Based on startup script from Simon J Mudd <sjmudd@...>
        # 25/02/99: Mostly s/sendmail/postfix/g by John A. Martin <jam@...>
        # 23/11/00: Changes & suggestions by Ajay Ramaswamy <ajayr@...>
        # 20/01/01: Changes to fall in line with RedHat 7.0 style
        # 23/02/01: Fix a few untidy problems with help from Daniel Roesen.

        ### BEGIN INIT INFO
        # Provides: postfix MTA
        # Required-Start: $local_fs $network $remote_fs
        # Required-Stop: $local_fs $network $remote_fs
        # Default-Start: 2 3 4 5
        # Default-Stop: 0 1 6
        # Short-Description: start and stop postfix
        # Description: Postfix is a Mail Transport Agent, which is the program that
        # moves mail from one machine to another.
        ### END INIT INFO

        # Source function library.
        . /etc/rc.d/init.d/functions

        # Source networking configuration.
        . /etc/sysconfig/network

        RETVAL=0
        prog="postfix"
        lockfile=/var/lock/subsys/$prog

        pidfile=/var/spool/postfix/pid/master.pid



        ALIASESDB_STAMP=/var/lib/misc/postfix.aliasesdb-stamp



        # Script to update chroot environment

        CHROOT_UPDATE=/etc/postfix/chroot-update



        status -p $pidfile -l $(basename $lockfile) -b /usr/libexec/postfix/master master >/dev/null 2>&1

        running=$?

        conf_check() {
        [ -x /usr/sbin/postfix ] || exit 5
        [ -d /etc/postfix ] || exit 6
        [ -d /var/spool/postfix ] || exit 5
        }

        make_aliasesdb() {
        if [ "$(/usr/sbin/postconf -h alias_database)" == "hash:/etc/aliases" ]
        then
        # /etc/aliases.db may be used by other MTA, make sure nothing
        # has touched it since our last newaliases call
        [ /etc/aliases -nt /etc/aliases.db ] ||
        [ "$ALIASESDB_STAMP" -nt /etc/aliases.db ] ||
        [ "$ALIASESDB_STAMP" -ot /etc/aliases.db ] || return
        /usr/bin/newaliases
        touch -r /etc/aliases.db "$ALIASESDB_STAMP"
        else
        /usr/bin/newaliases
        fi
        }

        start() {
        [ "$EUID" != "0" ] && exit 4
        # Check that networking is up.
        [ ${NETWORKING} = "no" ] && exit 1
        conf_check
        # Start daemons.
        echo -n $"Starting postfix: "
        make_aliasesdb >/dev/null 2>&1
        [ -x $CHROOT_UPDATE ] && $CHROOT_UPDATE
        /usr/sbin/postfix start 2>/dev/null 1>&2 && success || failure $"$prog start"
        RETVAL=$?
        [ $RETVAL -eq 0 ] && touch $lockfile
        echo
        return $RETVAL
        }

        stop() {
        [ "$EUID" != "0" ] && exit 4
        conf_check
        # Stop daemons.
        echo -n $"Shutting down postfix: "
        /usr/sbin/postfix stop 2>/dev/null 1>&2 && success || failure $"$prog stop"
        RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile
        echo
        return $RETVAL
        }

        reload() {
        conf_check
        echo -n $"Reloading postfix: "
        [ -x $CHROOT_UPDATE ] && $CHROOT_UPDATE
        /usr/sbin/postfix reload 2>/dev/null 1>&2 && success || failure $"$prog reload"
        RETVAL=$?
        echo
        return $RETVAL
        }

        abort() {
        conf_check
        /usr/sbin/postfix abort 2>/dev/null 1>&2 && success || failure $"$prog abort"
        return $?
        }

        flush() {
        conf_check
        /usr/sbin/postfix flush 2>/dev/null 1>&2 && success || failure $"$prog flush"
        return $?
        }

        check() {
        conf_check
        /usr/sbin/postfix check 2>/dev/null 1>&2 && success || failure $"$prog check"
        return $?
        }

        # See how we were called.
        case "$1" in
        start)
        [ $running -eq 0 ] && exit 0
        start
        ;;
        stop)
        [ $running -eq 0 ] || exit 0
        stop
        ;;
        restart|force-reload)
        stop
        start
        ;;
        reload)
        [ $running -eq 0 ] || exit 7
        reload
        ;;
        abort)
        abort
        ;;
        flush)
        flush
        ;;
        check)
        check
        ;;
        status)
        status -p $pidfile -l $(basename $lockfile) -b /usr/libexec/postfix/master master
        ;;
        condrestart)
        [ $running -eq 0 ] || exit 0
        stop
        start
        ;;
        *)
        echo $"Usage: $0 {start|stop|restart|reload|abort|flush|check|status|condrestart}"
        exit 2
        esac

        exit $?
      • deoren
        ... Not sure if there is an official init script, but you could always just extract the package contents to get at the init script that Debian provides.
        Message 3 of 20 , Jun 22, 2014
        • 0 Attachment
          > Could somebody please tell me what script I should use, what am I doing wrong?

          Not sure if there is an official init script, but
          you could always just extract the package contents to get at the init script that Debian provides.
        • Wietse Venema
          ... All you need is something that invokes postfix start , whether it hooks into systemd, upstart, sysv initscripts, or something else. Wietse
          Message 4 of 20 , Jun 22, 2014
          • 0 Attachment
            Nick:
            > Hi!
            >
            > After many years away from doing any kind of (mail) server
            > administration, I have been called into duty again... (-;
            >
            > As I always did I installed everything from source and if I start
            > Postfix manually everything works great...
            >
            > Thing is, I don't want to start things manually every time the server is
            > rebooted...

            All you need is something that invokes "postfix start", whether it
            hooks into systemd, upstart, sysv initscripts, or something else.

            Wietse
          • Matthew McGehrin
            Personally, I prefer using chkconfig, as I m more comfortable with that method. # apt-get install chkconfig # chkconfig --list # chkconfig exim4 --off #
            Message 5 of 20 , Jun 22, 2014
            • 0 Attachment
              Personally,

              I prefer using chkconfig, as I'm more comfortable with that method.

              # apt-get install chkconfig

              # chkconfig --list

              # chkconfig exim4 --off

              # chkconfig postfix --on

              The official method is to use update-rc.d

              See:
              http://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian

              -- Matthew

              Nick wrote:
              > Hi!
              >
              > After many years away from doing any kind of (mail) server
              > administration, I have been called into duty again... (-;
              >
              > As I always did I installed everything from source and if I start
              > Postfix manually everything works great...
              >
              > Thing is, I don't want to start things manually every time the server
              > is rebooted...
              >
              > I *think* there used to be a SYSV style init.d script distributed with
              > Postfix and I thought postfix-script looked like the thing but it
              > doesn't seem to be...
              >
              > This Postfix install is on a VPS which is based on Debian Wheezy AFAIK...
              >
            • Edgar Pettijohn
              Recently I became unable to send messages using Thunderbird, but I could with Mutt (imap). I finally found the culprit and just wanted to share if it was
              Message 6 of 20 , Jun 22, 2014
              • 0 Attachment
                Recently I became unable to send messages using Thunderbird, but I could
                with Mutt (imap). I finally found the culprit and just wanted to share
                if it was affecting anyone else. The changes to main.cf were as follows:

                - smtpd_recipient_restrictions = permit_mynetworks
                permit_sasl_authenticated reject_unauth_destination

                + smtpd_recipient_restrictions = permit_mynetworks,
                permit_sasl_authenticated, reject_unauth_destination
              • Viktor Dukhovni
                ... These differ only in the use of commas, which are equivalent to whitespace in this context, i.e. they may aid readability but are entirely optional. This
                Message 7 of 20 , Jun 22, 2014
                • 0 Attachment
                  On Mon, Jun 23, 2014 at 12:04:57AM -0500, Edgar Pettijohn wrote:

                  > Recently I became unable to send messages using Thunderbird, but I could
                  > with Mutt (imap). I finally found the culprit and just wanted to share
                  > if it was affecting anyone else. The changes to main.cf were as follows:
                  >
                  > - smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
                  > + smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

                  These differ only in the use of commas, which are equivalent to
                  whitespace in this context, i.e. they may aid readability but are
                  entirely optional. This change makes NO difference. You changed
                  something else that really solved the problem.

                  --
                  Viktor.
                • D'Arcy J.M. Cain
                  On Mon, 23 Jun 2014 05:50:54 +0000 ... The OP didn t really give enough context but he also changed the order of the two lines. -- D Arcy J.M. Cain System
                  Message 8 of 20 , Jun 22, 2014
                  • 0 Attachment
                    On Mon, 23 Jun 2014 05:50:54 +0000
                    Viktor Dukhovni <postfix-users@...> wrote:

                    > On Mon, Jun 23, 2014 at 12:04:57AM -0500, Edgar Pettijohn wrote:
                    > > - smtpd_recipient_restrictions = permit_mynetworks
                    > > permit_sasl_authenticated reject_unauth_destination
                    > > + smtpd_recipient_restrictions = permit_mynetworks,
                    > > permit_sasl_authenticated, reject_unauth_destination
                    >
                    > These differ only in the use of commas, which are equivalent to
                    > whitespace in this context, i.e. they may aid readability but are
                    > entirely optional. This change makes NO difference. You changed
                    > something else that really solved the problem.

                    The OP didn't really give enough context but he also changed
                    the order of the two lines.

                    --
                    D'Arcy J.M. Cain
                    System Administrator, Vex.Net
                    http://www.Vex.Net/ IM:darcy@...
                    VoIP: sip:darcy@...
                  • Edgar Pettijohn
                    ... I was aware that there should be no diff between , and , but I had tried everything I could think of. I didn t write down the error Thunderbird was
                    Message 9 of 20 , Jun 23, 2014
                    • 0 Attachment
                      On 06/23/2014 01:27 AM, D'Arcy J.M. Cain wrote:
                      > On Mon, 23 Jun 2014 05:50:54 +0000
                      > Viktor Dukhovni <postfix-users@...> wrote:
                      >
                      >> On Mon, Jun 23, 2014 at 12:04:57AM -0500, Edgar Pettijohn wrote:
                      >>> - smtpd_recipient_restrictions = permit_mynetworks
                      >>> permit_sasl_authenticated reject_unauth_destination
                      >>> + smtpd_recipient_restrictions = permit_mynetworks,
                      >>> permit_sasl_authenticated, reject_unauth_destination
                      >> These differ only in the use of commas, which are equivalent to
                      >> whitespace in this context, i.e. they may aid readability but are
                      >> entirely optional. This change makes NO difference. You changed
                      >> something else that really solved the problem.
                      > The OP didn't really give enough context but he also changed
                      > the order of the two lines.
                      >
                      I was aware that there should be no diff between "," and " ", but I had
                      tried everything I could think of. I didn't write down the error
                      Thunderbird was giving me, but it made me believe it was either sasl
                      related or a smtpd_recipient_restriction related error. When I get a
                      chance tonight I'll see if changing it back reproduces the error. I use
                      LinuxMint for my laptop and I recall Thunderbird was updated recently.
                      I was originally running Postfix 2-11 on Freebsd 10. I completely
                      reinstalled everything and opted to fallback to postfix 2-9 just to see
                      if that would change anything, but it didn't.
                    • lists@rhsoft.net
                      ... in any case: screenshot ... it s frustrating enough that users complain with reports said something similar to but if one controls the server and the
                      Message 10 of 20 , Jun 23, 2014
                      • 0 Attachment
                        Am 23.06.2014 13:27, schrieb Edgar Pettijohn:
                        > On 06/23/2014 01:27 AM, D'Arcy J.M. Cain wrote:
                        >> On Mon, 23 Jun 2014 05:50:54 +0000
                        >> Viktor Dukhovni <postfix-users@...> wrote:
                        >>
                        >>> On Mon, Jun 23, 2014 at 12:04:57AM -0500, Edgar Pettijohn wrote:
                        >>>> - smtpd_recipient_restrictions = permit_mynetworks
                        >>>> permit_sasl_authenticated reject_unauth_destination
                        >>>> + smtpd_recipient_restrictions = permit_mynetworks,
                        >>>> permit_sasl_authenticated, reject_unauth_destination
                        >>> These differ only in the use of commas, which are equivalent to
                        >>> whitespace in this context, i.e. they may aid readability but are
                        >>> entirely optional. This change makes NO difference. You changed
                        >>> something else that really solved the problem.
                        >> The OP didn't really give enough context but he also changed
                        >> the order of the two lines.
                        >>
                        > I was aware that there should be no diff between "," and " ", but I had
                        > tried everything I could think of. I didn't write down the error
                        > Thunderbird was giving me

                        in any case: screenshot

                        > but it made me believe

                        it's frustrating enough that users complain with reports
                        "said something similar to" but if one controls the server
                        and the client i don't get why not take a screenshot and
                        look at the serverlog from the same moment instead "believe"

                        the change you posted changes nothing and is misleading for
                        anybody who finds that thread later - if it is SASl related
                        than the logs would have been clear

                        however, a subject "thunderbird" makes no sense
                      • lists@rhsoft.net
                        ... where do you see any changed order in that two lines?
                        Message 11 of 20 , Jun 23, 2014
                        • 0 Attachment
                          Am 23.06.2014 08:27, schrieb D'Arcy J.M. Cain:
                          > On Mon, 23 Jun 2014 05:50:54 +0000
                          > Viktor Dukhovni <postfix-users@...> wrote:
                          >
                          >> On Mon, Jun 23, 2014 at 12:04:57AM -0500, Edgar Pettijohn wrote:
                          >>> - smtpd_recipient_restrictions = permit_mynetworks
                          >>> permit_sasl_authenticated reject_unauth_destination
                          >>> + smtpd_recipient_restrictions = permit_mynetworks,
                          >>> permit_sasl_authenticated, reject_unauth_destination
                          >>
                          >> These differ only in the use of commas, which are equivalent to
                          >> whitespace in this context, i.e. they may aid readability but are
                          >> entirely optional. This change makes NO difference. You changed
                          >> something else that really solved the problem.
                          >
                          > The OP didn't really give enough context but he also changed
                          > the order of the two lines

                          where do you see any changed order in that two lines?
                        • Wahix India
                          remove Warm Regards, *Dhiraj Kumar* Team Wahix India ... M : 0091-900-4642799 / 0091-889-8814406 E : info@wahix.com | W : www.wahix.com ... *The sky is never
                          Message 12 of 20 , Jun 23, 2014
                          • 0 Attachment
                            remove



                            Warm Regards,

                            Dhiraj Kumar
                            Team Wahix India


                            M : 0091-900-4642799 / 0091-889-8814406
                            E  : info@...
                             | W : www.wahix.com


                            The sky is never too high to touch, if we scale it together

                            This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.

                            Preserve Trees - Do not print this mail unless necessary!




                            On Mon, Jun 23, 2014 at 5:16 PM, lists@... <lists@...> wrote:


                            Am 23.06.2014 13:27, schrieb Edgar Pettijohn:
                            > On 06/23/2014 01:27 AM, D'Arcy J.M. Cain wrote:
                            >> On Mon, 23 Jun 2014 05:50:54 +0000
                            >> Viktor Dukhovni <postfix-users@...> wrote:
                            >>
                            >>> On Mon, Jun 23, 2014 at 12:04:57AM -0500, Edgar Pettijohn wrote:
                            >>>> - smtpd_recipient_restrictions = permit_mynetworks
                            >>>> permit_sasl_authenticated reject_unauth_destination
                            >>>> + smtpd_recipient_restrictions = permit_mynetworks,
                            >>>> permit_sasl_authenticated, reject_unauth_destination
                            >>> These differ only in the use of commas, which are equivalent to
                            >>> whitespace in this context, i.e. they may aid readability but are
                            >>> entirely optional.  This change makes NO difference.  You changed
                            >>> something else that really solved the problem.
                            >> The OP didn't really give enough context but he also changed
                            >> the order of the two lines.
                            >>
                            > I was aware that there should be no diff between "," and " ", but I had
                            > tried everything I could think of.  I didn't write down the error
                            > Thunderbird was giving me

                            in any case: screenshot

                            > but it made me believe

                            it's frustrating enough that users complain with reports
                            "said something similar to" but if one controls the server
                            and the client i don't get why not take a screenshot and
                            look at the serverlog from the same moment instead "believe"

                            the change you posted changes nothing and is misleading for
                            anybody who finds that thread later - if it is SASl related
                            than the logs would have been clear

                            however, a subject "thunderbird" makes no sense



                          • D'Arcy J.M. Cain
                            On Mon, 23 Jun 2014 13:49:09 +0200 ... My mistake. I am so used to unified diffs that I misread the OP. It looked like this to me. @@ -1,4 +1,4 @@ line 1
                            Message 13 of 20 , Jun 23, 2014
                            • 0 Attachment
                              On Mon, 23 Jun 2014 13:49:09 +0200
                              "lists@..." <lists@...> wrote:
                              > where do you see any changed order in that two lines?

                              My mistake. I am so used to unified diffs that I misread the OP. It
                              looked like this to me.

                              @@ -1,4 +1,4 @@
                              line 1
                              -line 2
                              line 3
                              +line 2
                              line 4

                              --
                              D'Arcy J.M. Cain
                              System Administrator, Vex.Net
                              http://www.Vex.Net/ IM:darcy@...
                              VoIP: sip:darcy@...
                            • Viktor Dukhovni
                              ... Now you re talking. Postfix 2.10 (and thus also 2.11) introduces smtpd_relay_restrictions. Downgrading to 2.9 works around the missing
                              Message 14 of 20 , Jun 23, 2014
                              • 0 Attachment
                                On Mon, Jun 23, 2014 at 06:27:36AM -0500, Edgar Pettijohn wrote:

                                > I was aware that there should be no diff between "," and " ", but I had
                                > tried everything I could think of. I didn't write down the error
                                > Thunderbird was giving me, but it made me believe it was either sasl
                                > related or a smtpd_recipient_restriction related error. When I get a
                                > chance tonight I'll see if changing it back reproduces the error. I use
                                > LinuxMint for my laptop and I recall Thunderbird was updated recently.
                                > I was originally running Postfix 2-11 on Freebsd 10. I completely
                                > reinstalled everything and opted to fallback to postfix 2-9 just to see
                                > if that would change anything, but it didn't.

                                Now you're talking. Postfix 2.10 (and thus also 2.11) introduces
                                smtpd_relay_restrictions. Downgrading to 2.9 works around the
                                missing backwards-compatible "smtpd_relay_restrictions =" empty
                                setting.

                                --
                                Viktor.
                              • Edgar Pettijohn
                                For 2-11 I had smtp_relay with same issue then gave up did complete reinstall with 2-9 with correct change to smtp_recipient_restrictions and same issue from
                                Message 15 of 20 , Jun 23, 2014
                                • 0 Attachment
                                  For 2-11 I had smtp_relay with same issue then gave up did complete reinstall with 2-9 with correct change to smtp_recipient_restrictions and same issue from thunderbird but not mutt. I then commented out the restrictions, reloaded postfix and everything worked. I then added the commas and uncommented the line and reloaded postfix.

                                  Sent from my iPhone

                                  > On Jun 23, 2014, at 9:00 AM, "Viktor Dukhovni" <postfix-users@...> wrote:
                                  >
                                  >> On Mon, Jun 23, 2014 at 06:27:36AM -0500, Edgar Pettijohn wrote:
                                  >>
                                  >> I was aware that there should be no diff between "," and " ", but I had
                                  >> tried everything I could think of. I didn't write down the error
                                  >> Thunderbird was giving me, but it made me believe it was either sasl
                                  >> related or a smtpd_recipient_restriction related error. When I get a
                                  >> chance tonight I'll see if changing it back reproduces the error. I use
                                  >> LinuxMint for my laptop and I recall Thunderbird was updated recently.
                                  >> I was originally running Postfix 2-11 on Freebsd 10. I completely
                                  >> reinstalled everything and opted to fallback to postfix 2-9 just to see
                                  >> if that would change anything, but it didn't.
                                  >
                                  > Now you're talking. Postfix 2.10 (and thus also 2.11) introduces
                                  > smtpd_relay_restrictions. Downgrading to 2.9 works around the
                                  > missing backwards-compatible "smtpd_relay_restrictions =" empty
                                  > setting.
                                  >
                                  > --
                                  > Viktor.
                                • Nick
                                  Sorry for the delayed reply, I was on vacation... Hi! ... Thank you Mr Venema, that s essentially what I did... I took the simplest of those SYSV init
                                  Message 16 of 20 , Jun 30, 2014
                                  • 0 Attachment
                                    Sorry for the delayed reply, I was on vacation...

                                    Hi!

                                    On 2014-06-22 7:04 PM, Wietse Venema wrote:
                                    > Nick:
                                    > All you need is something that invokes "postfix start", whether it
                                    > hooks into systemd, upstart, sysv initscripts, or something else.
                                    >
                                    > Wietse
                                    >

                                    Thank you Mr Venema, that's essentially what I did...

                                    I took the simplest of those SYSV init scritpts, cleaned it a little and
                                    used it as a very simple wrapper to call "postfix".

                                    Thank you very much for that absolutely great program!

                                    Have a nice day!

                                    Nick
                                  • Nick
                                    ... I tried to but I end up with a script makes non-existing calls to quiet-start and the like, maybe they hacked the source code to handle them but since I
                                    Message 17 of 20 , Jun 30, 2014
                                    • 0 Attachment
                                      On 2014-06-22 5:55 PM, lists@... wrote:
                                      > well, you could build a package at your own or just take the
                                      > init-script from the debian packages, no idea why people

                                      I tried to but I end up with a script makes non-existing calls to
                                      "quiet-start" and the like, maybe they hacked the source code to handle
                                      them but since I am using relatively stock Postfix I don't have
                                      that/those patches in...

                                      > bypass the package management and then seek for help

                                      Because I am a programmer and I have done tweaks to Postfix in the past
                                      by modifying the source code, that's why...

                                      Postfix is one of the programs I usually always compile instead of using
                                      a package because of that...

                                      Mind you, I did actually give this kind of speech to somebody in the
                                      past while wearing another hat... (-;


                                      > however postfix is simply stopped and started by calling it's binary
                                      >
                                      > so the init-script is simple
                                      >
                                      > thats what systemd is calling:
                                      > ExecStart=/usr/sbin/postfix -c /etc/postfix start
                                      > ExecStop=/usr/sbin/postfix -c /etc/postfix stop
                                      > ExecReload=/usr/sbin/postfix -c /etc/postfix reload

                                      <snip>

                                      Thank you!

                                      Have a nice day,

                                      Nick
                                    • Nick
                                      Sorry for the delayed reply, I was on vacation... Hi! ... Thank you, I had tried that, I ended up with a script that expected to be able to call quiet-start
                                      Message 18 of 20 , Jun 30, 2014
                                      • 0 Attachment
                                        Sorry for the delayed reply, I was on vacation...

                                        Hi!

                                        On 2014-06-22 5:59 PM, deoren wrote:
                                        > > Could somebody please tell me what script I should use, what am I
                                        > doing wrong?
                                        >
                                        > Not sure if there is an official init script, but
                                        > you could always just extract the package contents to get at the init
                                        > script that Debian provides.

                                        Thank you, I had tried that, I ended up with a script that expected to
                                        be able to call "quiet-start" and things like that...

                                        On 2014-06-22 7:25 PM, Matthew McGehrin wrote:> Personally,
                                        >
                                        > I prefer using chkconfig, as I'm more comfortable with that method.
                                        >
                                        > # apt-get install chkconfig
                                        >
                                        > # chkconfig --list
                                        >
                                        > # chkconfig exim4 --off
                                        >
                                        > # chkconfig postfix --on
                                        >
                                        > The official method is to use update-rc.d
                                        >
                                        > See:
                                        >
                                        http://www.debian-administration.org/article/28/Making_scripts_run_at_boot_time_with_Debian

                                        >

                                        Thank you!

                                        Have a nice day!

                                        Nick
                                      • lists@rhsoft.net
                                        ... modify the script you need nothing more as the start/restart/stop functions frankly do you understand how init-scripts are working? they are called with
                                        Message 19 of 20 , Jun 30, 2014
                                        • 0 Attachment
                                          Am 30.06.2014 16:47, schrieb Nick:
                                          > On 2014-06-22 5:55 PM, lists@... wrote:
                                          >> well, you could build a package at your own or just take the
                                          >> init-script from the debian packages, no idea why people
                                          >
                                          > I tried to but I end up with a script makes non-existing calls to "quiet-start" and the like, maybe they hacked the
                                          > source code to handle them but since I am using relatively stock Postfix I don't have that/those patches in...

                                          modify the script
                                          you need nothing more as the start/restart/stop functions

                                          frankly do you understand how init-scripts are working?
                                          they are called with start/stop/restart as param and
                                          contain functions wich are called depending on $1

                                          >> bypass the package management and then seek for help
                                          >
                                          > Because I am a programmer and I have done tweaks to Postfix in
                                          > the past by modifying the source code, that's why...

                                          one reason more to use packages
                                          guess what with the patches below happens

                                          * raise the version in the SPEC
                                          * put the upstream tarball in the SOURCES folder
                                          * build the new RPM
                                          * rpmbuld unpacks the tarball, applies the patches and build the packages

                                          [builduser@buildserver64:~]$ cat /rpmbuild/SPECS/httpd.spec | grep patch
                                          Patch1: %{name}-2.4.1-apctl.patch
                                          Patch2: %{name}-2.4.1-deplibs.patch
                                          Patch3: %{name}-2.4.3-layout.patch
                                          Patch4: %{name}-2.4.4-export.patch
                                          Patch5: %{name}-2.4-no-server-header.patch
                                          %patch1 -p1
                                          %patch2 -p1
                                          %patch3 -p1
                                          %patch4 -p1
                                          %patch5 -p1

                                          > Postfix is one of the programs I usually always compile instead of using a package because of that...

                                          me too - but that's not a reason to bypass the package management
                                          typically one starts with the distribution packages, applies hies
                                          changes and continues to mainten them

                                          > Mind you, I did actually give this kind of speech to somebody in the past while wearing another hat... (-;

                                          i practice what i preach, guess what the .rh in the package versions below means
                                          what can't build as package can't be safe deployed and don't exist for me

                                          [harry@srv-rhsoft:~]$ /bin/ls -1 /fileserver/yum-repo/fc20/x86_64/ | grep rpm | sort
                                          aespipe-2.4c-5.fc20.20140625.rh.x86_64.rpm
                                          apr-1.5.1-2.fc20.20140518.rh.x86_64.rpm
                                          apr-devel-1.5.1-2.fc20.20140518.rh.x86_64.rpm
                                          apr-util-1.5.3-3.fc20.20140518.rh.x86_64.rpm
                                          apr-util-devel-1.5.3-3.fc20.20140518.rh.x86_64.rpm
                                          apr-util-mysql-1.5.3-3.fc20.20140518.rh.x86_64.rpm
                                          apr-util-nss-1.5.3-3.fc20.20140518.rh.x86_64.rpm
                                          apr-util-openssl-1.5.3-3.fc20.20140518.rh.x86_64.rpm
                                          arp-scan-1.8.4-1.fc20.20131231.rh.x86_64.rpm
                                          cantata-1.3.4-2.fc20.20140625.rh.x86_64.rpm
                                          dbmail-3.1.15-2.fc20.20140615.rh.8a042214ae1d120581740020f4e73c3cf8d3a6c0.x86_64.rpm
                                          dbmail-manpages-3.1.15-2.fc20.20140615.rh.8a042214ae1d120581740020f4e73c3cf8d3a6c0.x86_64.rpm
                                          dbmail-tools-3.1.15-2.fc20.20140615.rh.8a042214ae1d120581740020f4e73c3cf8d3a6c0.x86_64.rpm
                                          dovecot-2.2.13-3.fc20.20140518.rh.x86_64.rpm
                                          ffmpeg-devel-2.1.5-4.fc20.20140625.rh.x86_64.rpm
                                          ffmpeg-latest-2.2.4-4.fc20.20140625.rh.x86_64.rpm
                                          ffmpeg-latest-manpages-2.2.4-4.fc20.20140624.rh.noarch.rpm
                                          ffmpeg-libs-2.1.5-4.fc20.20140625.rh.x86_64.rpm
                                          fsync-tester-1.0-1.fc20.20131223.rh.x86_64.rpm
                                          GeoIP-1.6.0-1.fc20.20131231.rh.x86_64.rpm
                                          GeoIP-devel-1.6.0-1.fc20.20131231.rh.x86_64.rpm
                                          gmime-2.6.20-3.fc20.20140518.rh.x86_64.rpm
                                          gmime-devel-2.6.20-3.fc20.20140518.rh.x86_64.rpm
                                          hostapd-2.2-2.fc20.20140625.rh.x86_64.rpm
                                          httpd-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          httpd-devel-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          httpd-extras-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          httpd-extras-auth-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          httpd-manual-2.4.9-4.fc20.20140518.rh.noarch.rpm
                                          httpd-tools-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          hylafax-5.5.4-3.fc20.20131231.rh.x86_64.rpm
                                          iat-0.1.7-16.fc20.20140625.rh.x86_64.rpm
                                          iaxmodem-1.2.0-9.fc20.20131231.rh.x86_64.rpm
                                          jpegoptim-1.4.1-1.fc20.x86_64.rpm
                                          lame-3.99.5-4.fc20.20140518.rh.x86_64.rpm
                                          lame-devel-3.99.5-4.fc20.20140518.rh.x86_64.rpm
                                          lame-libs-3.99.5-4.fc20.20140518.rh.x86_64.rpm
                                          libdvdcss-1.2.13-7.fc20.x86_64.rpm
                                          libdvdcss2-1.2.13-7.fc20.x86_64.rpm
                                          libevent-2.0.21-5.fc20.20140518.rh.x86_64.rpm
                                          libevent-devel-2.0.21-5.fc20.20140518.rh.x86_64.rpm
                                          libmpdclient-2.9-2.fc20.20140625.rh.x86_64.rpm
                                          libmpdclient-devel-2.9-2.fc20.20140625.rh.x86_64.rpm
                                          libnss-mysql-1.5-20.fc20.20131231.rh.x86_64.rpm
                                          libvpx-1.3.0-5.fc20.20140127.rh.x86_64.rpm
                                          libvpx-devel-1.3.0-5.fc20.20140127.rh.x86_64.rpm
                                          libvpx-utils-1.3.0-5.fc20.20140127.rh.x86_64.rpm
                                          libzdb-3.0-5.fc20.20140518.rh.x86_64.rpm
                                          libzdb-devel-3.0-5.fc20.20140518.rh.x86_64.rpm
                                          lzo-2.08-5.fc20.20140629.rh.x86_64.rpm
                                          lzo-devel-2.08-5.fc20.20140629.rh.x86_64.rpm
                                          lzo-minilzo-2.08-5.fc20.20140629.rh.x86_64.rpm
                                          mariadb-5.5.38-2.fc20.20140609.rh.x86_64.rpm
                                          mariadb-devel-5.5.38-2.fc20.20140609.rh.x86_64.rpm
                                          mariadb-libs-5.5.38-2.fc20.20140609.rh.x86_64.rpm
                                          mariadb-manpages-5.5.38-2.fc20.20140609.rh.x86_64.rpm
                                          mariadb-server-5.5.38-2.fc20.20140609.rh.x86_64.rpm
                                          mariadb-test-5.5.38-2.fc20.20140609.rh.x86_64.rpm
                                          minizip-1.2.8-3.fc20.20131231.rh.x86_64.rpm
                                          minizip-devel-1.2.8-3.fc20.20131231.rh.x86_64.rpm
                                          mod_dav_svn-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          mod_h264_streaming-2.2.7-20.fc20.20140518.rh.x86_64.rpm
                                          mod_mime_magic-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          mod_proxy_html-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          mod_security-2.8.0-3.fc20.20140518.rh.x86_64.rpm
                                          mod_ssl-2.4.9-4.fc20.20140518.rh.x86_64.rpm
                                          mp3info-0.8.5a-20.fc20.20140625.rh.x86_64.rpm
                                          mpc-0.26-2.fc20.20140625.rh.x86_64.rpm
                                          mpd-0.17.6-1.fc20.20140625.rh.x86_64.rpm
                                          mpdscribble-0.22-7.fc20.20140625.rh.x86_64.rpm
                                          msttcorefonts-2.0-6.fc20.20131221.rh.noarch.rpm
                                          mysqltuner-1.2.0-10.20110306git.fc20.20140105.rh.noarch.rpm
                                          netatalk-3.0.8-1.fc20.20140620.rh.x86_64.rpm
                                          netatalk-devel-3.0.8-1.fc20.20140620.rh.x86_64.rpm
                                          netatalk-manpages-3.0.8-1.fc20.20140620.rh.x86_64.rpm
                                          openssl-1.0.1e-38.fc20.20140605.rh.x86_64.rpm
                                          openssl-devel-1.0.1e-38.fc20.20140605.rh.x86_64.rpm
                                          openssl-libs-1.0.1e-38.fc20.20140605.rh.x86_64.rpm
                                          openssl-perl-1.0.1e-38.fc20.20140605.rh.x86_64.rpm
                                          openssl-static-1.0.1e-38.fc20.20140605.rh.x86_64.rpm
                                          open-vm-tools-9.4.0.1280544-8.fc20.20131231.rh.x86_64.rpm
                                          openvpn-2.3.2-16.fc20.20131231.rh.x86_64.rpm
                                          perl-Class-Std-Fast-0.0.8-13.fc20.20131231.rh.noarch.rpm
                                          perl-IO-Socket-INET6-2.71-1.fc20.20131231.rh.noarch.rpm
                                          perl-Net-DRI-0.96_05-3.fc20.20131231.rh.noarch.rpm
                                          perl-SOAP-WSDL-2.00.99_3-3.fc20.20131231.rh.noarch.rpm
                                          php-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-bcmath-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-cli-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-common-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-devel-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-feedcreator-1.7.2-50.fc20.20131231.rh.noarch.rpm
                                          php-gd-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-imap-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-intl-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-mbstring-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          phpMyAdmin-4.2.5-2.fc20.20140628.rh.noarch.rpm
                                          php-opcache-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-pdo-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-pdo-mysql-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-pecl-geoip-1.1.0-3.fc20.20140629.rh.x86_64.rpm
                                          php-pecl-imagick-3.1.2-7.fc20.20140629.rh.x86_64.rpm
                                          php-pecl-mailparse-2.1.6-7.fc20.20140629.rh.x86_64.rpm
                                          php-pecl-mysqlnd_qc-1.2.0-7.fc20.20140629.rh.x86_64.rpm
                                          php-pecl-ssh2-0.12-7.fc20.20140629.rh.x86_64.rpm
                                          php-pecl-uploadprogress-1.0.3.1-7.fc20.20140629.rh.x86_64.rpm
                                          php-pecl-xdebug-2.2.5-4.fc20.20140629.rh.x86_64.rpm
                                          php-phar-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-process-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-tidy-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-xml-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          php-xmlrpc-5.5.14-8.fc20.20140630.rh.x86_64.rpm
                                          postfix-2.11.1-3.fc20.20140518.rh.x86_64.rpm
                                          postfix-manpages-2.11.1-3.fc20.20140518.rh.x86_64.rpm
                                          pulsed-3.0-3.fc20.20131231.rh.noarch.rpm
                                          pure-ftpd-1.0.36-12.fc20.20140211.rh.x86_64.rpm
                                          rar-4.2.0-4.fc20.x86_64.rpm
                                          roundcubemail-1.0.1-5.fc20.20140628.rh.noarch.rpm
                                          subversion-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-devel-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-gnome-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-kde-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-libs-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-perl-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-python-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-ruby-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          subversion-tools-1.8.9-1.fc20.20140528.rh.x86_64.rpm
                                          trafficserver-5.0.0-1.fc20.20140624.rh.x86_64.rpm
                                          trafficserver-devel-5.0.0-1.fc20.20140624.rh.x86_64.rpm
                                          trafficserver-manpages-5.0.0-1.fc20.20140624.rh.x86_64.rpm
                                          trafficserver-plugins-5.0.0-1.fc20.20140624.rh.x86_64.rpm
                                          up-imapproxy-1.2.8-5.fc20.20140519.rh.x86_64.rpm
                                          vnstat-1.11-20.fc20.20131231.rhvnstat.x86_64.rpm
                                          webalizer-xtended-2.23_08_RB30-30.fc20.20140414.rh.x86_64.rpm
                                          woff-code-1.0-3.fc20.20140625.rh.x86_64.rpm
                                          x264-latest-0.142.2431-3.fc20.20140522.rh.x86_64.rpm
                                          xz-5.1.2-12alpha.fc20.20140614.rh.x86_64.rpm
                                          xz-compat-libs-5.1.2-12alpha.fc20.20140614.rh.x86_64.rpm
                                          xz-devel-5.1.2-12alpha.fc20.20140614.rh.x86_64.rpm
                                          xz-libs-5.1.2-12alpha.fc20.20140614.rh.x86_64.rpm
                                          xz-lzma-compat-5.1.2-12alpha.fc20.20140614.rh.x86_64.rpm
                                          xz-static-5.1.2-12alpha.fc20.20140614.rh.x86_64.rpm
                                          zlib-1.2.8-3.fc20.20131231.rh.x86_64.rpm
                                          zlib-devel-1.2.8-3.fc20.20131231.rh.x86_64.rpm
                                          zlib-static-1.2.8-3.fc20.20131231.rh.x86_64.rpm
                                          zram-1.0.1-1.fc20.20140512.rh.noarch.rpm
                                        • Nick
                                          ... Yes, I know.. Why do you have to be so confrontational? Don t you think I know that the argument I provide them when I call them are parsed by that case
                                          Message 20 of 20 , Jun 30, 2014
                                          • 0 Attachment
                                            On 2014-06-30 10:55 AM, lists@... wrote:
                                            >
                                            >
                                            > Am 30.06.2014 16:47, schrieb Nick:
                                            >> On 2014-06-22 5:55 PM, lists@... wrote:
                                            >>> well, you could build a package at your own or just take the
                                            >>> init-script from the debian packages, no idea why people
                                            >>
                                            >> I tried to but I end up with a script makes non-existing calls to "quiet-start" and the like, maybe they hacked the
                                            >> source code to handle them but since I am using relatively stock Postfix I don't have that/those patches in...
                                            >
                                            > modify the script
                                            > you need nothing more as the start/restart/stop functions
                                            >
                                            > frankly do you understand how init-scripts are working?
                                            > they are called with start/stop/restart as param and
                                            > contain functions wich are called depending on $1

                                            Yes, I know..

                                            Why do you have to be so confrontational?

                                            Don't you think I know that the argument I provide them when I call them
                                            are parsed by that case statement?

                                            (and trust me, I have known what a case statement is for decades now...)

                                            I was only seeking help because I am rusty and wanted to know if there
                                            was a more "official" init script (I thought there was one, I guess my
                                            memory is starting to fail me), I was not trying to start a flame war
                                            about what's best to maintain one's packages...

                                            I tried the Debian provided script and saw it was doing non-standard
                                            things and was seeking help to find a more "official" init script.

                                            Thank you and have a nice day,

                                            Nick

                                            PS: Sorry for sending a copy directly to your email address, I thought
                                            the reply-to was set to the mailing list...
                                          Your message has been successfully submitted and would be delivered to recipients shortly.