Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Starting Daemon At Startup

Starting Daemon At Startup
Thread Tools
altoid
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Brooklyn
Status: Offline
Reply With Quote
Apr 5, 2001, 09:38 PM
 
it would be cool to have sendmail start as a daemon at start up so that it's running no matter who logs in. And so that if anyone logs out, it's still running.

I thought about editing the shell logins but I figured that would only run if the terminal app was loaded - and then mb only for a particular user.

I've been looking around and I can't find what i'm looking for... 'course I'm not sure exactly what I'm looking for.

Also, when I use the mail app in the command line, the email I send has the wrong return email address and I can't seem to find where it's storing the user return addy that it puts on outgoing mail.. that's a lesser concern tho.. I'd really just like to make sure sendmail is running all the time.
     
Eugene
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status: Offline
Reply With Quote
Apr 6, 2001, 01:16 AM
 
Open a file in /System/Library/StartupItems/whatever/whatever and look at it.

They're just shell scripts, so you'll need something very basic:

#!/bin/sh

sendmail -whateveroptions


You could make it more complicated like with the if/then statements...
     
altoid  (op)
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Brooklyn
Status: Offline
Reply With Quote
Apr 6, 2001, 08:17 AM
 
Thanks for the info.

So I went to check out the startupitmes folder and found that a Sendmail subdirectory with a starup script was already there. So I looked around for the system.log and found that the last thing the system logs reports happened at start up are messages from an attempt to start Sendmail.
*********************************************
Apr 6 06:17:45 localhost sendmail[254]: unable to qualify my own domain name (localhost) -- using short name
Apr 6 06:17:45 localhost sendmail[254]: NOQUEUE: SYSERR: putoutmsg (NO-HOST): error on output channel sending "451 4.0.0 fill_fd: before readcf: fd 1 not open: Bad file descriptor": Input/output error
Apr 6 06:17:45 localhost sendmail[254]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 1 not open: Bad file descriptor
Apr 6 06:17:45 localhost sendmail[254]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 2 not open: Bad file descriptor
********************************

I wasn't sure if there was something about the script itself, so I ran it.

%> sudo /system/library/startupitems/sendmail/sendmail

It seemed to start up okay, and a quick check of running processes confirmed it. So I checked the system.log again and found
*******************************
Apr 6 07:54:47 localhost sendmail[428]: My unqualified host name (localhost) unknown; sleeping for retry
Apr 6 07:55:47 localhost sendmail[428]: unable to qualify my own domain name (localhost) -- using short name
********************************

In anycase, the SMTP service is working fine now.


My computer does not have a domain name associated to it, I just use sendmail as my smtp cuz I have problems with getting my ISP to send emails that have return addresses other than what they sanction (those w/ their domain name in them). So far this has been a great solution to my email problems.

I'm not sure what to make of those error messages that appear in the syslog. Any idea why it wont load at startup?

     
Eugene
Senior User
Join Date: Nov 2000
Location: Berkeley, CA
Status: Offline
Reply With Quote
Apr 6, 2001, 06:56 PM
 
Could be the order in which it loads other network services...

You could also try assigning you box an arbitrary hostname or just the raw IP...
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:46 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,