/var/mail/admin ?! Size

Discussion in 'General' started by pontifex, Dec 11, 2005.

  1. pontifex

    pontifex New Member

    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
     
  2. falko

    falko Super Moderator Howtoforge Staff

    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:
    Code:
    cat /dev/null > /var/mail/admin
     
  3. pontifex

    pontifex New Member

    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
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Have a look in /etc/passwd, you will find all users incl. their homedir in this file. I Guess the homedir is /home/admin/
     
  5. falko

    falko Super Moderator Howtoforge Staff

    First, you create a file .forward in the user's homedir with the following content:

    Code:
    "|/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:

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

Share This Page