/var/mail

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

/var/mail

Carlwill
I notice that when I create a user in my Postfix server, I also create
a file located in /var/spool/mail:

********************************************************************

[root@mail mail]# ls -l
total 0
-rw-rw---- 1 user1    mail 0 Jun  8 11:35 user1
-rw-rw---- 1 user2    mail 0 Jun  5 08:41 user2
-rw-rw---- 1 user3    mail 0 Jun  9 10:00 user3
-rw-rw---- 1 user4    mail 0 Jun  8 10:37 user4
-rw-rw---- 1 user5    mail 0 May 21 15:15 user5
-rw-rw---- 1 user6    mail 0 May 28 16:06 user6
-rw-rw---- 1 user7    mail 0 May 21 15:20 user7
-rw-rw---- 1 user8    mail 0 May 20 10:04 user8

********************************************************************

I have Postfix running with /Maildir style mailboxes and all the users
email gets stored in their /home directory so I am not
sure why my Linux / Postfix system is generating these files. I
normally don't mess with files in /var unless I know what I am
doing which I obviously don't. Can someone tell me:

1 - Why this files are being generated
2 - Can I delete them
3 - How can I prevent future new users from having files generated in
this directory

All the files are blank / empty so it does not appear to be doing much
from what I can see.
Reply | Threaded
Open this post in threaded view
|

Re: /var/mail

mouss-4
Carlos Williams a écrit :

> I notice that when I create a user in my Postfix server, I also create
> a file located in /var/spool/mail:
>
> ********************************************************************
>
> [root@mail mail]# ls -l
> total 0
> -rw-rw---- 1 user1    mail 0 Jun  8 11:35 user1
> -rw-rw---- 1 user2    mail 0 Jun  5 08:41 user2
> -rw-rw---- 1 user3    mail 0 Jun  9 10:00 user3
> -rw-rw---- 1 user4    mail 0 Jun  8 10:37 user4
> -rw-rw---- 1 user5    mail 0 May 21 15:15 user5
> -rw-rw---- 1 user6    mail 0 May 28 16:06 user6
> -rw-rw---- 1 user7    mail 0 May 21 15:20 user7
> -rw-rw---- 1 user8    mail 0 May 20 10:04 user8
>
> ********************************************************************
>
> I have Postfix running with /Maildir style mailboxes and all the users
> email gets stored in their /home directory so I am not
> sure why my Linux / Postfix system is generating these files. I
> normally don't mess with files in /var unless I know what I am
> doing which I obviously don't. Can someone tell me:
>
> 1 - Why this files are being generated

it's your "adduser" command. This is not postfix related.

> 2 - Can I delete them

Probably, unless something relies on. I would just leave them.

> 3 - How can I prevent future new users from having files generated in
> this directory
>

don't fight against the system.

> All the files are blank / empty so it does not appear to be doing much
> from what I can see.

These are not the only useless files your system, so why lose your time?


Reply | Threaded
Open this post in threaded view
|

Re: /var/mail

fakessh @
Le samedi 20 juin 2009 01:08, mouss a écrit :

> Carlos Williams a écrit :
> > I notice that when I create a user in my Postfix server, I also create
> > a file located in /var/spool/mail:
> >
> > ********************************************************************
> >
> > [root@mail mail]# ls -l
> > total 0
> > -rw-rw---- 1 user1    mail 0 Jun  8 11:35 user1
> > -rw-rw---- 1 user2    mail 0 Jun  5 08:41 user2
> > -rw-rw---- 1 user3    mail 0 Jun  9 10:00 user3
> > -rw-rw---- 1 user4    mail 0 Jun  8 10:37 user4
> > -rw-rw---- 1 user5    mail 0 May 21 15:15 user5
> > -rw-rw---- 1 user6    mail 0 May 28 16:06 user6
> > -rw-rw---- 1 user7    mail 0 May 21 15:20 user7
> > -rw-rw---- 1 user8    mail 0 May 20 10:04 user8
> >
> > ********************************************************************
> >
> > I have Postfix running with /Maildir style mailboxes and all the users
> > email gets stored in their /home directory so I am not
> > sure why my Linux / Postfix system is generating these files. I
> > normally don't mess with files in /var unless I know what I am
> > doing which I obviously don't. Can someone tell me:
> >
> > 1 - Why this files are being generated
>
> it's your "adduser" command. This is not postfix related.
>
> > 2 - Can I delete them
>
> Probably, unless something relies on. I would just leave them.
>
.



> > 3 - How can I prevent future new users from having files generated in
> > this directory
>
> don't fight against the system.

peace near fight
peace near live
peace for all them
>
> > All the files are blank / empty so it does not appear to be doing much
> > from what I can see.
>
> These are not the only useless files your system, so why lose your time?
Reply | Threaded
Open this post in threaded view
|

Re: /var/mail

Barney Desmond
In reply to this post by mouss-4
2009/6/20 mouss <[hidden email]>:

>> 1 - Why this files are being generated
>
> it's your "adduser" command. This is not postfix related.
>
>> 2 - Can I delete them
>
> Probably, unless something relies on. I would just leave them.
>
>> 3 - How can I prevent future new users from having files generated in
>> this directory
>>
>
> don't fight against the system.

Yeah, what mouss said.

A colleague and I were looking at this a little while ago when doing a
migration, wondering how they're created with group="mail", seeing as
it can't be done as the user during local delivery. It's done when the
user is added, and I believe you can affect this behaviour with
/etc/login.defs. On my Debian system it looks like you can change the
location but not remove it entirely - I dunno, Your Mileage May Vary.