Learning the Terminal in Jaguar, Part 2
Pages: 1, 2, 3
By default, the Mac OS X root home directory already
contains a .forward file, but this one redirects mail not
to another user, but into thin air. This happens because instead of an
account name, root's .forward file contains the pathname
/dev/null, which is the location of a Unix black
hole. Streams of data directed to /dev/null, mail
messages included, simply disappear. Since OS X's designers figure
most users won't be accessing root's mail, they used this method to
ensure mail doesn't pile up at the door while no one's home,
eventually filling up your hard disk.
We only need, then, to edit root's .forward
file. You've probably already noticed that there is no
root directory in /Users -- so where is
root's home? The easiest way to find any user's home directory is by
using the finger command, which shows some basic
information about the specified account. For root's,
then:
[haru:~] chris% finger root
Login: root Name: System Administrator
Directory: /var/root Shell: /bin/tcsh
Last login Fri Oct 11 19:46 (PDT) on console
No Plan.
[haru:~] chris%
And there beside Directory you'll see that
root's home directory is /var/root.
As an alternative, you can always specify a user's home directory
using the ~ shortcut along with the account
name. Therefore, if you wanted to specify root's home
directory, you would use ~root.
Let's have a look inside ~root:
[haru:~] chris% sudo ls /var/root
.CFUserTextEncoding .forward .nsmbrc Library
First, here are a couple of points about this command line:
- Unlike the directories in
/Users,~rootcan only be browsed byroot. Therefore, usingsudois necessary. - You see several items with names beginning with
.. That initial dot is the Unix way of marking filenames as invisible to the shell (and to the Finder as well). You can see them, though, because you're runninglsasroot, andlsshows everything torootby default. If you were runninglsas a regular user, however, you would need to use its-aflag to see those "dot files." For example, compare the output of these two commands:ls -a ~andls ~(they should display the contents of your own home directory with, and without dot files.)
In any case, you should now see ~root/.forward, so
let's next edit it with pico, using sudo
since it's a root-owned file:
sudo pico /var/root/.forward
You should then see something like this:

That single line, then, is the entire content of
/var/root/.forward. To change it, first delete the file's
single line by pressing control + K. Next, type in your account name
(the name that's just before the "%" in the prompt; "chris" in this
case):

