PDA

View Full Version : "mail" doesn't work


Bort
02-24-2002, 09:05 AM
When i try to use the command "mail" in the Terminal, this is what happens:

% mail bernhard
% Subject: Hello there
Hi, nice weather today, isn't it? The sun is shining, and I really feel like taking a long walk.. Would you like to join me?
EOT
% /etc/mail/sendmail.cf: line 81: fileclass: cannot open /etc/mail/local-host-names: Group writable directory

Why do i get this error message? How do i solve the problem?

mervTormel
02-24-2002, 10:08 AM
sendmail is paranoid. it doesn't like the group write permission on the root directory. this will fix it. it is safe.

first, check permissions of the root dir

% ls -ld /
drwxrwxr-t 42 root admin 1384 Feb 22 19:57 /
^
see that w in the group perm mask?

this will remove it

% sudo chmod g-w /

now check your results

% ls -ld /
drwxr-xr-t 42 root admin 1384 Feb 22 19:57 /

now test your mail.

unfortunately, system updates in the past have changed this permission to group-write, so this may need to be repeated after future updates.

Bort
02-24-2002, 10:41 AM
Thank you for your help mervTormel, but it still doesn't work. I recieve the exact same error message.
Note that it is mail that doesn't work, i have never tried to use sendmail. Or is that the same thing?

mervTormel
02-24-2002, 11:49 AM
evidently, sendmail is the disgruntled postal agent.

show us the results of these commands:

ls -ld /
ls -ld /etc
ls -ld /etc/mail

Bort
02-24-2002, 11:55 AM
here it is:

% ls -ld /
drwxr-xr-t 47 root admin 1554 Feb 24 16:30 /

% ls -ld /etc
lrwxr-xr-t 1 root admin 11 Feb 24 16:30 /etc -> private/etc

% ls -ld /etc/mail
drwxrwxr-x 5 root wheel 264 Feb 24 15:11 /etc/mail

mervTormel
02-24-2002, 12:06 PM
see that group writable bit in the /etc/mail directory? need to remove write access from that dir.

this should do it, or get you further:

% sudo chmod g-w /etc/mail

Bort
02-24-2002, 12:11 PM
thanks a lot, now everything works just fine :p