PDA

View Full Version : /var/mail/admin ?! Size


pontifex
11th December 2005, 20:11
Hi everyone,

i had a look at my serverīs mail dir. There is a file called admin. this file size is (currently )12 mb.

how can i change that?

Cheers
PM

falko
11th December 2005, 23:02
You can either fetch the mails from that account regularly with an email client, or if you don't want to receive emails for admin at all, you can use a .forward file or a procmail recipe in admin's home dir to forward the mails to /dev/null.

If you only want to delete the mails that are currently in /var/mail/admin, you can do it like this:
cat /dev/null > /var/mail/admin

pontifex
12th December 2005, 09:52
You can either fetch the mails from that account regularly with an email client, or if you don't want to receive emails for admin at all, you can use a .forward file or a procmail recipe in admin's home dir to forward the mails to /dev/null.

If you only want to delete the mails that are currently in /var/mail/admin, you can do it like this:
cat /dev/null > /var/mail/admin

Hi Falko,

thanks for your fast reply. I think the best would be a procmail recipe. but where is the admin`s home dir and how should that procmail file look like?

Cheers
PM

till
12th December 2005, 10:25
Have a look in /etc/passwd, you will find all users incl. their homedir in this file. I Guess the homedir is /home/admin/

falko
12th December 2005, 23:31
First, you create a file .forward in the user's homedir with the following content:

"|/path/to/procmail -f-"

Then chown it to the username and chmod 600 it. Then create the file .procmailrc in the same directory (owner and group root, chmod 644) with the following content:

:0:
/dev/null

Also have a look at man procmailex and here: http://www.howtoforge.com/procmail_tips_recipes