LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 02-03-2011, 10:30 PM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 283

Rep: Reputation: 17
Question stopping you have mail on Linux


Hi,

on server Red Hat Enterprise Linux AS release 3, I am getting the mail "you have mail" can any body suggest how to stop this? mail are getting generated in below path.

/var/spool/postfix/maildrop, due to which heavy file are getting generated.

though sendmail service is stopped.

Regards,

Manoj
 
Old 02-04-2011, 12:20 AM   #2
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Greetingz!

Well, you could read your email and that would get rid of the error. Otherwise, if you're still getting email, it's just going to fill up the filesystem /var/spool/postfix/maildrop is on.
With that said, a quick google search would have told you that you can set "MAILCHECK=NO" in your shell and it will stop.
Temporarily Disable
export MAILCHECK=NO

Permanently Disable (Per User)
Add "MAILCHECK=NO" to the user's ~/.bashrc or ~/.bash_profile

Permanently Disable (Per System)
Add "MAILCHECK=NO" to the /etc/bashrc

If this (or anyother post) helps you out, be sure to mark it as such. Also, if your problem is solved, use "Thread Tools" to mark this as [SOLVED].
 
Old 02-06-2011, 11:18 PM   #3
manoj.linux
Member
 
Registered: Aug 2007
Posts: 283

Original Poster
Rep: Reputation: 17
Question

Quote:
Originally Posted by xeleema View Post
Greetingz!

Well, you could read your email and that would get rid of the error. Otherwise, if you're still getting email, it's just going to fill up the filesystem /var/spool/postfix/maildrop is on.
With that said, a quick google search would have told you that you can set "MAILCHECK=NO" in your shell and it will stop.
Temporarily Disable
export MAILCHECK=NO

Permanently Disable (Per User)
Add "MAILCHECK=NO" to the user's ~/.bashrc or ~/.bash_profile

Permanently Disable (Per System)
Add "MAILCHECK=NO" to the /etc/bashrc

If this (or anyother post) helps you out, be sure to mark it as such. Also, if your problem is solved, use "Thread Tools" to mark this as [SOLVED].
Thanks Xeleema for prompt response but still I am getting the mail.
 
Old 02-06-2011, 11:42 PM   #4
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Do you want to stop the "You have mail" notice on your Xterms, or do you want to actually stop getting the email?

If you want to prevent the emails from being delivered to your account, you can do one of two things;

1) Find and stop whatever is email you.
(This would be the correct thing to do)

2) Try "echo some_other_valid_email@address.com >> ~/.forward"
This should redirect the email to an account you can check/access on a regular basis.

Note: If you're getting "logwatch" emails, and you want to stop them, just "chmod a-x" the logwatch script in /etc/cron.*
 
Old 02-07-2011, 12:48 AM   #5
manoj.linux
Member
 
Registered: Aug 2007
Posts: 283

Original Poster
Rep: Reputation: 17
Question

Quote:
Originally Posted by xeleema View Post
Do you want to stop the "You have mail" notice on your Xterms, or do you want to actually stop getting the email?

If you want to prevent the emails from being delivered to your account, you can do one of two things;

1) Find and stop whatever is email you.
(This would be the correct thing to do)

2) Try "echo some_other_valid_email@address.com >> ~/.forward"
This should redirect the email to an account you can check/access on a regular basis.

Note: If you're getting "logwatch" emails, and you want to stop them, just "chmod a-x" the logwatch script in /etc/cron.*
Thanks Xeleema, Actually My requirement is that the files which are getting generated hugely daily basis in folder /var/spool/postfix/maildrop shold be stopped.
 
Old 02-07-2011, 01:19 AM   #6
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Sounds great. Stop the postfix service.
 
Old 02-07-2011, 11:26 PM   #7
manoj.linux
Member
 
Registered: Aug 2007
Posts: 283

Original Poster
Rep: Reputation: 17
Question

Quote:
Originally Posted by xeleema View Post
Sounds great. Stop the postfix service.
Hi Xeleema,

I have checked and not found any service related to postfix, I have checked with command service postfix stop, and inside /etc/init.d/ but there is no service such as postfix, but on server mysql and svn is configred,

how to trace where the path of /var/spool/postfix/maildrop is mentioned?

can you please suggest?
 
Old 02-11-2011, 05:33 AM   #8
xeleema
Member
 
Registered: Aug 2005
Location: D.i.t.h.o, Texas
Distribution: Slackware 13.x, rhel3/5, Solaris 8-10(sparc), HP-UX 11.x (pa-risc)
Posts: 988
Blog Entries: 4

Rep: Reputation: 252Reputation: 252Reputation: 252
Quote:
Originally Posted by manoj.linux View Post
I have checked and not found any service related to postfix...
Just to be sure, go through every service on your system;
Code:
chkconfig --list
if you see anything that looks like mail (postfix, sendmail, and the like), make sure it's not turned on for RunLevels 3, 4, or 5.

Quote:
Originally Posted by manoj.linux View Post
how to trace where the path of /var/spool/postfix/maildrop is mentioned?
can you please suggest?
It's not quite that easy, you could try "grep -Ri maildrop /etc" and that might give you a lead. However, odds are good there's a cron job that is emailing you.

Try typing "mailx" (might want to read the man page first) and see what is being emailed to you. That might also give you some insight as to what is sending you email.
 
Old 02-16-2011, 09:14 PM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
The maildrop directory is used by postfix when something is submitted via it's sendmail compatibility utility:

http://www.postfix.org/sendmail.1.html

This utility is configured (or hardcoded) into many other utilities - they call it directly to submit mail to the system.

When postfix is running, postfix will use the pickup utility to place it with the postfix delivery system. When it is not running, the files will remain in the maildrop directory.

You have to find the actual utility that is try to transmit its output via sendmail. Since you are not *running* postfix, but have it installed, look at the contents of the files in the maildrop directory to determine what utility is doing the actual submission. You'll obviously have to figure out which utility generates such output.
 
  


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
postgrey stopping all incoming mail jonespg Linux - Server 2 02-19-2008 12:35 AM
with the linux proxi, backend pop3 mail client can not receive mail and send mail rubin823 Linux - Networking 0 12-21-2006 10:06 PM
Squid: Stopping downloads heavy mail attachments dpballey Linux - Networking 0 03-04-2006 02:06 AM
stopping junk mail blastradius Ubuntu 2 02-19-2006 10:24 AM
Stopping the hourly mail to root Phaethar Linux - General 2 09-16-2005 02:25 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 02:32 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
Open Source Consulting | Domain Registration