LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-24-2006, 11:24 AM   #1
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Rep: Reputation: 15
spooled outgoing mail


I've accidently mailbombed myself...

.
.
.

If you're done laughing, could someone tell me where mail is spooled under SuSE 10.0? `/var/spool/mail` does not appear to be it even though the (empty) directory exsists.

My goal is to do something like:
Code:
root@linux# rm -f /var/spool/mail/<user>
and put an end to the nonsense.
 
Old 04-24-2006, 04:11 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
/var/spool/maill is where delivered mail is spooled (for sendmail anyway) - do you want the directory where mail is waiting to be sent? I'm not sure what you sent the mail with - do you have either of the directories /var/spool/clientmqueue or /var/spool/mqueue?
 
Old 04-25-2006, 10:06 AM   #3
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Original Poster
Rep: Reputation: 15
Hey gilead, thanks for the help.

The mail was sent using PHP's mail function. If I get a chance when I'm off work, I'll check those directories.

Edit: I just remembered that I did go through all the likely directories in /var/spool and didn't find anything. I belive this included mqueue.

Last edited by UltramaticOrange; 04-25-2006 at 10:15 AM.
 
Old 04-25-2006, 04:50 PM   #4
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Original Poster
Rep: Reputation: 15
Alternativly, is there a naming convention (sendmail) for outgoing spooled mail? If so, I could just
Code:
find / -name file_name*
or somesuch.
 
Old 04-25-2006, 06:18 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Sendmail does generate spooled mail with its own naming scheme - but I think it uses some randomness and varies from system. For example, after stopping sendmail on one of my boxes here and trying to send mail using the mail command, my /var/spool/clientmqueue directory contains files called dfk3PMG5d9012189 and qfk3PMG5d9012189
 
Old 04-25-2006, 06:30 PM   #6
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Original Poster
Rep: Reputation: 15
I've found 'dfk*' and 'qfk*' as part of the file names while searching around elsewhere. I also thought to check the sendmail config files to see where messages are queued.
 
Old 04-25-2006, 08:38 PM   #7
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It may work (but would be slow) to grep the files below /var/spool for strings that are in the emails that you're getting. For example, if one of them has a subject containing "pay rise" (wishful thinking on my part):
Code:
grep -ir 'pay rise' /var/spool/*
 
Old 04-25-2006, 09:43 PM   #8
UltramaticOrange
LQ Newbie
 
Registered: Aug 2005
Posts: 26

Original Poster
Rep: Reputation: 15
`/var/spool/postfix/deferred`

I ended up running
Code:
grep -ir 'MOTheD :: Seen it!' /var/spool/* 2> /dev/null
and found it right away. I'm doing one last check to make sure I didn't miss anything.

Thanks for the help.
 
Old 04-25-2006, 10:17 PM   #9
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
That's good news - congratulations
 
  


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
sendmail and outgoing mail shafey Linux - Networking 1 11-16-2005 05:57 AM
outgoing mail not working BillyB Linux - Newbie 6 04-19-2005 05:51 PM
How to separate Incoming Mail and Outgoing Mail on SENDMAIL LiloAma Linux - Networking 1 03-22-2004 03:24 AM
sendmail outgoing mail karunesh Linux - General 0 11-17-2003 03:19 PM
outgoing mail problem scheidel21 Linux - Networking 1 03-22-2003 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:51 PM.

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
Open Source Consulting | Domain Registration