How to start qmail / netqmail using systemd

Discussion in 'qmail' started by popowich, Aug 3, 2011.

  1. popowich

    popowich EQ Forum Admin Staff Member

    Joined:
    Aug 12, 2008
    Messages:
    9,001
    Likes Received:
    120
    To have qmail/netqmail or my own indimail server run under systemd, one needs to create a service configuration file

    (/lib/systemd/system/qmail.service)

    # cat > /lib/systemd/system/qmail.service
    [Unit]
    Description=qmail/netqmail service
    After=local-fs.target network.target

    [Service]
    ExecStart=/var/qmail/bin/svscan /service
    ExecStop=/var/qmail/bin/svc -dx /service/* /service/*/log
    Type=simple
    NonBlocking=yes

    [Install]
    WantedBy=multi-user.target


    NOTE: You can use your own variation in ExecStart to start svscan
    (using it with readproctitle, etc)

    # systemctl enable qmail.service

    The above command will create a link in
    /etc/systemd/system/multi-user.target.wants

    lrwxrwxrwx 1 root root 36 Jul 20 18:18 qmail.service ->
    /lib/systemd/system/qmail.service


    To start qmail/netqmail do

    # systemctl start qmail.service

    To stop qmail/netqmail do

    # systemctl stop qmail.service


    --
    Source: Regards Manvendra - http://www.indimail.org
     


Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.
Loading...