Save the file and close pico as usual, and you're done with the .forward file.
Now that everything is in place, you can perform a test. Send a new mail message to root:
[haru:~] chris% mail root
Subject: Test 2
This is only a test, again.
.
EOT
[haru:~] chris%
Check your mail, and you should see the new message, forwarded to you from root:
haru:~] chris% mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/chris": 1 message 1 new
>N 1 chris Wed Jan 22 08:56 13/406 "Test 2"
&
Message 1:
From root Wed Jan 22 08:56:20 2003
Date: Wed, 22 Jan 2003 08:56:20 -0800 (PST)
From: Chris Stone <chris>
To: root
Subject: Test 2
This is only a test, again.
& q
Saved 1 message in mbox
[haru:~] chris%
Here are a couple of more pointers for using mail:
- If you have several messages listed, just enter the message number to have that message displayed.
- Once a message has been displayed, it no longer shows up in the
initial new mail list, but is saved in the file
~/mbox. You can safely delete that file if you don't want the messages saved. If you do keep the file and want to view the messages, however, just run mail with its-fflag, which will list all of your saved messages.
For the final test, go ahead and run the daily maintenance job manually by entering this command:
sudo periodic daily
Once a prompt has returned, the job is done and you can check your mail once more:
[haru:~] chris% sudo periodic daily
Password:
[haru:~] chris% mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/chris": 1 message 1 new
>N 1 chris Wed Jan 22 09:08 59/2244 "Haru.local"
If you take a look at the message, the beginning of it should look something like this:
Message 1:
From root Wed Jan 22 09:08:54 2003
Date: Wed, 22 Jan 2003 09:08:54 -0800 (PST)
From: Chris Stone <chris>
To: root
Subject: Haru.local daily run output
Subject: Haru.local daily run output
Removing scratch and junk files:
rm: ./Mount01: is a directory
rm: ./Mount02: is a directory
rm: ./Mount03: is a directory
rm: ./Mount04: is a directory
rm: ./vi.recover: is a directory
rm: ./zBooterMnt: is a directory
Backing up NetInfo data
Checking subsystem status:
disks:
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/disk0s9 19532400 13471036 5866040 69% /
fdesc 1 1 0 100% /dev
Now that these regular reports will be coming in, you'll probably want to be able to understand them. In Part 3, you'll get a closer look at the scripts themselves to learn how to read the reports they generate. Until then, keep checking to see that you're receiving the reports as expected, and always feel free to submit your comments or questions to our TalkBack section.
Chris Stone is a Senior Macintosh Systems Administrator for O'Reilly, coauthor of Mac OS X in a Nutshell and contributing author to Mac OS X: The Missing Manual, which provides over 40 pages about the Mac OS X Terminal.
Read more Learning the Mac OS X Terminal columns.
Return to the Mac DevCenter.
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 98 of 98.
-
sendmail.cf - missing? maybe?
2005-05-22 14:25:17 DaveHalbert [Reply | View]
-
sendmail.cf - missing? maybe?
2005-05-27 03:49:23 TeddiStransky [Reply | View]
Maybe this tutorial is too old for anyone to be watching these messages any more. At any rate, Dave, I ran into the same issue, but by looking at your post, I see I neglected to cd the directory to /etc/mail/ ... so thanks for straightening ME out.
My Mac is fairly new, (a hotrodded G4 running 10.2.8) and the contents of /etc/mail/ are:
README access.db sendmail.cf
access local-host-names submit.cf
If it's any help, here's the contents of the README:
The sendmail m4 config files are located in /usr/share/sendmail/conf.
Everything you need to reconfig your sendmail from the m4 files
should be there. The default sendmail.cf as shipped on your machine
was generated from the /usr/share/sendmail/conf/cf/generic-darwin.mc
config file. If you wish to make changes, the following steps are
recommended:
* cd to /usr/share/sendmail/conf/cf:
cd /usr/share/sendmail/conf/cf
* Copy the default config file to yourdomain.mc:
sudo cp generic-darwin.mc yourdomain.mc
* Edit your new config file:
sudo vi yourdomain.mc
* Regenerate your sendmail.cf file from the m4 file you just edited:
m4 ../m4/cf.m4 yourdomain.mc > /tmp/sendmail.cf
* Backup your old sendmail.cf:
sudo cp /etc/mail/sendmail.cf /etc/mail/sendmail.cf.orig
* Put your new sendmail.cf in place:
sudo cp /tmp/sendmail.cf /etc/mail/
* Restart sendmail
Other oddities of using sendmail on Mac OS X:
* aliases are first taken from netinfo, and then sendmail falls back on
the aliases file.
* The aliases file lives in /etc/aliases although no default aliases file
is shipped in the stock Mac OS X config. You can change the location
of your aliases file by using the following line in your sendmail m4
config file:
define(`ALIAS_FILE', `path/to/aliases')
Or you can change it in your sendmail.cf file with the following line
(probably commented out in your config):
O AliasFile=/path/to/aliases
* To ensure that sendmail does not read its config file from netinfo,
execute the following commands:
niutil -create . /locations/sendmail
niutil -createprop . /locations/sendmail sendmail.cf /etc/mail/sendmail.cf
This will tell sendmail (when it looks at netinfo) to not look in
netinfo for its config file, but to look at /etc/mail/sendmail.cf
-
Problems with sending self mail
2004-08-01 14:19:09 DrewE [Reply | View]
I have Panther on my machine. Postfix was running while i tried to send myself a test email, but I had problems. I had no mail i my mailbox, so I checked the error log and found that supposedly "drew" isn't a user, even though "drew" sent the message. Does anyone recognize the problem here? Any feedback would be appreciated.
Thanks.
This is what I typed into Terminal: (The log file shows the whole message for the one I sent at 17:12:07 only)
Drew:/var/log Drew$ mail drew
Subject: hey
test
.
EOT
Drew:/var/log Drew$ mail
No mail for Drew
Drew:/var/log Drew$ tail mail.local
tail: mail.local: No such file or directory
Drew:/var/log Drew$ mail drew
Subject: hey
test
.
EOT
Drew:/var/log Drew$ mail
No mail for Drew
Drew:/var/log Drew$ tail mail.log
Aug 1 17:11:37 localhost postfix/cleanup[707]: A3E0251F9C: message-id=<20040801211137.A3E0251F9C@Drew.local>
Aug 1 17:11:37 localhost postfix/qmgr[623]: A3E0251F9C: from=<>, size=1767, nrcpt=1 (queue active)
Aug 1 17:11:37 localhost postfix/local[709]: A3E0251F9C: to=<Drew@Drew.local>, relay=local, delay=0, status=bounced (unknown user: "drew")
Aug 1 17:12:07 localhost postfix/pickup[706]: B5AA151FA1: uid=501 from=<Drew>
Aug 1 17:12:07 localhost postfix/cleanup[707]: B5AA151FA1: message-id=<20040801211207.B5AA151FA1@Drew.local>
Aug 1 17:12:07 localhost postfix/qmgr[623]: B5AA151FA1: from=<Drew@Drew.local>, size=291, nrcpt=1 (queue active)
Aug 1 17:12:07 localhost postfix/local[709]: B5AA151FA1: to=<drew@Drew.local>, orig_to=<drew>, relay=local, delay=0, status=bounced (unknown user: "drew")
Aug 1 17:12:07 localhost postfix/cleanup[707]: BAD1251FA3: message-id=<20040801211207.BAD1251FA3@Drew.local>
Aug 1 17:12:07 localhost postfix/qmgr[623]: BAD1251FA3: from=<>, size=1767, nrcpt=1 (queue active)
Aug 1 17:12:07 localhost postfix/local[709]: BAD1251FA3: to=<Drew@Drew.local>, relay=local, delay=0, status=bounced (unknown user: "drew")
Drew:/var/log Drew$ -
Problems with sending self mail
2004-08-04 09:00:58 NewYorkBruce [Reply | View]
Uh, oh...
See this tech note:
http://docs.info.apple.com/article.html?artnum=107110
-
Problems with sending self mail
2004-08-04 05:11:35 NewYorkBruce [Reply | View]
Drew,
Please let me know if you find a solution to this problem. I have the exact situation on one of my two 10.3.4 machines. I suspect we've got screwed up permissions somewhere.
Thanks -
Problems with sending self mail
2004-08-08 18:26:52 DrewE [Reply | View]
Hello!! I have resolved this problem! Since my last post, I had gained another error which dealt obviously with permissions that I then fixed.
Let me guess, the short name for the computer you're using has an uppercase letter? If that is the case, then it needs to be made lowercase. I started a discussion in apple.com/support pertaining to this problem, so you can check it out.
Problems with postfix and Letter Case in User Name
It's not actually called that, but whatever.
There is a manual at apple.com/support that can help you change the short name of your user. Since I was only changing the case of my short user name, no new home directory was created because I guess OS X wasn't going to allow for both "Drew" and "drew" to exist as directories. Logged in as root, I just fixed the case of the name of the existing home directory to cover for this problem and then moved it to its parent directory using Terminal once the new user had been made to avoid deletion in the next step. I then deleted the old user as mentioned and instead of copying files afterwards, I just returned the modified home directory. The rest of the steps were basically the same. (This will make more sense once you've read the manual)
I hope this works for you.. though this is quite an annoyance.. I just wish that Apple warned users to make their short user names lowercase when setting up the computer initially. Maybe I was warned and didn't pay attention.. Oh well. Good luck. (By the way, I'm no expert, so I can't actually guarantee that it works, but it did for me, and I have all of my preferences and settings back to normal. Also, chances are that there's an easier way, but this was all I could think of to do.)
Again, Good Luck!!
-
where's my sendmail
2004-07-26 22:31:48 artificialArea [Reply | View]
preface: I'm running OS X 10.3
I don't seem to have sendmail.cf at all? When I try to make a backup of the file I get the following message...
===
[artificialAreaG5:/private/etc] artifici% sudo cp -p sendmail.cf sendmail.cf.bak
cp: sendmail.cf: No such file or directory
===
I double checked by doing a search in the Finder, which confirmed that I have no sendmail file (?)
confused, aA
-
address of root
2004-05-31 11:21:57 johnparr [Reply | View]
Chris,
Can I assume that if you wanted to change the address of root you could substitute "chris" with "chris@hisDomain.com" in the config file?
i.e. suppose I have a box at work that I would like to receive an email to let me know when the maintenance has been done. Obviously I can't use simply the user id for "chris" as destination.
Love the columns!
Thanks for your time.
John
-
periodic under PANTHER 10.3
2003-12-20 17:22:20 anonymous2 [Reply | View]
Hi, this tutorial was great! I'm just learning to use the MAC OS X Terminal. I would like to add something for panther's uesers (like me). You don't have to fix sendimail, under panther there's another mailserver named POSTFIX that came just yet configured an working (you may see the hostconfig file, the MAILSERVER parameter is setted on YES yet). the second thing is that there are two periodic.conf config file: One, the default, is in /etc/defaults/periodic.conf and you do not need to edit it, just create a new periodic.conf file in /etc directory adding it the linees you need (daily_output=ROOT,...).
I will buy theese books (in italian, of course! :)) as i know they were translated to italian.
Sorry for my bad english :)
Bye bye
-
dont have etc/mail ?
2003-12-18 08:21:19 anonymous2 [Reply | View]
what do i have to do to get an etc/mail/sendmail.cf ?
-
Error Sending Messages
2003-12-16 19:31:47 anonymous2 [Reply | View]
This is a great tutorial, and I have had success in starting the sendmail server, but I keep getting any emails I sent bounced back to me. When I type in:
[netblock-66-159-241-60:~] michaeljurewitz% mail michaeljurewitz
Subject: Hello
Hey.
.
EOT
and then check my mail, the messages gets returned to me with the following info:
Message 1:
From MAILER-DAEMON Tue Dec 16 19:29:20 2003
Date: Tue, 16 Dec 2003 19:29:20 -0800 (PST)
From: Mail Delivery Subsystem <MAILER-DAEMON@netblock-66-159-241-60.dslextreme.com>
To: michaeljurewitz@netblock-66-159-241-60.dslextreme.com
MIME-Version: 1.0
Content-Type: multipart/report; report-type=delivery-status;
boundary="hBH3TKZQ001295.1071631760/netblock-66-159-241-60.dslextreme.com"
Subject: Returned mail: see transcript for details
Auto-Submitted: auto-generated (failure)
This is a MIME-encapsulated message
--hBH3TKZQ001295.1071631760/netblock-66-159-241-60.dslextreme.com
The original message was received at Tue, 16 Dec 2003 19:29:20 -0800 (PST)
from michaeljurewitz@localhost
----- The following addresses had permanent fatal errors -----
michaeljurewitz
(reason: 553 5.1.8 <michaeljurewitz@netblock-66-159-241-60.dslextreme.com>... Domain of sender address michaeljurewitz@netblock-66-159-241-60.dslextreme.com does not exist)
(expanded from: michaeljurewitz)
----- Transcript of session follows -----
... while talking to localhost:
>>> MAIL From:<michaeljurewitz@netblock-66-159-241-60.dslextreme.com> SIZE=41
<<< 553 5.1.8 <michaeljurewitz@netblock-66-159-241-60.dslextreme.com>... Domain of sender address michaeljurewitz@netblock-66-159-241-60.dslextreme.com does not exist
501 5.6.0 Data format error
--hBH3TKZQ001295.1071631760/netblock-66-159-241-60.dslextreme.com
Content-Type: message/delivery-status
Reporting-MTA: dns; netblock-66-159-241-60.dslextreme.com
Arrival-Date: Tue, 16 Dec 2003 19:29:20 -0800 (PST)
Final-Recipient: RFC822; michaeljurewitz@netblock-66-159-241-60.dslextreme.com
Action: failed
Status: 5.1.8
Diagnostic-Code: SMTP; 553 5.1.8 <michaeljurewitz@netblock-66-159-241-60.dslextreme.com>... Domain of sender address michaeljurewitz@netblock-66-159-241-60.dslextreme.com does not exist
Last-Attempt-Date: Tue, 16 Dec 2003 19:29:20 -0800 (PST)
--hBH3TKZQ001295.1071631760/netblock-66-159-241-60.dslextreme.com
Content-Type: message/rfc822
Return-Path: <michaeljurewitz>
Received: (from michaeljurewitz@localhost)
by netblock-66-159-241-60.dslextreme.com (8.12.9/8.12.2/Submit) id hBH3TKZP001295
for michaeljurewitz; Tue, 16 Dec 2003 19:29:20 -0800 (PST)
Date: Tue, 16 Dec 2003 19:29:20 -0800 (PST)
From: Michael Jurewitz <michaeljurewitz>
Message-Id: <200312170329.hBH3TKZP001295@netblock-66-159-241-60.dslextreme.com>
To: michaeljurewitz
Subject: Hello
Hey.
--hBH3TKZQ001295.1071631760/netblock-66-159-241-60.dslextreme.com--
Can anyone offer me some help as to how to get around this? Or educate me as to the source of my problem? Thanks!
-Mike
Sinjin5@mac.com
-
No such file of directory
2003-11-18 21:27:29 anonymous2 [Reply | View]
When I tried to create the back up I got the following message:
[Chazans-Computer:/private/etc/mail] chazan% sudo cp -p sendmail.cf sendmail.cf.bak
cp: sendmail.cf: No such file or directory
So, then I tried checking the contents of the directory:
[Chazans-Computer:/private/etc/mail] chazan% ls
access access.db
It seems I don't have sendmail.cf altogether. Any suggestions of how to obtain it. I installed Panther recently, would that have anything to do with it. Thank you! -
No such file of directory
2003-12-16 15:44:27 anonymous2 [Reply | View]
I had the same prob. I am assuming you guys are using Panther rather than Jaguar. Apple has replaced sendmail with PostFix hense the missing configurations. Postfix does offer a sendmail-ish interface (including the sendmail command). For more info log-on to www DOT postfix DOT org
A D I -
No such file of directory
2003-11-29 08:24:02 duesi [Reply | View]
I don't even have a /private/etc/mail directory! I'm not totally sure, but it seems that Panther comes with a new built-in mail server called postfix instead of sendmail.
BTW: I know that this article is about learning how to use the terminal. But if you want to set up your sendmail the easy way, try http://www.macupdate.com/info.php/id/12310 -
No such file of directory
2003-11-29 08:23:25 duesi [Reply | View]
I don't even have a /private/etc/mail directory! I'm not totally sure, but it seems that Panther comes with a new built-in mail server called postfix instead of sendmail.
BTW: I know that this article is about learning how to use the terminal. But if you want to set up your sendmail the easy way, try http://www.macupdate.com/info.php/id/12310
-
Directory Question
2003-11-09 08:04:59 anonymous2 [Reply | View]
In Part 1 of 'Learning the Terminal in Jaguar' crontab is accessed in /private/etc/crontab. In Part 2 the path used is /etc/crontab from Chris' home directory. Are these two directories, private and etc, somehow linked?
-
Sendmail, doesn't
2003-11-04 15:23:09 anonymous2 [Reply | View]
I see "connection refused by local host" when I use
"tail /var/log/mail.log"
Can you tell me what I might have done wrong ?
Thanks,
Ryan
vri2i@mac.com
-
deleting mbox
2003-09-12 07:32:06 anonymous2 [Reply | View]
I deleted my mbox (you say you can safely do this) and now sendmail refuses to send anything.
-
Nice article
2003-09-05 16:15:41 anonymous2 [Reply | View]
Thanks. A good help.
I as well initially couldn't redirect my mail to an external address so I could read it via Mail.app, (ISP didn't like mail coming from jaguar.localhost)
What I did was to reconfigure the sendmail.cf file (see http://www.macdevcenter.com/pub/a/mac/2002/09/10/sendmail.html?page=2) with these additional directives:
MASQUERADE_AS(mydomain.com)dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`masquerade_entire_domain')dnl
Then edited the resulting file to add a valid domain name to the line beginning with DM as in DMvaliddomain.com
-
Problem with sendmail
2003-08-20 07:01:15 anonymous2 [Reply | View]
Interesting article. I can't get the mail command to work, though. Running 10.2.6, I used the "sudo chmod g-w /" command to try & get sendmail running.
Entries in mail.log show this error:
Aug 20 08:40:37 Powerbook sendmail[1530]: h7KDebKA001530: from=pat, size=28, class=0, nrcpts=1, msgid=<200308201340.h7KDebKA001530@powerbook.local>, relay=pat@localhost
Aug 20 08:40:42 Powerbook sendmail[1530]: h7KDebKA001530: to=pat, ctladdr=pat (501/20), delay=00:00:05, xdelay=00:00:05, mailer=relay, pri=30023, relay=localhost.local. [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost.local.
Any help would be appreciated.
-
Problem with sendmail
2003-09-10 11:44:28 anonymous2 [Reply | View]
I got the same message. So I went back and looked at my hostconfig file. I had put lower case -yes- in the MAILSERVER line.
When I changed this, stopped and restarted Sendmail, I got this error message:
Starting mail services
451 4.0.0 /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
so I sudo chmod g-w / in the etc/mail directory.
That worked.
-
Sending mail to my email address
2003-07-07 07:21:33 anonymous2 [Reply | View]
How do I send the mail root recieves to my inbox instead of having to check those messages through the terminal app?
Great tutorial though.
-
problems with sendmail
2003-06-13 06:22:22 anonymous2 [Reply | View]
I still have problems with sendmail, I'm not receiving any email, here what the log file is tell me
sendmail[320]: NOQUEUE: 0: fl=0x0, mode=20666: CHR: dev=2/947076, ino=34843396, nlink=1, u/gid=0/0, size=0
sendmail[320]: NOQUEUE: 3: fl=0x2, mode=140000: SOCK [0]->[[UNIX: /var/run/syslog]]
sendmail[320]: NOQUEUE: SYSERR(root): fill_fd: before readcf: fd 2 not open: Bad file descriptor
sendmail[320]: NOQUEUE: 0: fl=0x0, mode=20666: CHR: dev=2/947076, ino=34843396, nlink=1, u/gid=0/0, size=0
sendmail[320]: NOQUEUE: 1: fl=0x1, mode=20666: CHR: dev=2/947076, ino=34843396, nlink=1, u/gid=0/0, size=0
sendmail[320]: NOQUEUE: 3: fl=0x2, mode=140000: SOCK [0]->[[UNIX: /var/run/syslog]]
sendmail[332]: File descriptors missing on startup: stdin, stdout, stderr; Bad file descriptor
sendmail[335]: starting daemon (8.12.9): queueing@01:00:00
sendmail[451]: h5DCPNvC000451: from=pascal, size=52, class=0, nrcpts=1, msgid=<200306131225.h5DCPNvC000451@pascal-goffins-computer.local>, relay=pascal@localhost
sendmail[451]: h5DCPNvC000451: to=pascal, ctladdr=pascal (501/20), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30028, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
So if somebody can help me I would be very happy !
pascal
-
Problem with "Netinfo and Sendmail"
2003-06-03 02:48:09 anonymous2 [Reply | View]
I think the tutorial is great and very easy to follow, but alas, when I pasted the line:
sudo niutil -create . /locations/sendmail
and the second, longer line, the terminal hopped, just like
it returned itself.
Later when I tried to send the mail to myself, it didn't
arrive. I assume it's because sendmail couldn't read the
config file.
Is there any way I can fix this?
Thanks
John Eley
-
It works!
2003-05-19 03:04:41 anonymous2 [Reply | View]
I have had very little problem executing the steps you show. Thank you! And now that it's 3 am, I think I will resume tomorrow morning.
-
sendmail doesn’t work after the 3-3-03 Security and 10.2.5 Upadate
2003-04-26 16:03:34 anonymous2 [Reply | View]
problem 1 :
First I got this message :
« [Ordinateur-de-J-rg-Siegmund:/private/etc] jrgsiegm% can not chdir(/var/spool/clientmqueue) …
solution :
my directory is called « mqueue » and not « clientmqueue », so I changed « submit.cf » in /private/etc/mail with the pico-command.
First I added in page 3 the same thing as in sendmail.cf :
« ODontBlameSendmail=GroupWritableDirPathSafe » :
# level 10 config file format
V10/Berkeley
# override file safeties - setting this option compromises system security,
# addressing the actual file configuration problem is preferred
# need to set this before any file actions are encountered in the cf file
#O DontBlameSendmail=safe
O DontBlameSendmail=GroupWritableDirPathSafe
# default LDAP map specification
# need to set this now before any LDAP maps are defined
#O LDAPDefaultSpec=-h localhost
And than I changed the name of the queue directory : « mqueue » instead of « clientmqueue » :
# queue directory
O QueueDirectory=/var/spool/mqueue
Then I tested it :
[Ordinateur-de-J-rg-Siegmund:/private/etc] jrgsiegm% mail jrgsiegm
Subject: testtt
eeee
.
EOT
[Ordinateur-de-J-rg-Siegmund:/private/etc] jrgsiegm% can not chdir(/var/spool/mqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
Solution :
chmod u-s /usr/sbin/sendmail
chmod g+s /usr/sbin/sendmail
Verification :
before :
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% ls -l
total 31480
« … »
-r-sr-xr-x 1 root smmsp 588984 Apr 23 10:10 sendmail
« … »
after :
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% ls -l
total 31480
« … »
-r-xr-sr-x 1 root smmsp 588984 Apr 23 10:10 sendmail
« … »
test :
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% mail jrgsiegm
Subject: ed
dd
.
EOT
[Ordinateur-de-J-rg-Siegmund:/usr/sbin] jrgsiegm% collect: Cannot write ./dfh3Q984fv000846 (bfcommit, uid=501, gid=25): Permission denied
queueup: cannot create queue temp file ./tfh3Q984fv000846, uid=501: Permission denied
I have to go on :
Problem :no permission on
[Ordinateur-de-J-rg-Siegmund:/var/spool]
jrgsiegm% ls
Faxes appkit cups lock lpd mqueue output printing
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% ls -l
total 0
« … »
drwxr-x--- 2 root wheel 68 Mar 3 22:10 mqueue
« … »
solution :
changing permissions on « mqueue with chmod :
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% sudo chmod 770 mqueue
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% ls -l
« … »
drwxrwx--- 2 root wheel 68 Mar 3 22:10 mqueue
« … »
test :
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% mail jrgsiegm
Subject: yyyyy
ddd
.
EOT
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% can not write to queue directory /var/spool/mqueue/ (RunAsGid=25, required=0): Permission denied
solution : another chmod :
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% sudo chmod 777 mqueue
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% ls -l
« … »
drwxrwxrwx 2 root wheel 68 Apr 26 19:54 mqueue
« … »
test
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% mail jrgsiegm
Subject: I’m tired
yeah
.
EOT
[Ordinateur-de-J-rg-Siegmund:/var/spool] jrgsiegm% mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/jrgsiegm": 1 message 1 new
>N 1 jrgsiegm@ordinateur- Sat Apr 26 19:54 16/801 "zert"
&
Message 1:
From jrgsiegm@ordinateur-de-j-rg-siegmund.local Sat Apr 26 19:54:16 2003
Date: Sat, 26 Apr 2003 19:54:15 +0200 (CEST)
From: Jörg Siegmund <jrgsiegm@ordinateur-de-j-rg-siegmund.local>
To: jrgsiegm@ordinateur-de-j-rg-siegmund.local
Subject: I’m tired
yeah
& q
Saved 1 message in mbox
-
MAILHOST not found in hostconfig file
2003-04-24 20:28:50 anonymous2 [Reply | View]
Your tutorial in part 2 instructs me to change the MAILSERVER=-NO- to MAILSERVER=-YES-, but that command line is missing. Should I add it or back away before my G4 spontaneously combusts? The tutorial is great.
-
MAILHOST not found in hostconfig file
2003-04-25 09:24:33 Chris Stone |
[Reply | View]
Yep, adding it in will be OK. However, I'm a little surprised it's not in there to begin with. I'm wondering if the sendmail startup script that this line references is there. Do you have this?
/System/Library/StartupItems/Sendmail/Sendmail
If so, you should be all right. If not, then you'll have a bit more work to do getting it in there (and I'd be curious to know the history of your OS installation.)
Glad you're enjoying the tutorial...
--Chris
-
/clientmqueue/ No such file or directory
2003-04-23 19:24:28 mstrstvns [Reply | View]
my mail.log says:
NOQUEUE: SYSERR(matthew): can not chdir(/var/spool/clientmqueue/): No such file or directory
It says this numerous times. Should I just manually make this directory or what? Or should I change the permissions to this, or is clientmqueue simply spelled wrong. Any correct advice would be appreciated -
/clientmqueue/ No such file or directory
2003-04-24 09:18:13 Chris Stone |
[Reply | View]
I'm not sure why you're having this problem if you're running at least 10.2, but you can try this:
cd /var/spool/
sudo mkdir clientmqueue
sudo chown smmsp:smmsp clientmqueue/
sudo chmod 770 clientmqueue/
(This makes the new directory, sets its owner and group both to "smmsp", and sets its permissions to allow read, write, and list by the owner and group, but no permissions for anyone else. When you're done, the long list of the directory should look something like this:
drwxrwx--- 2 smmsp smmsp 68 Apr 24 08:56 clientmqueue
Hope that helps...
--Chris -
After tail and sudo ls -l /var/spool/clientmqueue I have...
2003-04-24 15:44:30 mstrstvns [Reply | View]
I initially followed some of the instructions left in user comments to try to solve this problem. I first changed the permissions as per the "can not chdir" comment:
With the result I posted following that comment, that is...no such luck mailing.
Then, on a whim, I followed the instructions on
"Try repairing permissions."
No dice, again. So I posted a question and followed Chris_Stone's instructions and got a bit of a result and I am now hopefully half way there. So here is my resulting mail.log and directory long list, both of which DO NOT JIVE with the hoped for mail.log and drwxrwx--- file permissions
(BTW: I am using OS 10.2.5)
First one sees here my initial attempt to send mail to myself . Then the post posting advice from Chris_Stone (I edited this mail.log to shorten it).
Apr 23 03:15:03 mstrstvnss-Computer sendmail[971]: gethostbyaddr(10.0.1.23) failed: 3
Apr 23 20:49:05 mstrstvnss-Computer sendmail[1021]: NOQUEUE: SYSERR(matthew): can not chdir(/var/spool/clientmqueue/): No such file or directory
Apr 24 16:52:49 mstrstvnss-Computer sendmail[700]: h3OLqnEq000700: from=matthew, size=33, class=0, nrcpts=1, msgid=<200304242152.h3OLqnEq000700@mstrstvnss-computer.local>, relay=matthew@localhost
Apr 24 16:52:49 mstrstvnss-Computer sendmail[700]: h3OLqnEq000700: to=matthew, ctladdr=matthew (501/20), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30027, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
-rw-rw---- 1 matthew smmsp 6 Apr 24 16:52 dfh3OLqnEq000700
-
Fianlly there is something for the MAC
2003-04-08 03:13:56 anonymous2 [Reply | View]
Great job!
These tutorials are great!
I hope you soon include a MySql tutorial for the Mac OS X.
Ciao,
Laurent
-
"can not chdir"
2003-03-31 17:49:27 anonymous2 [Reply | View]
Thank you so much for your great article! I almost made it thru the sendmail process, but am getting this error I cannot resolve. Below are the last few pertinent lines of my mail.log:
Mar 31 17:39:36 Dana-Nielsens-Computer sendmail[979]: starting daemon (8.12.7): SMTP+queueing@01:00:00
Mar 31 17:39:36 Dana-Nielsens-Computer sendmail[980]: NOQUEUE: SYSERR(root): can not chdir(/var/spool/clientmqueue/): No such file or directory
Mar 31 17:41:44 Dana-Nielsens-Computer sendmail[987]: NOQUEUE: SYSERR(dananiel): can not chdir(/var/spool/clientmqueue/): No such file or directory
Do you know what's going wrong?
Thanks again!!
Dana -
"can not chdir"
2003-04-04 17:24:51 anonymous2 [Reply | View]
The problem you are having is most likely the result of incorrect permissions on /usr/sbin/sendmail. The sendmail program is supposed to set group id not set user id.
Try ls -l /usr/sbin/sendmail. If the permissions listed at the beginning of the line are: -r-sr-xr-x that is your problem.
To fix it, issue the following commands:
chmod u-s /usr/sbin/sendmail
chmod g+s /usr/sbin/sendmail
After this an ls -l /sendmail should show permissions as:
-r-xr-sr-x 1 root smmsp 584888 Feb 22 16:53 /usr/sbin/sendmail
-
Unclear on checking old messages
2003-03-26 00:29:58 anonymous2 [Reply | View]
I am unsure how to look at your old messages.
I am also unclear on how to delete these messages.
Could someone please supply me with the specific lines to enter.
Thanks much,
Jason
-
Help - sendmail starts only manually
2003-03-19 10:42:26 macmartin [Reply | View]
Please help me - I got stuck again
sendmail is working allright, but it dosn´t startup when booting, although i have turned
"MAILSERVER=-YES-" on in my /etc/hostconfig.
When I start my machine I get "Starting Mailservices" in the status line of the welcomescreen just
before the login-screen, but after loging in sendmail is not running.
After
"sudo /System/Library/StartupItems/Sendmail/Sendmail start" in the Terminal I get
"Starting mailservices"
and everything is allright.
Have I messed anything up?
I got no idea, what could be the reason, so please give me some --help
Thanks a lot
macmartin
-
mails from the periodic scripts sometimes from root and sometimes from user ?
2003-03-16 13:19:50 macmartin [Reply | View]
why is there a difference in the "from" entry when I get mail from the periodic scripts (daily, weekly, monthly).
when the script is run by cron the "from" is "root@g4x.local"
when the script is run with the sudo periodic daily command the "from" ist "martin@g4x.local"
why is this - isn´t in the script defined, that the scipt is run by th users root (no matter if the script is started by con or manually ?
Thanks for the information -
I´d really like to unserstand this
Any help would be appreciated.
Excuse me if my English is not so good - I hope it can be understood.
macmartin - Nuernberg - Germany
-
Can't send mail through ROOT
2003-03-15 12:24:00 anonymous2 [Reply | View]
It was all working fine, then stopped after an update. The sendmail.cf looks unchanged and has the date when I changed it for this tutorial. When I send mail to root, I get this:
[LapMac:~] edillon% can not chdir(/var/spool/clientmqueue/): No such file or directory.
Looks like a file is missing so mail can't be redirected?
What file, and how to replace it? -
maybe this can help
2003-03-16 13:28:29 macmartin [Reply | View]
Here you see a listing of my /var/spool/ directory
[g4x:/var/spool] martin% ll
total 0
drwxr-xr-x 7 root wheel 238 Feb 5 08:04 .
drwxr-xr-x 20 root wheel 680 Mar 16 19:13 ..
drwxrwxr-x 2 daemon daemon 68 Jul 14 2002 Faxes
drwxrwx--- 3 smmsp smmsp 102 Mar 16 20:30 clientmqueue
drwx------ 4 daemon admin 136 Mar 13 17:56 cups
drwxr-xr-x 6 root wheel 204 Mar 16 19:13 lock
drwxr-x--- 22 root wheel 748 Mar 16 21:55 mqueue
my mails are queued in the "mqueue" directory and not in the "clientmqueue"
maybe the update has reset or changed some settings and this can help you to find out which these are
theres a tool which might also be helpfull
the "webmin" configuration programm
download for free on www.webmin.com
you also need to download the sendmail.wbm module
this enables you to access all setting of sendmail (and a lot of other services and deamons run on Mac OS X via a webbrowser
hope it helps
macmartin -
Can't send mail through ROOT
2003-03-15 14:37:54 edillon [Reply | View]
Follow-up: Found I couldn't send mail to myself or any other user without getting the aformentioned message and no mail.
Tried actually setting up a directory named "clientmqueue" with permissions 0777 and the error messge is gone but no mail, and groups of hex character sets are piling up in the directory. Assume they are mail messages or pointers to same. The security update really fouled up my OS X terminal mail function!
-
Delete Command
2003-03-13 16:15:51 tjtrujillo [Reply | View]
Ok, I got send mail running and the periodic's running. Now how do I easily delete each test email not to mention the periodic daily's. I noticed that I can type the D command for as many emails as there are but there has to be an easier way.
Tom
-
3-3-03 Security Upadate & Sendmail
2003-03-10 12:02:12 Chris Stone |
[Reply | View]
Please read this if sendmail has stopped working after applying the 3-3-03 security update:
The update renames the current sendmail.cf file to sendmail.cf.bak and then installs a new sendmail.cf, which is no different than your previous unedited sendmail.cf. So, you could either edit the new file again, or replace it back with the backed up file. This would do it:
#First, back up the new default file:
sudo mv sendmail.cf sendmail.cf.default
#Then rename your previous file to put it back in place:
sudo mv sendmail.cf.bak sendmail.cf
#And restart sendmail:
sudo /System/Library/StartupItems/Sendmail/Sendmail restart
Or, if you chose the chmod method of handling sendmail's security requirement, you'll need to make / non group-writable again:
sudo chmod g-w /
Again, these "fixes" apply to getting sendmail working for the purposes of the tutorial, but not necessarily in a full, working mail server environment.
--Chris -
3-3-03 Security Upadate & Sendmail
2003-04-23 21:44:47 anonymous2 [Reply | View]
Chris, I'm still getting the "Connection refused by localhost" messages in the mail log. Any other ideas?
Thanks! -
3-3-03 Security Upadate & Sendmail
2003-04-24 09:37:47 Chris Stone |
[Reply | View]
Was it working before you ran the update? If so, I would just follow the tutorial steps again, making sure everything is still in place.
--Chris
-
connection refused by localhost?
2003-03-09 14:28:27 dv8godd [Reply | View]
could this error be attached in some way to the latest security update!?!? The last time sendmail worked for me was just before I installed the latest security update... since then, I've gotten this error. -
connection refused by localhost?
2005-08-10 14:22:03 clintjd [Reply | View]
I was having this exact same problem. Most replies you see will tell you to make sure that the sendmail daemon is running. This is not necessarily correct, since for security reasons you may not want the daemon running, although it will probably fix your problem. I found the problem was actually with the submit.cf file. I found 3 options to correct this problem.
1.) completely remove, or rename the submit.cf file
2.) generate a new submit.cf file using m4
3.) copy your sendmail.cf file over your submit.cf file so they are exactly the same.
all 3 of these worked for me. Hope this is helpful to someone else. -
connection refused by localhost?
2003-04-24 13:28:01 anonymous2 [Reply | View]
I'm getting a similar message right after a fresh install of 10.25. The funny thing is that it worked fine for a while and then stopped. I'm getting the following in the mail.log:
Apr 24 16:17:58 localhost sendmail[1608]: h3OKHwro001608: from=admin, size=29, class=0, nrcpts=1, msgid=<200304242017.h3OKHwro001608@webserver.acton.org>, relay=admin@localhost
Apr 24 16:17:58 localhost sendmail[1608]: h3OKHwro001608: to=admin, ctladdr=admin (501/20), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30025, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
Is it necessary to have a hostname in the hostconfig file or is -automatic- ok?
Thanks,
Dave
-
Ditto on connection refused by localhost
2003-03-09 12:43:05 anonymous2 [Reply | View]
this was all working fine for me for a while...
now it's dead with the same error as the previous poster mentioned...
Mar 9 15:30:14 stubby sendmail[11320]: h29KUEtZ011320: from=radd, size=29, class=0, nrcpts=1, msgid=<200303092030.h29KUEtZ011320@stubby.local>, relay=radd@localhost
Mar 9 15:30:14 stubby sendmail[11320]: h29KUEtZ011320: to=radd, ctladdr=radd (501/20), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30024, relay=localhost [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by localhost
no idea at all why it just stopped working this week on Wednesday.
-
Connection refused by localhost
2003-03-09 06:53:36 anonymous2 [Reply | View]
"Connection refused by localhost"
This seems to error I am getting when I use the tail command, doe this mean I did not set up sendmails permissions properly? No mail for root.
Brian Knoblock
-
Security Update 3/3/03
2003-03-06 19:04:21 baltwo [Reply | View]
What effect does this update have on this procedure? There's some words at MacFixIt that says it may foul up the sendmail, sendmail.cf, and submit.cf files. Possibly the same kind of thing that happened when update 10.1.5 came out.
If there are major changes, are you planning an update, or should we just go through these steps again?
-
Thanks for 1 & 2! When can we expect 3?
2003-02-27 12:51:47 anonymous2 [Reply | View]
1 & 2 were great! I especially loved the B.Franklin analogy: Very good. When do you expect to publish 3?
7im
-
try repairing permissions
2003-02-24 17:59:49 anonymous2 [Reply | View]
In case anyone's interested, the error I reported getting a while ago relating to local-host-names went away after I 'repaired' my permissions using Apple's Disk Utility (because I'd just installed the latest Safari beta, which reccommends doing this afterwards). Probably worth doing if you're technically ignorant like me & getting terminal errors you can't understand after following the directions in these articles.
-
Representing A Space
2003-02-20 18:39:29 anonymous2 [Reply | View]
How do you get the terminal to represent a space literally?
Say, to get into the directory "Desktop Folder". The space makes "Folder" an argument to "Desktop" and return the error "too many arguments"... -
Representing A Space
2003-07-02 22:43:48 humbi [Reply | View]
you need to "escape" the space by using the escape character / so it would look like this "Desktop/ Folder" without the quotes of course. good luck -
Representing A Space
2003-07-03 08:48:55 anonymous2 [Reply | View]
Actually, the escape character is a backslash "\", so you wold escape that directory as Desktop\ Folder. Also, an alternative to escaping individual characters would be to enclose the entire text string in qutoes, thus
cd "Desktop Folder"
for example.
--Chris
-
POP3 server: Qpopper
2003-02-18 19:05:50 anonymous2 [Reply | View]
For those of you who want to run a POP3 server on Jaguar to get Mail.app able to check for local mail, I can only recommend qpopper.
You'll find useful help on how to install qpopper here:
http://www.geektimes.com/macintosh/os/x/10_2/email/qpopper.html
or there:
http://homepage.mac.com/djdawson/Jaguar_UNIX_Mail/UNIX_mail.html
Audran.
-
sendmail will not start
2003-02-10 10:26:27 anonymous2 [Reply | View]
After issuing: sudo /System/Library/StartupItems/Sendmail/Sendmail start
I get the following message:
Starting mail services
451 4.0.0 /etc/mail/sendmail.cf: line 0: cannot open: No such file or directory
Help!
<meged@earthlink.net>
-
local-host-names error
2003-02-08 21:57:45 anonymous2 [Reply | View]
I'm really enjoying these articles, but I have a problem: having modified sendmail.cf and so on, when I issue
sudo /System/Library/StartupItems/Sendmail/Sendmail start
I get the following error:
451 4.0.0 /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
This recurs when I try to send mail.
local-host-names appears to be blank, if that's significant. Help! -
local-host-names error (World writable error)
2003-05-13 08:06:00 anonymous2 [Reply | View]
You have to check the permissions on / and all the subdirectories like /etc, /etc/mail for write permissions. If there is no write permission on / or /etc then give the write permissions and check.
This will set the permissions for every directory sendmail needs to be
non-group writable:
sudo chmod go-w / /etc /etc/mail /usr /var /var/spool
/var/spool/mqueue /private
Check all these permissions are same as below.
drwxr-xr-x 45 root sys 3584 Feb 3 10:24 etc
drwxr-xr-x 2 root mail 512 Feb 3 11:54 mail
-rw-r--r-- 1 root bin 153 Sep 30 10:24 Mail.rc
-rw-r--r-- 1 root bin 1201 Sep 30 10:24 aliases
-rw-r--r-- 1 root mail 0 Oct 10 04:58 aliases.dir
-rw-r--r-- 1 root mail 1024 Oct 10 04:58 aliases.pag
-rw-r--r-- 1 root bin 5266 Sep 27 19:07 helpfile
-rw-r--r-- 1 root bin 0 Sep 24 2001 local-host-names
-rw-r--r-- 1 root bin 1829 Sep 30 10:19 mailx.rc
-r--r--r-- 1 root bin 34924 Sep 30 10:24 main.cf
-r--r--r-- 1 root bin 35625 Oct 1 05:09 sendmail.cf
-r--r--r-- 1 root other 35625 Oct 1 05:09
sendmail.cf.pre110615-05
lrwxrwxrwx 1 root root 8 Sep 30 10:24 sendmail.hf ->
helpfile
-r--r--r-- 1 root bin 35625 Sep 30 10:24 subsidiary.cf
-rw-r--r-- 1 root bin 5 Sep 24 2001 trusted-users -
local-host-names error (World writable error)
2003-10-22 17:22:26 anonymous2 [Reply | View]
I have the same problem but this solution doesn't work for me. When I try to start sendmail I get this message:
451 4.0.0 /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
What does it means?
Please help!
-
Can't read mail...
2003-02-05 20:02:13 anonymous2 [Reply | View]
So, I can send mail, /var/log/mail.log shows that sendmail processed the mail, but mail always says "no mail for root".
Any ideas?
-
Sendmail not working
2003-02-05 14:45:40 anonymous2 [Reply | View]
Great article, everthingwork until I tried to sen mail and I get this in return and no mail.
[StephensG4:/etc] stephen% etc/mail/sendmail.cf: line 0: cannot open: No such file or directory
Any help would be greatly appreciated
-
DontBlameSendmail error corrected
2003-02-02 23:56:59 anonymous2 [Reply | View]
Ignore my previous mail. I realized that I had typed a 0 (numeral zero) rather than an O (Capital letter).
The program works well. Thanks for the great tutorial. I found your method easy to follow.
-
DontBlameSendmail editing failed
2003-02-02 22:29:08 anonymous2 [Reply | View]
When I attempted to run sendmail, the following error message was returned by Terminal
Starting mail services
554 5.0.0 /etc/mail/sendmail.cf: line 78: unknown configuration line "0 DontBlameSendmail=GroupWritableDirPathSafe"
451 4.0.0 /etc/mail/sendmail.cf: line 93: fileclass: cannot open '/etc/mail/local-host-names': Group writable directory
[12-213-153-177:/etc/mail] alan% sudo /System/Library/StartupItems/Sendmail/Sendmail start
-
Jaguar Part 2
2003-02-02 20:15:57 anonymous2 [Reply | View]
Thanks for the tutorial i went and bought The missingManual Second edition. My mail message and report are working Perfectlly I can't wait for Part 3 to be able to learn how to read the report.
Once more thanks a lot.
Rene Aubourg
-
clientmqueue error
2003-02-01 15:45:31 anonymous2 [Reply | View]
When I first ran this command:
sudo /System/Library/StartupItems/Sendmail/Sendmail start
I got an error messge complaining about a 'clientmqueue' directory not being present.
After rebooting, and even after re-configuring hostconfig to NOT start sendmail at bootup, I can now no longer reproduce this error. So I'm afraid I cannot even give the exact error message.
Sendmail (if turned on again) */seems/* to work as far as I can see (and I haven't really looked yet.
Does anyone know what this is about or why this is and/or did anyone get the same error?
Many thanks,
rop
-
CRON assist
2003-01-29 17:49:07 zeker00 [Reply | View]
Having read your articles, I now find it prudent to go buy <at least!> the 'Learning Unix for Mac OS X', 'Mac OS X in a Nutshell', and 'Learning the Mac OS X terminal' books! Your articles are helping me along the road! I have a desire to automate thru CRON copying ascii flat-files created on an hourly basis - filenames such as "datafile_01.dat", "datafile_02.dat", etc - from one volume/filesystem to another. And I will have to do it as root. Will be watching for your follow-on articles that may give me some guidelines for doing this cleanly! THANKS!
-
mail to read unix mail
2003-01-29 04:16:15 anonymous2 [Reply | View]
how can I get mail.app to read the local mail, have tried the earlier suggestion with localhost as the pop server and my shortname and passwoard as the user and password, port 110 open.----Doesn't work.
I have DynamicDNS installed.
Is this possible to do?
-
.forward and External mail address
2003-01-29 03:40:59 anonymous2 [Reply | View]
If in the root .forward address, I put an external email address it works.
What about forwarding .root to .myname and in the .forward myname file putting an external mail address, is this possible.
I have tried and can see the local mail under myname, but from here it fails to forward to an external email address - is this possible?
-
Another caveat to the chmod method
2003-01-28 00:57:00 rlotz [Reply | View]
Originally I liked the chmod method, I'd rather not have / group writable. However, taking group write privs off will disable the ability to change the name of the HD in the finder/desktop. It seems that (for me) it also prevents the remaining space left on the device from being displayed when show "icon info" is selected.
I had to chmod g+w / and then log out and back in to restore the free space information.
-
Simpler mail config
2003-01-26 17:48:04 rhook [Reply | View]
Last year I did quite a bit of thinking and exploration to get sendmail up and running under Jaguar, and found a somewhat simpler way of getting things working. I've summarised the results at <http://homepage.mac.com/rhook/arc03.html#tag11>. The only other tricky thing not mentioned in that mumbling monologue is that, while on-line with my cable service, I needed to tinker with the contents of /etc/mail/local-host-names, as described in the main part of <http://homepage.mac.com/rhook/>.
Unfortunately too, for those who wonder, the current version of Mail.app won't directly read Unix mail, it needs to talk to some local server such as a POP server to get its mail.
-
Thanks! and a question
2003-01-26 14:49:16 anonymous2 [Reply | View]
Thank you for the carefully crafted tutorial - I learned a lot.
Only made one mistake: In copying one of the niutil lines I left off the last part; but it was not too tough to figure it out and recover. In using tail I did notice these lines in the log:
Jan 26 17:15:02 LapMac sendmail[786]: gethostbyaddr(192.168.0.7) failed: 3
Jan 26 17:15:03 LapMac sendmail[807]: gethostbyaddr(192.168.0.7) failed: 3
These are repeated several times; whats my problem?
Thanks again...
-
Mount0n and zBooterMnt
2003-01-26 07:32:42 rw [Reply | View]
So what are these directories Mount01, etc., and zBooterMnt mentioned in the daily report? They are in /var/tmp, and on my machine are dated 27 July 2002. That seems like an awfully long time for something to be hanging out in the tmp folder.
-
Thank You
2003-01-26 04:40:33 anonymous2 [Reply | View]
A first class tutorial, especially the simplicity of setting up sendmail. Looking forwards to more...
-
Local mail access
2003-01-25 10:41:21 anonymous2 [Reply | View]
You've always had the ability to access local mail accounts. Tell Mail.app to create an account for a POP3 account, use the POP server `localhost`, your login is your short username, and your password is your login password. However, you need to be sure that port 110 is open in the Sharing PreferencePane. That should do it.
-- Rob -
Local mail access
2003-01-26 06:10:00 anonymous2 [Reply | View]
Hm, I don't get Port 110 to work. As I understand it, I have to enable Port 110 in the Firewall-Tab of the SysPrefPane "Sharing", if I have the Firewall activated.
But Mail still tells me that it cannot use Port 110...
Anyone has an idea?
-
Command not found
2003-01-25 09:46:08 anonymous2 [Reply | View]
When running the periodic daily script I get this message. I looked and /usr/sbin/periodic is right where it's supposed to be.
/usr/sbin/periodic: dialy_output: command not found
/usr/sbin/periodic: weekly_output: command not found
/usr/sbin/periodic: monthly_output: command not found
Looks like I haven't been running my dialy maintenance scripts. Glad I found this.
-
sending to outside addresses?
2003-01-25 08:04:09 anonymous2 [Reply | View]
Thanks for the easy-to-follow walkthrough. Is there any way to get the local sendmail to send the reports to an external address? I tried just entering the full email address, but it bounced.
On a related note, earlier versions of Mail.app let you set up a "Unix mail" account that let you read mail in /var/mail/[username]. Is there any way to bully the Jag Mail.app into doing this? -
sending to outside addresses?
2003-03-26 00:32:23 anonymous2 [Reply | View]
This also worked for me. Saved me from having to remember to check the mail to keep my sys from filling up.
Just go to the .forward file and enter your email address. -
sending to outside addresses?
2003-01-26 07:26:26 rw [Reply | View]
I just put my full email address (e.g., user@domain.com) in my .forward file, and it works just fine.






However still paranoid about wrecking something that needs to be working tomorrow, and would like to know if my assumption is correct and how/why I've got the .applesaved? (I also noticed a heap of similar files in the ls of /private/etc)
Feedback greatly appreciated