LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SENDMAIL Configuration (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-configuration-119622/)

xianzai 11-24-2003 08:37 PM

SENDMAIL Configuration
 
Hi,

I am designing a web based solution to a problem. This requires me to send email to a user via PHP's mail() function. The only problem is that in order for me to use the mail function, I need to have sendmail running on my computer. I am using RedHat 9, and I have sendmail installed, but when I try to start the service, I get the following error:

Failed to start sendmail :

Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 90: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 567: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
/etc/mail/sendmail.cf: WARNING: dangerous write permissions
[FAILED]
Starting sm-client: /etc/mail/submit.cf: line 525: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]

I need to get sendmail configured, so I can start it as a service, and use PHP's mail() function.

Can anyone help me, please? I have searched everywhere for a solution.

Thank you in advance.

Matt
xianzai

scorpatron 11-25-2003 06:51 PM

ok dude here goes:

Sendmail is an smtp server... it is used for receiving and sending mail...

Now sendmail is by default setup to start automatically with the following settings:

Service is NOT receiving mail from the internet
Service is ONLY sending mail from the local machine

SMTP runs on port 25 by default, so you can access it by typing "telnet localhost 25" in console

(That was to help you understand what it is)



Now.... the problem you're having is with your recieved mail directory... mybe it doesn't exist?... anyways.. heres how mines setup...

/var/mail
owner = root (all permissions)
group = mail (all permissions)
other = all but write
* non recursive

/var/spool/mail
same as above



Your error message tells me that the permissions for your send mail directories are wrong, this can probably be fixed by simply uninstalling and installing sendmail from your redhat cds

I've just started using linux sendmail so I could be wrong :D

scorpatron 11-25-2003 06:52 PM

you didn't delete the 'mail' user group did you?

yapp 11-26-2003 07:45 AM

instead of sendmail, I would advice to use postfix. it's a simple sendmail-compatible mail server, and much more secure. Sendmail uses one big monolithic approach to mail handing; which is a nightmare to secure.

the postfix configuration is also easier to understand.

stanlo 08-02-2004 08:28 AM

It appears that sendmail is complaining about permisions on /. Mine were set to drwxrwxrwx.

From / run ls -ld and they should be :

drwxr-xr-x 25 root root 1024 Jul 21 10:08 .

Once the permisions were set as drwxr-xr-x sendmail worked without any complaints.

Regards

Stan

stickman 08-02-2004 08:30 AM

Check the perms of /etc/mail.

stanlo 08-02-2004 08:34 AM

Hi Stickman.

I did check the perms of /etc/mail and it was the same as the other servers. The only difference I found was the perms on /, and when I changed that to the same perms as my other servers the problem went away.

Stan

linuxlastslonge 08-02-2004 09:40 AM

Quote:

Starting sendmail: 451 4.0.0 /etc/mail/sendmail.cf: line 90: fileclass: cannot open '/etc/mail/local-host-names': World writable directory
451 4.0.0 /etc/mail/sendmail.cf: line 567: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
/etc/mail/sendmail.cf: WARNING: dangerous write permissions
[FAILED]
Starting sm-client: /etc/mail/submit.cf: line 525: fileclass: cannot open '/etc/mail/trusted-users': World writable directory
[FAILED]

okay..... from what i can tell, sendmail can't open these files. either they don't exist or they are world writable, which is a bad thing. first, run:

Code:

make -C /etc/mail
if that doesn't correct the problem, then you'll have to manually check the permissions of your files. what make -C /etc/mail does is it compiles all the files needed for sendmail to run, and auto-sets the permissions that it needs.


hope i could help!!!!!




:Pengy:

linuxlastslonge 08-02-2004 09:42 AM

also, check to make sure you have correct permissions on /etc/mail . or, if all else fail, do as stated above; reinstall sendmail.


All times are GMT -5. The time now is 10:23 AM.