1755443 Members
3551 Online
108833 Solutions
New Discussion юеВ

mail problem

 
SOLVED
Go to solution
Cem Tugrul
Esteemed Contributor

mail problem

Hi forum,
Last week cause of my bad script accidently
made chmod 777 * from / and now i have problem
while sending mail...Also root could not able
to send mail but i fixed it but still users
can not able to send mail when i try to send mail from an ordinary user i am facing such a
kind of error;
$ echo yes|mailx -s "cemokam" ut1ct@mntrankmail01
$ hash map "Alias0": unsafe map file /etc/mail/aliases.db: Permission denied
dbm map "Alias0": missing map file /etc/mail/aliases
queuename: Cannot create "qfKAA16801" in "/var/spool/mqueue" (euid=150): Permission denied

i guess still somewhere somefiles permission
problem on my srv but can not find :-(

Please urgent help,all replies will be submitted points!!!
Our greatest duty in this life is to help others. And please, if you can't
7 REPLIES 7
Gopi Sekar
Honored Contributor

Re: mail problem

Following is the ls -la of my system's /etc/mail directory, as u can see there is no aliases.db but there are other .db files, so if you follow this as template and modify permissions accordingly then you should be ok.

drwxr-xr-x 3 root root 4096 Jun 7 21:43 .
drwxr-xr-x 88 root root 12288 Jun 15 04:08 ..
-rw-r--r-- 1 root root 331 Apr 27 21:43 access
-rw-r----- 1 root root 12288 Jun 7 21:36 access.db
-rw-r--r-- 1 root root 0 Apr 27 21:43 domaintable
-rw-r----- 1 root root 12288 Jun 7 21:36 domaintable.db
-rw-r--r-- 1 root root 5588 Apr 27 21:43 helpfile
-rw-r--r-- 1 root root 64 Apr 27 21:43 local-host-names
-rw-r--r-- 1 root root 0 Apr 27 21:43 mailertable
-rw-r----- 1 root root 12288 Jun 7 21:36 mailertable.db
-rw-r--r-- 1 root root 1035 Apr 27 21:43 Makefile
-rw-r--r-- 1 root root 58075 Jun 7 21:36 sendmail.cf
-rw-r--r-- 1 root root 7077 Apr 27 21:43 sendmail.mc
drwxr-xr-x 2 root root 4096 Jun 7 21:43 spamassassin
-r--r--r-- 1 root root 41344 Apr 27 21:43 submit.cf
-rw-r--r-- 1 root root 952 Apr 27 21:43 submit.mc
-rw-r--r-- 1 root root 127 Apr 27 21:43 trusted-users
-rw-r--r-- 1 root root 0 Apr 27 21:43 virtusertable
-rw-r----- 1 root root 12288 Jun 7 21:36 virtusertable.db

let us know how it goes

Regards,
Gopi
Never Never Never Giveup
Gopi Sekar
Honored Contributor

Re: mail problem

Following is my /var/spool/mail directory structure, check it out:

total 92
drwxrwxr-x 2 root mail 4096 Jun 15 04:35 .
drwxr-xr-x 15 root root 4096 Jun 7 22:06 ..
-rw------- 1 root root 69847 Jun 15 04:35 root
-rw-rw---- 1 xxxx mail 0 Jun 9 21:10 xxxx

Regards,
Gopi
Never Never Never Giveup
Steven E. Protter
Exalted Contributor

Re: mail problem

I have a relatively secure mail server.

So I'm posting my permissions to the /etc/mail files

This should help you set permissions back to a secure level.

[root@shalom ~]# ll /etc/mail | more
total 2256
-rw-r--r-- 1 root root 33470 Jun 15 02:04 access
-rw-r--r-- 1 root root 9680 Jun 8 13:50 access.base
-rw-r--r-- 1 root root 9524 Sep 20 2004 access.base.alternate
-rw-r----- 1 root root 86016 Jun 15 02:04 access.db
-rw-r--r-- 1 root root 22357 Jun 15 02:04 access.sorted.spam
-rw-r--r-- 1 root root 1197334 Sep 20 2004 access.sorted.spam.alternate
-rw-r--r-- 1 root root 66732 Oct 8 2003 access.sorted.spam.backup
-rw-r--r-- 1 root root 19424 Mar 31 19:46 access.sorted.spam.test
-rw-r--r-- 1 root root 22357 Jun 15 01:48 access.spam
-rw------- 1 root root 1433 Feb 19 2004 access.whitelist
-rw------- 1 root root 351 Feb 19 2004 access.whitelist.ip
-rw------- 1 root root 1838 Feb 6 2004 aolstuff
-rw-r--r-- 1 root root 0 Sep 1 2004 domaintable
-rw-r----- 1 root root 12288 Jun 15 02:04 domaintable.db
-rw-r--r-- 1 root root 264426 Jun 12 05:18 donotblock
-rw-r--r-- 1 root root 71 Mar 31 19:36 fixspamlist
-rw-r--r-- 1 root root 1648 May 27 08:45 genericstable
-rw-r----- 1 root root 12288 Jun 15 02:04 genericstable.db
-rw-r--r-- 1 root root 5588 Sep 1 2004 helpfile
-rw-r--r-- 1 root root 64 Sep 1 2004 local-host-names
-rw-r--r-- 1 root root 488 Jan 9 2004 mailertable
-rw-r----- 1 root root 12288 Jun 15 02:04 mailertable.db
-rw-r--r-- 1 root root 1035 Sep 1 2004 Makefile
-rw-r--r-- 1 root root 6230 May 18 2004 require_rdns.m4
-rw-r--r-- 1 root root 59517 Jun 12 04:51 sendmail.cf
-rw-r--r-- 1 root root 59516 Jun 8 13:06 sendmail.cf.bak
-rw-r--r-- 1 root root 58073 Sep 1 2004 sendmail.cf.rpmnew
-rw-r--r-- 1 root root 807 Feb 25 2004 sendmail.domain.mc
-rw-r--r-- 1 root root 8144 Jun 12 04:51 sendmail.mc
-rw-r--r-- 1 root root 2718 Aug 24 2002 sendmail.mc.original
-rw-r--r-- 1 root root 6745 Sep 1 2004 sendmail.mc.rpmnew
-rw-r--r-- 1 root root 8075 Sep 22 2004 sendmail.mc.shalom
-rw-r--r-- 1 root root 4526 Feb 25 2004 sendmail.templete.mc
-rw-r--r-- 1 root root 312 Feb 25 2004 sendmail.timeers.mc
drwxr-xr-x 2 root root 4096 Jun 15 01:18 spamassassin
-rw-r--r-- 1 root root 3842 Mar 31 19:37 spam.ip
-rw------- 1 root root 728 Jun 15 02:16 statistics
-rw-r--r-- 1 root root 1505 Oct 8 2003 steve
-rw-r--r-- 1 root root 39151 Dec 9 2004 submit.cf
-r--r--r-- 1 root root 39114 Sep 18 2003 submit.cf.bak
-r--r--r-- 1 root root 41342 Sep 1 2004 submit.cf.rpmnew
-rw-r--r-- 1 root root 952 Sep 1 2004 submit.mc
-rw-r--r-- 1 root root 26768 Mar 12 2004 temp.access


Do not worry about the files you don't have. Those are my own specializations in my ongoing war against spam.

Here are my /var/spool permissions

drwx------ 3 daemon daemon 4096 Oct 5 2004 at
drwxrwx--- 2 smmsp smmsp 53248 Jun 15 02:17 clientmqueue
drwx------ 2 root root 4096 May 26 23:12 cron
drwx--x--- 3 root sys 4096 Nov 11 2004 cups
drwxr-xr-x 2 root root 4096 Aug 12 2004 lpd
drwxrwxr-x 2 root mail 4096 Jun 15 02:17 mail
drwx------ 2 root mail 8192 Jun 15 02:17 mqueue
drwxr-xr-x 16 root root 4096 Mar 27 02:23 postfix
drwxr-xr-x 2 rpm rpm 4096 May 11 22:42 repackage
drwxrwxrwt 2 root root 4096 Jan 3 21:09 samba
drwxr-x--- 2 squid squid 4096 Oct 18 2004 squid
drwxr-xr-x 3 root root 4096 May 1 23:08 squirrelmail
drwxr-xr-x 2 root root 28672 Dec 15 15:58 up2date
drwxrwxrwt 2 root root 4096 Oct 5 2004 vbox


Those samba ones are problematic.

I believe if you match my /var/spool/mqueue permissions and my /etc/mail permissions where relavent you should be able to get mail operating again.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Cem Tugrul
Esteemed Contributor

Re: mail problem

Steven & Gopi,
i have also checked from my another running
N-class test srv file permissions
so i can fixed for my root and now it is
working but from an ordinary user i can not
able to send mail...
Once i feel there are still some files waiting to be chmod but what are they?
i am just feeling that i try to find out a needle in haystack!!!
:-)
Our greatest duty in this life is to help others. And please, if you can't
Stuart Browne
Honored Contributor
Solution

Re: mail problem

If you 777'd everything, then I'd next check the permissions on the sendmail binary it's self:

-rwxr-sr-x 1 root smmsp 774264 May 6 22:35 /usr/sbin/sendmail

This means 'chmod 2755 /usr/sbin/sendmail' should fix it.
One long-haired git at your service...
Cem Tugrul
Esteemed Contributor

Re: mail problem

Hey Stuart,
Bingo!!!!!
you have found the file...
Now my mail is working for other users.
Great!!!
Our greatest duty in this life is to help others. And please, if you can't
Cem Tugrul
Esteemed Contributor

Re: mail problem

Stuart found the needle!!!
:-)
Our greatest duty in this life is to help others. And please, if you can't