root mail is pointing to one user account..?(sendmail)
perikillo
perikillo at gmail.com
Sun Oct 16 03:09:19 PDT 2005
Hi people.
Freebsd 5.4-p8
tag RELENG_5_4
I need some help, the problem is that for some reason that i still
dont know, my root mail account is pointing to another user, is to
wear, that i really dont know how this happend, i check the /etc/mail/
files and dosnt see any thing wrong, i have 2 user working, root and
another call klabaza(wheel group), to access the system i use klabaza
and them su to get root account.
Today i made the buildworld process, after everything was complete
without any problems, i see one message on my /var/log/maillog saying
that my aliases.db was out of day the i run the newaliases program but
give some errors because i was having the mount point / ro(read only)
them i change / to rw, and again execute the program newaliases, and
everything was good, before this, root could send mail, after i run
newaliases, change some files propierties because this machine is one
firewall, i execute the command mail and appear this message:
samantha#mail
/var/mail/klabaza
Is the inbox of the other user, them i check my .cshrc file:
alias h history 25
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lA
alias lo ll -o
alias cls clear
alias apagar shutdown -r now
# A righteous umask
umask 22
set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
/usr/local/bin /usr/X11R6/bin $HOME/bin)
setenv EDITOR ee
setenv PAGER less
setenv BLOCKSIZE K
setenv CLICOLOR
if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = "`/bin/hostname -s`# "
set filec
set history = 100
set savehist = 100
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
endif
*******************************************************************************************************
Them i check my vars with set command and found this:
samantha# set
addsuffix
argv ()
cwd /root
dirstack /root
echo_style bsd
edit
filec
gid 0
group klabaza
history 100
home /root
killring 30
mail /var/mail/klabaza
owd /home/klabaza
path (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin
/usr/local/bin /usr/X11R6/bin /root/bin)
prompt samantha#
prompt2 %R?
prompt3 CORRECT>%R (y|n|e|a)?
savehist 100
shell /bin/csh
shlvl 2
status 0
tcsh 6.13.00
term xterm
tty ttyp0
uid 0
user klabaza
version tcsh 6.13.00 (Astron) 2004-05-19 (i386-intel-FreeBSD) options
8b,nls,dl,al,kan,sm,rh,color,dspm,filec
****************************************************************************************************
There i found that mail is pointing to the other user...why..?, Ok, if
i echo $USER with the root shell appear this:
samantha#echo $USER
klabaza
I think this is normal because i am using su to get root access, i
amd right...?
ok, them i decide to change my .cshrc file and change manually mail
and MAIL var, ok this fix the set problem, but not my problem, because
even if now i exec the mail command, and send some mail with root
account, look this header:
>From klabaza at samantha.MBX.local Sun Oct 16 03:24:39 2005
Return-Path: <klabaza at samantha.MBX.local>
Received: from samantha.MBX.local (localhost [127.0.0.1])
by samantha.MBX.local (8.13.3/8.13.3) with ESMTP id j9GAOd6J001138
for <klabaza at samantha.MBX.local>; Sun, 16 Oct 2005 03:24:39 -0700 (PDT)
(envelope-from klabaza at samantha.MBX.local)
Received: (from root at localhost)
by samantha.MBX.local (8.13.3/8.13.3/Submit) id j9GAOYAH001137
for klabaza; Sun, 16 Oct 2005 03:24:34 -0700 (PDT)
(envelope-from klabaza)
Date: Sun, 16 Oct 2005 03:24:34 -0700 (PDT)
From: User Klabaza moreno <klabaza at samantha.MBX.local>
Message-Id: <200510161024.j9GAOYAH001137 at samantha.MBX.local>
To: klabaza at samantha.MBX.local
Subject: test root.
body: must be root acount.
**************************************************************************************************
The first line say is the user klabaza and the mail was with the root
account, i receive this mail on the root and klabaza account, i am
receiving the cron mails to the root account, and this appear on some
maillog lines:
to=localuser, ctladdr=root (26/0), delay=00:00:00, mailer=local,
pri=40422, dsn=5.1.1, stat=User unknown
The localuser dosnt exits, i only change the /etc/mail/aliases line:
# Pretty much everything else in this file points to "root", so
# you would do well in either reading root's mailbox or forwarding
# root's email from here.
root: localuser, root at samantha.MBX.local <<<<<-----Only this line
# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root
***************************************************************
I still dont know how to fix this problem, any advised i will
apreciated, thanks all for your time.
More information about the freebsd-questions
mailing list