Qmail Installation


Recommended Posts

I am installing qmail. I copied qmailctl.txt file that i downloaded from some site, I copied it to /var/qmail/bin/qmailctl I chmod 755 the file, I made symlink in /usr/bin/. I try to run it and it says:

Bad interpreter: No such file or directory

/var is on patition with defaults 1 2 in its fstab entry

other scripts in /var/qmail/bin run properly

Can somebody help!!!!!!!!!!!

here is the script

--------------------------------------------------------------------

#!/bin/sh

# description: the qmail MTA

PATH=/var/qmail/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin

export PATH

QMAILDUID=`id -u qmaild`

NOFILESGID=`id -g qmaild`

case "$1" in

start)

echo "Starting qmail"

if svok /service/qmail-send ; then

svc -u /service/qmail-send /service/qmail-send/log

else

echo "qmail-send supervise not running"

fi

if svok /service/qmail-smtpd ; then

svc -u /service/qmail-smtpd /service/qmail-smtpd/log

else

echo "qmail-smtpd supervise not running"

fi

if [ -d /var/lock/subsys ]; then

touch /var/lock/subsys/qmail

fi

;;

stop)

echo "Stopping qmail..."

echo " qmail-smtpd"

svc -d /service/qmail-smtpd /service/qmail-smtpd/log

echo " qmail-send"

svc -d /service/qmail-send /service/qmail-send/log

if [ -f /var/lock/subsys/qmail ]; then

rm /var/lock/subsys/qmail

fi

;;

stat)

svstat /service/qmail-send

svstat /service/qmail-send/log

svstat /service/qmail-smtpd

svstat /service/qmail-smtpd/log

qmail-qstat

;;

doqueue|alrm|flush)

echo "Flushing timeout table and sending ALRM signal to qmail-send."

/var/qmail/bin/qmail-tcpok

svc -a /service/qmail-send

;;

queue)

qmail-qstat

qmail-qread

;;

reload|hup)

echo "Sending HUP signal to qmail-send."

svc -h /service/qmail-send

;;

pause)

echo "Pausing qmail-send"

svc -p /service/qmail-send

echo "Pausing qmail-smtpd"

svc -p /service/qmail-smtpd

;;

cont)

echo "Continuing qmail-send"

svc -c /service/qmail-send

echo "Continuing qmail-smtpd"

svc -c /service/qmail-smtpd

;;

restart)

echo "Restarting qmail:"

echo "* Stopping qmail-smtpd."

svc -d /service/qmail-smtpd /service/qmail-smtpd/log

echo "* Sending qmail-send SIGTERM and restarting."

svc -t /service/qmail-send /service/qmail-send/log

echo "* Restarting qmail-smtpd."

svc -u /service/qmail-smtpd /service/qmail-smtpd/log

;;

cdb)

tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp

chmod 644 /etc/tcp.smtp.cdb

echo "Reloaded /etc/tcp.smtp."

;;

help)

cat <<HELP

stop -- stops mail service (smtp connections refused, nothing goes out)

start -- starts mail service (smtp connection accepted, mail can go out)

pause -- temporarily stops mail service (connections accepted, nothing leaves)

cont -- continues paused mail service

stat -- displays status of mail service

cdb -- rebuild the tcpserver cdb file for smtp

restart -- stops and restarts smtp, sends qmail-send a TERM & restarts it

doqueue -- schedules queued messages for immediate delivery

reload -- sends qmail-send HUP, rereading locals and virtualdomains

queue -- shows status of queue

alrm -- same as doqueue

flush -- same as doqueue

hup -- same as reload

HELP

;;

*)

echo "Usage: $0 {start|stop|restart|doqueue|flush|reload|stat|pause|cont|cdb|queue|help}"

exit 1

;;

esac

exit 0

------------------------------------------------------------------------------------

Link to comment
https://www.neowin.net/forum/topic/254037-qmail-installation/
Share on other sites

You never know, but try changing the interpreter to

#!/bin/bash

Make sure it is the utmost absolute first line.

Also try running the script this way, just to see:

# sh /var/qmail/bin/qmailctl

or

