Hi,
CentOS 5.x, Sendmail 8.13.8.
I would like to start using disk quotas on my Sendmail server, and optimally they should be configurable by user or group. How can this be done? (I tried to google, but no success.)
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
On 8/21/08, Jussi Hirvi greenspot@greenspot.fi wrote:
Hi,
CentOS 5.x, Sendmail 8.13.8.
I would like to start using disk quotas on my Sendmail server, and optimally they should be configurable by user or group. How can this be done? (I tried to google, but no success.)
- Jussi
If each user's mail is stored in his homefolder, then you just need to enable user quotas :) man quota & man mtab for the options
On 8/21/08, Jussi Hirvi greenspot@greenspot.fi wrote: CentOS 5.x, Sendmail 8.13.8. http://8.13.8. I would like to start using disk quotas on my Sendmail server, and optimally they should be configurable by user or group. How can this be done? (I tried to google, but no success.)
Rudi Ahlers (rudiahlers@gmail.com) kirjoitteli (21.8.2008 13:55):
If each user's mail is stored in his homefolder, then you just need to enable user quotas :) man quota & man mtab for the options
Hei,
The mail is not stored in home folders but in /var/spool/mail. I would rather keep it that way - and I'm not sure if storing mail in home folders would work for procmail (Sendmail's local mailer), dovecot (pop server) etc.
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
On 8/21/08, Jussi Hirvi greenspot@greenspot.fi wrote:
On 8/21/08, Jussi Hirvi greenspot@greenspot.fi wrote:
CentOS 5.x, Sendmail 8.13.8. http://8.13.8.
I would like to start using disk quotas on my Sendmail server, and
optimally
they should be configurable by user or group. How can this be done? (I
tried
to google, but no success.)
Rudi Ahlers (rudiahlers@gmail.com) kirjoitteli (21.8.2008 13:55):
If each user's mail is stored in his homefolder, then you just need to
enable
user quotas :) man quota & man mtab for the options
Hei,
The mail is not stored in home folders but in /var/spool/mail. I would rather keep it that way - and I'm not sure if storing mail in home folders would work for procmail (Sendmail's local mailer), dovecot (pop server) etc.
- Jussi
mm, then I don't know, sorry. Maybe someone else might shed some light on the subject then.
Rudi Ahlers (rudiahlers@gmail.com) kirjoitteli (21.8.2008 14:14):
mm, then I don't know, sorry. Maybe someone else might shed some light on the subject then.
Ok, thanks Rudi. If someone has a Sendmail system where email is stored in the users' home folders, please chime in... Does that work ok?
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
Jussi Hirvi schrieb:
On 8/21/08, Jussi Hirvi greenspot@greenspot.fi wrote: CentOS 5.x, Sendmail 8.13.8. http://8.13.8. I would like to start using disk quotas on my Sendmail server, and optimally they should be configurable by user or group. How can this be done? (I tried to google, but no success.)
Rudi Ahlers (rudiahlers@gmail.com) kirjoitteli (21.8.2008 13:55):
If each user's mail is stored in his homefolder, then you just need to enable user quotas :) man quota & man mtab for the options
Hei,
The mail is not stored in home folders but in /var/spool/mail. I would rather keep it that way - and I'm not sure if storing mail in home folders would work for procmail (Sendmail's local mailer), dovecot (pop server) etc.
http://freshmeat.net/projects/milterquota/
Other milters here:
http://www.sendmail.com/sm/partners/milter_partners/open_source_milter_partn...
I.e. MIMEdefang can rule quota decisions too, if you know a bit of perl.
An yes, using procmail as your LDA you can store user's mail spool in their $HOME, either as mbox or maildir.
- Jussi
Alexander
Alexander Dalloz (ad+lists@uni-x.org) kirjoitteli (21.8.2008 14:31):
http://freshmeat.net/projects/milterquota/
Other milters here:
http://www.sendmail.com/sm/partners/milter_partners/open_source_milter_partn... s/
I.e. MIMEdefang can rule quota decisions too, if you know a bit of perl.
Thanks Alex!
Milterquota looks just perfect for me. It seems to be much better than using disk quotas in that emails from the postmaster can override the quota limit - that is, the user can be informed about the quota override!
I will give milterquota a try.
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
Alexander Dalloz (ad+lists@uni-x.org) kirjoitteli (21.8.2008 14:31):
I didn't find milterquota with yum so I guess I have to build it... The Makefile asks me to locate a file that I cannot find:
# change this to the object directory in the sendmail build treeSENDMAIL_OBJ=/usr/src/packages/sendmail-8.12.9/obj.Linux.2.4.21.i586
I just installed sendmail source, but still I cannot find a "obj.Linux" anywhere. (I searched with the command "locate obj.Linux".)
How should I proceed?
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
Jussi Hirvi (greenspot@greenspot.fi) kirjoitteli (21.8.2008 15:56):
I didn't find milterquota with yum so I guess I have to build it... The Makefile asks me to locate a file that I cannot find:
# change this to the object directory in the sendmail build treeSENDMAIL_OBJ=/usr/src/packages/sendmail-8.12.9/obj.Linux.2.4.21.i586
Maybe I should add that my Sendmail is 8.13.8, not 8.12.9, as mentioned in that Makefile sample. Maybe file names in the Sm build have changed.
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
Try to find the file through the find command, something like " find /usr -t f -name 'obj.Linux*' "
The command locate works with an database, which will be updated just once a day (If you enable it!), so that will not "find" any just installed files...
regards,
Joost Waversveld
Jussi Hirvi wrote:
Jussi Hirvi (greenspot@greenspot.fi) kirjoitteli (21.8.2008 15:56):
I didn't find milterquota with yum so I guess I have to build it... The Makefile asks me to locate a file that I cannot find:
# change this to the object directory in the sendmail build treeSENDMAIL_OBJ=/usr/src/packages/sendmail-8.12.9/obj.Linux.2.4.21.i586
Maybe I should add that my Sendmail is 8.13.8, not 8.12.9, as mentioned in that Makefile sample. Maybe file names in the Sm build have changed.
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Thu, Aug 21, 2008 at 6:30 AM, Joost Waversveld joost@waversveld.nl wrote:
Try to find the file through the find command, something like " find /usr -t f -name 'obj.Linux*' "
The command locate works with an database, which will be updated just once a day (If you enable it!), so that will not "find" any just installed files...
Or when you run updatedb (as root)....
mhr
Joost Waversveld joost@waversveld.nl escribio (21.8.2008 16:30)
Try to find the file through the find command, something like " find /usr -t f -name 'obj.Linux*' "
The command locate works with an database, which will be updated just once a day (If you enable it!), so that will not "find" any just installed files...
Thanks - I know that about locate. That's why I commanded updatedb before I tried the locate command. Locate is so easy to use, in general I like it more than find.
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * SMS +358 40 771 2098 jussi.hirvi@greenspot.fi * http://www.greenspot.fi
Jussi Hirvi wrote:
Joost Waversveld joost@waversveld.nl escribio (21.8.2008 16:30)
Try to find the file through the find command, something like " find /usr -t f -name 'obj.Linux*' "
The command locate works with an database, which will be updated just once a day (If you enable it!), so that will not "find" any just installed files...
Thanks - I know that about locate. That's why I commanded updatedb before I tried the locate command. Locate is so easy to use, in general I like it more than find.
The stuff needed to build milters should be in the sendmail-devel package and if you have it installed. 'rpm -q --list sendmail-devel' should show where it landed.
On Thu, 2008-08-21 at 16:38 -0500, Les Mikesell wrote:
The stuff needed to build milters should be in the sendmail-devel package and if you have it installed. 'rpm -q --list sendmail-devel' should show where it landed.
Hot dog! Hey Les! Old home week here on the CentOS list. Ric
Jussi Hirvi schrieb:
Jussi Hirvi (greenspot@greenspot.fi) kirjoitteli (21.8.2008 15:56):
I didn't find milterquota with yum so I guess I have to build it... The Makefile asks me to locate a file that I cannot find:
# change this to the object directory in the sendmail build treeSENDMAIL_OBJ=/usr/src/packages/sendmail-8.12.9/obj.Linux.2.4.21.i586
Maybe I should add that my Sendmail is 8.13.8, not 8.12.9, as mentioned in that Makefile sample. Maybe file names in the Sm build have changed.
- Jussi
The Sendmail objects directory is the one where the libmilter and libsm subdirectories are inside. There should normally be no problem wit SM 8.12 vs SM 8.13 regarding the milter code.
What I would do is following: change this line in the Makefile
$(CC) $(OPTS) $(DEFINES) $(EFENCE) -o milterquota milterquota.c $(SENDMAIL_OBJ)/libmilter/libmilter.a $(SENDMAIL_OBJ)/libsm/libsm.a -pthread
replace $(SENDMAIL_OBJ)/libmilter/libmilter.a with /usr/lib64/libmilter.a and replace $(SENDMAIL_OBJ)/libsm/libsm.a with /usr/lib64/libsm.a OR /usr/lib/libsm.a (if not x86_64 but i386 CentOS)
You need to "yum install sendmail-devel" to have these files. That should be sufficient.
Alexander
Alexander Dalloz ad+lists@uni-x.org escribio (21.8.2008 16:44)
What I would do is following: change this line in the Makefile
$(CC) $(OPTS) $(DEFINES) $(EFENCE) -o milterquota milterquota.c $(SENDMAIL_OBJ)/libmilter/libmilter.a $(SENDMAIL_OBJ)/libsm/libsm.a -pthread
replace $(SENDMAIL_OBJ)/libmilter/libmilter.a with /usr/lib64/libmilter.a and replace $(SENDMAIL_OBJ)/libsm/libsm.a with /usr/lib64/libsm.a OR /usr/lib/libsm.a (if not x86_64 but i386 CentOS)
You need to "yum install sendmail-devel" to have these files. That should be sufficient.
Thanks Alex,
You made me realize the obj.Linux is not important in itself - it's only important to indicate where libmilter.a and libsm.a are. That was easy. On my CentOS 5 system, the path is simply /usr/lib/.
Now milterquota is up and running. Only so far it doesn't seem to respect my milterquota.conf. I will probably work it out soon.
Thanks also for "rpm -q --list", whoever mentioned that (I don't have that message on my home box).
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * SMS +358 40 771 2098 jussi.hirvi@greenspot.fi * http://www.greenspot.fi
on 8-21-2008 5:56 AM Jussi Hirvi spake the following:
Alexander Dalloz (ad+lists@uni-x.org) kirjoitteli (21.8.2008 14:31):
I didn't find milterquota with yum so I guess I have to build it... The Makefile asks me to locate a file that I cannot find:
# change this to the object directory in the sendmail build treeSENDMAIL_OBJ=/usr/src/packages/sendmail-8.12.9/obj.Linux.2.4.21.i586
I just installed sendmail source, but still I cannot find a "obj.Linux" anywhere. (I searched with the command "locate obj.Linux".)
How should I proceed?
- Jussi
-- Jussi Hirvi * Green Spot Topeliuksenkatu 15 C * 00250 Helsinki * Finland Tel. & fax +358 9 493 981 * Mobile +358 40 771 2098 (only sms) jussi.hirvi@greenspot.fi * http://www.greenspot.fi
You shouldn't need sendmail source, just install the sendmail-devel rpm.
on 8-21-2008 4:10 AM Jussi Hirvi spake the following:
On 8/21/08, Jussi Hirvi greenspot-i5Z6UQdXNTIES5aQMQQu3w@public.gmane.org wrote: CentOS 5.x, Sendmail 8.13.8. http://8.13.8. I would like to start using disk quotas on my Sendmail server, and optimally they should be configurable by user or group. How can this be done? (I tried to google, but no success.)
Rudi Ahlers (rudiahlers@gmail.com) kirjoitteli (21.8.2008 13:55):
If each user's mail is stored in his homefolder, then you just need to enable user quotas :) man quota & man mtab for the options
Hei,
The mail is not stored in home folders but in /var/spool/mail. I would rather keep it that way - and I'm not sure if storing mail in home folders would work for procmail (Sendmail's local mailer), dovecot (pop server) etc.
- Jussi
You can make /var/spool/mail a separate mounted partition, and set user and group quotas on that mount and it should work. It might work with it not being a separate partition, but that would be up to you to test.
But you can have other problems if you set the warning and maximum levels too close. If a message comes in and makes the quota go over the maximum and the warning level at the same time, the system won't be able to give the users any warning message as their quota will be over and will block the warning message.
You can set procmail to store the messages in other folders, and also set it to deliver to Maildir storage by fiddling with (or creating) an /etc/procmailrc file.
Jussi Hirvi wrote:
I would like to start using disk quotas on my Sendmail server, and optimally they should be configurable by user or group. How can this be done? (I tried to google, but no success.)
Storing email in users' home folders makes sense in many ways. After all, those too are their files, not anybody else's.
As an alternative, pretty close but not quite the same, I use Cyrus IMAPd, and keep the main Cyrus spool in /home/cyrus. This way, the /home volume is just "users' files" except I don't keep user johndoe's email in /home/johndoe/mail but in /home/cyrus/....../johndoe And Cyrus already has quota limits at the application level. Also has built-in filtering with Sieve. Faster, more powerful, more scalable than procmail & friends.
It's just a suggestion, I'm not saying this is the ideal solution for every scenario.