Date: Sun, 14 Dec 2003 20:16:16 +0100 From: "David du SERRE-TELMON" <david@xinus.net> To: <lioux@FreeBSD.org> Cc: ports@FreeBSD.org Subject: FreeBSD Port: qmail-1.03 Message-ID: <006801c3c276$bf012a80$1e00a8c0@SHUTTLE>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. ------=_NextPart_000_0065_01C3C27F.20A698D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, I think that it could be a good idea to make an option in qmail port for using daemontools for controling process, maintening logfiles and vpopmail to provide virtuals domains managing. I'll be happy to help you to put this features in qmail port and I send you my contribution. - qmailctl startup file for FreeBSD - supervise folder - Installation directives If qmail-scanner have been installed from FreeBSD port, it will be automaticately use (qmailctl startup script check for /usr/local/bin/qmail-scanner-queue.pl file). PORTS REQUIERE (+ qmail etc.) - mail/vpopmail - sysutils/daemontools PORTS RECOMMANDED - mail/qmail-scanner (qmail should be compiled with qmail-queue patch in order to use this feature) Installation directives : - Copy qmailctl script in /var/qmail/bin folder (in this mail) - ln -s /var/qmail/bin/qmailctl /usr/local/etc/rc.d/qmail.sh - ln -s /var/qmail/bin/qmailctl /usr/local/bin/qmailctl - Copy supervise folder in /var/qmail folder (in this mail) - Set $SVDIR to /var/qmail/supervise/ in /usr/local/etc/rc.d/svscan.sh script (mail/daemontools must be installed before) - mkdir /var/log/qmail - mkdir /var/log/qmail/pop3d - mkdir /var/log/qmail/smtpd - chown -R qmaill:qnofiles /var/log/qmail - echo ./Maildir/ > /var/qmail/control/defaultdelivery (Set default delivry to Maildir for qmail) - echo 10 > /var/qmail/control/concurrencyincoming (Set maximum concurrency incoming for qmail) All this installation directives come from Dave Sill recommandations with Life with qmail. David. ------=_NextPart_000_0065_01C3C27F.20A698D0 Content-Type: application/octet-stream; name="supervise.tar.gz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="supervise.tar.gz" H4sIAHGx3D8AA+2dz27jVBTGzcAqYgtigdDFVLBK43ttXy9mwqT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uA+8wM3nPjByVFx0Cjb+qOD7YPt rr7QZLgYmO4gCLyofZp6qbc5Hest/5h8S9rHRN+Y/7JOvrtLkpEXEO98GkYJmS+6S459sZ3+D/39 rb2tfl987Tzs6mGgt2brXl/WKm6JhMfJ2J/4CWlPCLsYweSwtbBa4k5jUVheRNpnpP0VaY+JQdrn pOMlrly4KQtt0x0+Jm0ZsJodSV08kzj0Fy9JqqHLA65vzEXQxRPJX74Wy7pynGQBE/bpx1Sp+1Jc //UGgFbI/zD5/j/6//VTpn8dAaAV/D/mv4Eo07+OANAK+R+O/g+GMv3rCACtkP+xTez/gFCmfx0B oBXyP/j+HxA9Lc//fPD2nd33Mf9z61is/2k4NRvM/3CD55//42D+B4Ri/RvP/3AL9Qdhuf6A+R/L WMz/mDb2/0CoLf9z2FpIAGUjCRNArzjL67/R/A938PMfQVDRv4H8jy0sIc7/AKjo30D+h8n6x/7P +lHRv4H8D6MU9YdARf8G8j/UdHD+h6Cn5fmfN+/tvPUr5n9uHcX1D5v/Eb5/wf9btoN//wvC3P+P wjgJBhOvezS7d9Q6E8PhMq0zCideZ/bIDR8XpBCYUcjLfJFHZgxCqbEk6iJ2JZ2SQ7Ix22Gx3pU9 zlc9c0dPpk+XP4M5JHv5AvXQzGtEcf03k/+R//+BmZn/F6Kj/4egTP9m8j/cwfw3DGX6Q+Z/svpn Ttb/ofj5LyCU6d9Q/kcYQdQfgjL9IfM/8/O/Y9ro/0HoadL///3HJ7+d/pc9MGx0dxAEQRAEQRAE WSP/A16/N3UAeAAA ------=_NextPart_000_0065_01C3C27F.20A698D0 Content-Type: application/octet-stream; name="qmailctl" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="qmailctl" #!/bin/sh=0A= =0A= # For Red Hat chkconfig=0A= # chkconfig: - 80 30=0A= # description: the qmail MTA=0A= =0A= # Adapted for FreeBSD by "David du SERRE-TELMON" <david@xinus.net>=0A= #=0A= # You have to configure qmail in /etc/rc.conf=0A= # QMAIL: qmail_enable=3D"YES" & sendmail_enable=3D"NONE"=0A= # SMTP: qmail_smtp_enable=3D"YES"=0A= # POP3: qmail_pop_enable=3D"YES" (set to NO if you use another POP3 = daemon)=0A= =0A= SVCDIR=3D/var/qmail/supervise=0A= SVPROC=3Dsvscan=0A= PATH=3D/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin=0A= export PATH=0A= =0A= QMAILDUID=3D`id -u qmaild`=0A= NOFILESGID=3D`id -g qmaild`=0A= =0A= # Suck in the configuration variables.=0A= if [ -r /etc/defaults/rc.conf ]; then=0A= . /etc/defaults/rc.conf=0A= source_rc_confs=0A= elif [ -r /etc/rc.conf ]; then=0A= . /etc/rc.conf=0A= fi=0A= =0A= # Checking for qmail settings in /etc/rc.conf=0A= if [ -z "$qmail_enable" ] || [ -z "$sendmail_enable" ] || [ -z = "$qmail_smtp_enable" ] || [ -z "$qmail_pop_enable" ]; then=0A= cat << HELP=0A= =0A= *** You have to configure qmail in /etc/rc.conf ***=0A= QMAIL: qmail_enable=3D"YES" & sendmail_enable=3D"NONE"=0A= SMTP: qmail_smtp_enable=3D"YES"=0A= POP3: qmail_pop_enable=3D"YES" (set to NO if you use another POP3 = daemon)=0A= =0A= HELP=0A= exit 1=0A= fi=0A= =0A= # Checking for svscan=0A= if ! ps | grep -v grep | grep $SVPROC > /dev/null=0A= then=0A= echo "Error, $SVPROC process seem no be start"=0A= exit 1=0A= fi=0A= =0A= # Checking for sendmail and qmail configuration=0A= case ${sendmail_enable} in [Nn][Oo][Nn][Ee])=0A= sendmail_enable_check=3D1=0A= ;;=0A= esac=0A= =0A= case ${qmail_enable} in [Yy][Ee][Ss])=0A= qmail_enable_check=3D1=0A= ;;=0A= esac=0A= =0A= if [ "$sendmail_enable_check" !=3D 1 ]=0A= then=0A= echo -e "You must disable sendmail with sendmail_enable=3D\"NONE\""=0A= echo "in your /etc/rc.conf in order to start qmail"=0A= exit 1=0A= fi=0A= =0A= if [ "$qmail_enable_check" !=3D 1 ]=0A= then=0A= echo -e "You must enable qmail with qmail_enable=3D\"YES\""=0A= echo "in your /etc/rc.conf in order to start qmail"=0A= exit 1=0A= fi=0A= =0A= case "$1" in=0A= start)=0A= echo "Starting qmail"=0A= if svok $SVCDIR/qmail-send ; then=0A= svc -u $SVCDIR/qmail-send=0A= else=0A= echo qmail-send service not running=0A= fi=0A= =0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= echo "* Starting qmail-smtpd."=0A= if svok $SVCDIR/qmail-smtpd ; then=0A= svc -u $SVCDIR/qmail-smtpd=0A= else=0A= echo qmail-smtpd service not running=0A= fi=0A= if [ -d /var/lock/subsys ]; then=0A= touch /var/lock/subsys/qmail=0A= fi=0A= ;;=0A= esac=0A= case ${qmail_pop_enable} in [Yy][Ee][Ss])=0A= echo "* Starting qmail-pop3d."=0A= if svok $SVCDIR/qmail-pop3d ; then=0A= svc -u $SVCDIR/qmail-pop3d=0A= else=0A= echo qmail-pop3d service not running=0A= fi=0A= ;;=0A= esac=0A= ;;=0A= =0A= stop)=0A= echo "Stopping qmail..."=0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= echo " qmail-smtpd"=0A= svc -d $SVCDIR/qmail-smtpd=0A= ;;=0A= esac=0A= echo " qmail-send"=0A= svc -d $SVCDIR/qmail-send=0A= if [ -f /var/lock/subsys/qmail ]; then=0A= rm /var/lock/subsys/qmail=0A= fi=0A= case ${qmail_pop_enable} in [Yy][Ee][Ss])=0A= echo " qmail-pop3d"=0A= svc -d $SVCDIR/qmail-pop3d=0A= ;;=0A= esac=0A= ;;=0A= stat)=0A= svstat $SVCDIR/qmail-send=0A= svstat $SVCDIR/qmail-send/log=0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= svstat $SVCDIR/qmail-smtpd=0A= svstat $SVCDIR/qmail-smtpd/log=0A= ;;=0A= esac=0A= case ${qmail_pop_enable} in [Yy][Ee][Ss])=0A= svstat $SVCDIR/qmail-pop3d=0A= svstat $SVCDIR/qmail-pop3d/log=0A= ;;=0A= esac=0A= qmail-qstat=0A= ;;=0A= doqueue|alrm|flush)=0A= echo "Sending ALRM signal to qmail-send."=0A= svc -a $SVCDIR/qmail-send=0A= ;;=0A= queue)=0A= qmail-qstat=0A= qmail-qread=0A= ;;=0A= reload|hup)=0A= echo "Sending HUP signal to qmail-send."=0A= svc -h $SVCDIR/qmail-send=0A= ;;=0A= pause)=0A= echo "Pausing qmail-send"=0A= svc -p $SVCDIR/qmail-send=0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= echo "Pausing qmail-smtpd"=0A= svc -p $SVCDIR/qmail-smtpd=0A= ;;=0A= esac=0A= case ${qmail_pop_enable} in [Yy][Ee][Ss])=0A= echo "Pausing qmail-pop3d"=0A= svc -p $SVCDIR/qmail-pop3d=0A= ;;=0A= esac=0A= ;;=0A= cont)=0A= echo "Continuing qmail-send"=0A= svc -c $SVCDIR/qmail-send=0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= echo "Continuing qmail-smtpd"=0A= svc -c $SVCDIR/qmail-smtpd=0A= ;;=0A= esac=0A= case ${qmail_pop_enable} in [Yy][Ee][Ss])=0A= echo "Continuing qmail-pop3d"=0A= svc -c $SVCDIR/qmail-pop3d=0A= ;;=0A= esac=0A= ;;=0A= restart)=0A= echo "Restarting qmail:"=0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= echo "* Stopping qmail-smtpd."=0A= svc -d $SVCDIR/qmail-smtpd=0A= ;;=0A= esac=0A= echo "* Sending qmail-send SIGTERM and restarting."=0A= svc -t $SVCDIR/qmail-send=0A= case ${qmail_smtp_enable} in [Yy][Ee][Ss])=0A= echo "* Restarting qmail-smtpd."=0A= svc -u $SVCDIR/qmail-smtpd=0A= ;;=0A= esac =0A= case ${qmail_pop_enable} in [Yy][Ee][Ss])=0A= echo "* Restarting qmail-pop3d."=0A= svc -t $SVCDIR/qmail-pop3d=0A= ;;=0A= esac=0A= ;;=0A= cdb)=0A= tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp=0A= chmod 644 /etc/tcp.smtp.cdb=0A= echo "Reloaded /etc/tcp.smtp."=0A= ;;=0A= help)=0A= cat << HELP=0A= stop -- stops mail service (smtp connections refused, nothing goes = out)=0A= start -- starts mail service (smtp connection accepted, mail can go = out)=0A= pause -- temporarily stops mail service (connections accepted, nothing = leaves)=0A= cont -- continues paused mail service=0A= stat -- displays status of mail service=0A= cdb -- rebuild the tcpserver cdb file for smtp=0A= restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it=0A= doqueue -- sends qmail-send ALRM, scheduling queued messages for delivery=0A= reload -- sends qmail-send HUP, rereading locals and virtualdomains=0A= queue -- shows status of queue=0A= alrm -- same as doqueue=0A= flush -- same as doqueue=0A= hup -- same as reload=0A= HELP=0A= ;;=0A= *)=0A= echo "Usage: $0 = {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"=0A= exit 1=0A= ;;=0A= esac=0A= =0A= exit 0=0A= ------=_NextPart_000_0065_01C3C27F.20A698D0--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006801c3c276$bf012a80$1e00a8c0>