August 12, 2012 Roberto Puzzanghera1 comment
I have adjusted the startup script distributed by Dovecot
and saved it as /usr/local/bin/dovecotctl
:
#!/bin/sh ### BEGIN INIT INFO # Provides: dovecot # Required-Start: $local_fs $remote_fs $network $syslog $time # Required-Stop: $local_fs $remote_fs $network $syslog # Should-Start: postgresql mysql slapd winbind # Should-Stop: postgresql mysql slapd winbind # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Dovecot init script # Description: Init script for dovecot services ### END INIT INFO # Example /etc/init.d/dovecot script. Change DAEMON if necessary. # License is public domain. DAEMON=/usr/local/dovecot/sbin/dovecot # Uncomment to allow Dovecot daemons to produce core dumps. #ulimit -c unlimited test -x $DAEMON || exit 1 set -e base_dir=`$DAEMON config -h base_dir` pidfile=$base_dir/master.pid if test -f $pidfile; then running=yes else running=no fi case "$1" in start) echo -n "Starting Dovecot" $DAEMON echo "." ;; stop) if test $running = yes; then echo "Stopping Dovecot" kill `cat $pidfile` echo "." else echo "Dovecot is already stopped." fi ;; reload) if test $running = yes; then echo -n "Reloading Dovecot configuration" kill -HUP `cat $pidfile` echo "." else echo "Dovecot isn't running." fi ;; restart|force-reload) echo -n "Restarting Dovecot" if test $running = yes; then kill `cat $pidfile` sleep 1 fi $DAEMON echo "." ;; *) echo "Usage: dovecotctl {start|stop|reload|restart|force-reload}" >&2 exit 1 ;; esac exit 0
cd /usr/local/bin wget https://notes.sagredo.eu/files/qmail/dovecotctl chmod +x /usr/local/bin/dovecotctl
Run Dovecot
and that's what you should see:
> dovecotctl Usage: dovecotctl {start|stop|reload|restart|force-reload} > dovecotctl start Starting Dovecot. > ps axfu root 27006 0.0 0.0 21640 1068 ? Ss 14:30 0:00 /usr/local/dovecot/sbin/dovecot vpopmail 27007 0.0 0.0 13156 1044 ? S 14:30 0:00 \_ dovecot/anvil root 27008 0.0 0.0 13284 1232 ? S 14:30 0:00 \_ dovecot/log root 27010 0.0 0.1 27900 3468 ? S 14:30 0:00 \_ dovecot/config
To run Dovecot
at boot time simply add a line like this into your /etc/rc.d/rc.local
/usr/local/bin/dovecotctl start &
problem with passwords containing special characters like %
February 26, 2021 22:02
problem with passwords containing special characters like %
February 26, 2021 10:05
What about using --disable-many-domains on vpopmail configure ?
February 22, 2021 16:49
aliasdomain patch compilation issue
February 21, 2021 16:28
aliasdomain patch compilation issue
February 21, 2021 14:35
Lua backend
February 16, 2021 16:07
What about using --disable-many-domains on vpopmail configure ?
February 14, 2021 03:05
What about using --disable-many-domains on vpopmail configure ?
February 14, 2021 01:20
Lua backend
February 12, 2021 17:40
Lua backend
February 12, 2021 14:28
Tags
apache clamav dkim dovecot ezmlm fail2ban hacks lamp letsencrypt linux linux-vserver lxc mariadb mediawiki mozilla mysql openboard owncloud patches php proftpd qmail qmailadmin rbl roundcube rsync sieve simscan slackware spamassassin spf ssh ssl surbl tcprules tex ucspi-tcp vpopmail vqadmin
Comments
Creating a rc.local for systemd
GoofY August 2, 2019 13:24
Hi,
Most current Linux systems don't come with a rc.local anymore, to circumvent:
nano /etc/systemd/system/rc-local.service
--------------------
[Unit]
Description=/etc/rc.local
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
SysVStartPriority=99
[Install]
WantedBy=multi-user.target
---------------
Then:
nano /etc/rc.local
--------------------
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/usr/local/bin/dovecotctl start &
exit 0:
---------------
chmod +x /etc/rc.local
systemctl enable rc-local
systemctl start rc-local.service
Reply | Permalink