# source /var/qmail/bin/qmailctl

If of course your shell is bash.

I find this to be a very strange problem, this script sounds fine -- it probably just has a malformed shebang line...

One ressource that was particularily useful when I first installed qmail:

http://www.lifewithqmail.com

I now set it up almost blindly -- to the point where I gave myself a challenge and installed it with vpopmail and courrier-*.

  • 1 month later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Since they open sourced the calculator in Win 10/11 it is much better and can do a lot, I love it.
    • That's just silly imo. The lengths that man goes to just to avoid W11 is just nuts. Very, very few home users would do that. I will say this though, he is committed. Btw, I note on askwoody that Woody Leonhard passed away March, 2025 aged 73. His site was one of my favorites back in the day. Belated yes but RIP Woody.
    • Because of the EU (a good thing) newer android devices been getting 5 years worth of security patches. Except some Motorola which found the loop hole, and offer ZERO updates. In addition, Google for years have been making where it can patch some stuff by updating the core Google Play Store itself.  As echoed earlier,  you take the security risk in to your own hand beyond supported.
    • Win11Debloat 06.11.2026 by Razvan Serea Win11Debloat is a lightweight, easy to use PowerShell script that allows you to quickly declutter and customize your Windows experience. It can remove pre-installed bloatware apps, disable telemetry, remove intrusive interface elements and much more. The script also includes many features that system administrators and power users will enjoy. Such as a powerful command-line interface, support for Windows Audit mode and the option to make changes to other Windows users. All changes made by Win11Debloat can be easily reversed, and most removed apps can be restored via the Microsoft Store. A full guide on how to undo the changes is available here. Win11Debloat features: Below is an overview of the key features and functionality offered by Win11Debloat. Please refer to the wiki for more information about the default settings preset. Remove a wide variety of preinstalled apps. Click here for more info. Disable telemetry, diagnostic data, activity history, app-launch tracking & targeted ads. Disable tips, tricks, suggestions & ads across Windows. Disable Windows location services & app location access. Disable Find My Device location tracking. Disable 'Windows Spotlight' and tips & tricks on the lock screen. Disable 'Windows Spotlight' desktop background option. Disable ads, suggestions and the MSN news feed in Microsoft Edge. Hide Microsoft 365 ads on the Settings 'Home' page, or hide the 'Home' page entirely. Disable & remove Microsoft Copilot. Disable Windows Recall. Disable Click to Do, AI text & image analysis tool. Prevent AI service (WSAIFabricSvc) from starting automatically. Disable AI Features in Edge. Disable AI Features in Paint. Disable AI Features in Notepad. Disable the Drag Tray for sharing & moving files. Restore the old Windows 10 style context menu. Turn off Enhance Pointer Precision, also known as mouse acceleration. Disable the Sticky Keys keyboard shortcut. Disable Storage Sense automatic disk cleanup. Disable fast start-up to ensure a full shutdown. ...and more. Once you’ve downloaded the Win11Debloat file (Get.ps1), just follow these quick steps: Locate the Get.ps1 script file. Right-click the file and select Run with PowerShell from the context menu. If prompted by User Account Control (UAC), select Yes to grant the script the necessary administrative permissions. Win11Debloat 06.11.2026 fixes: Fix lock screen spotlight option being disabled when disabling the start recommended section by @Raphire in #619 Fix log message formatting by @Raphire Note The -RemoveCommApps and -RemoveW11Outlook command-line parameters for uninstalling a few specific apps have been removed with this release. If you previously relied on these parameters, please see this wiki page for alternative methods of removing these apps. Download: Win11Debloat 06.11.2026 | Open Source View: Win11Debloat Home Page | Screenshots 1| 2 Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Rookie
      restore went up a rank
      Rookie
    • Very Popular
      AndrewSteel earned a badge
      Very Popular
    • Veteran
      Taliseian went up a rank
      Veteran
    • One Month Later
      Clizby earned a badge
      One Month Later
    • One Month Later
      Timaximus earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      499
    2. 2
      +Edouard
      162
    3. 3
      PsYcHoKiLLa
      153
    4. 4
      ATLien_0
      83
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!