LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-11-2005, 11:54 PM   #1
joji_in_changwon
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Rep: Reputation: 0
Mail Problem


Dear Fellow Linux User,

I am new at Linux and have a problem and would like your help.

I am using email accounts has data collection areas and need to mv the user mail files to a common working directory so that it can be processed and the mail file deleted.

Mail files are owned by mail and only can be deleted my mail and root.

It is possible to mv and delete the mails to a common working directory not being root?

Example:

Mail_1 Mail_2 Mail_3 Mail_4 Mail_common

Move mail_1 to 4 to mail_common and delete the files.


Any help would be greatly appreciated.


Mail is stored under /var/spool/mail/$user.
 
Old 08-12-2005, 01:15 AM   #2
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
I think it is not possible man.
 
Old 08-12-2005, 01:42 AM   #3
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Rep: Reputation: 47
If it were possible it wouldn't be Linux but Windows 95 with its crappy security
 
Old 08-12-2005, 03:16 AM   #4
fuzzyash
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Fedora Core 4
Posts: 184

Rep: Reputation: 30
Yep... Everyones correct, this can't be done easily, although of course it can be done, but hacking a Linux PC would be morally offensive. But on the other hand though, if it were a Windoes box I would have absolutely no problems with it! Funny that huh?

One of the main areas Linux focuses on is being secure, for good reason too!

If you can read the files with your normal user then you will be able to copy them & do what ever you like but you will not be able to remove the originals.

Because you are asking this I am assuming that you don't have root access. Is this true? If not, whats is the big deal with using the root or mail accounts to do what you want?
 
Old 08-12-2005, 03:30 AM   #5
j-ray
Senior Member
 
Registered: Jan 2002
Location: germany
Distribution: ubuntu
Posts: 1,532

Rep: Reputation: 132Reputation: 132
if u you have root access or know someone with root access you can ask him/her to install a shell or perl script that does the job and add the script to cron.hourly i. e.
 
Old 08-12-2005, 08:06 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
Another way to do it would be to have the System Administrator setup sudo to do it.

A less secure way than the above would be to make a root owned script with suid bit set to do it. I'd strongly advise against doing this but wanted to mention it was possible.
 
Old 08-12-2005, 05:33 PM   #7
joji_in_changwon
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you

Thank you for your help which I appreciated very much.

Regarding root access, I have root access.

The please understand that I am trying to use the mail boxes
has data collection areas. I am not trying to hack into any machine.

I have designed a computer program which will run in a cron
job and do not want, if possible to run the job has root.

What about using groups (groupadd)?
 
Old 08-12-2005, 06:32 PM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 6,580
Blog Entries: 14

Rep: Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969Reputation: 969
You could make the other user a member of the group that the files get but this could still present a security hole as the other user would have access to all files with that group not just mail.

I'm not sure why you're reluctant to do this a root in cron. Since you have to be root to modify root's cron this is "reasonably" secure. You'd just want to make sure the script root is calling is also only writable by root to prevent someone from changing what the script does. (This is similar to the risk you have with scripts called from init.d.)
 
Old 08-15-2005, 09:47 PM   #9
joji_in_changwon
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you

Hello jlightner,

Thank you for your response. I was also thinking about sudo but I think
it is fair to say run a root script.

I would like thank all members for your help and would like to close
this questions.

Sincerely
joji_in_changwon.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shel script mail send ("/" in mail address) problem anaid Linux - Networking 3 08-23-2005 08:41 AM
Qmail problem: ISP mail and virtual mail, "sorry no mailbox, here by that user" barryw Linux - Networking 7 05-28-2005 01:43 PM
problem receiving pop3 mail from postfix mail server GEN_Electric Linux - Software 2 02-14-2005 03:43 PM
Strange mail problem, no errors, and no mail quincy56 Linux - Networking 4 09-07-2004 01:21 AM
E-mail problem markstevens Linux - Networking 10 06-16-2003 05:10 PM


All times are GMT -5. The time now is 07:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration