Re: quota and sendmail accepts 10k mail size

2008-07-10 Thread Mikhail Goriachev

Quoting lyd mc [EMAIL PROTECTED]:


However, my company wants to have 20meg mbox space per user. If the  
User exceeds, he/she should not recieved any mail.


So, I use system quota to prevent sendmail from writing to mbox of a



Let me suggest slightly different approaches:

1.- You could have /usr/ports/mail/mimedefang making the decisions  
instead of sendmail or system quota. There you can set your own rules  
and sendmail will abide them. This gives you far better control and  
you're limited by your own imagination.


2.- Implement a mail server with quota capabilities. For instance  
cyrus-imap. There you can set quota limits, warning messages to users,  
percentages and so on. This is the easiest approach.




Regards,
Mikhail.

--
Mikhail Goriachev
Webanoide


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quota and sendmail accepts 10k mail size

2008-07-10 Thread Mel
On Thursday 10 July 2008 16:19:59 Mikhail Goriachev wrote:
 Quoting lyd mc [EMAIL PROTECTED]:
  However, my company wants to have 20meg mbox space per user. If the
  User exceeds, he/she should not recieved any mail.
 
  So, I use system quota to prevent sendmail from writing to mbox of a

 Let me suggest slightly different approaches:

 1.- You could have /usr/ports/mail/mimedefang making the decisions
 instead of sendmail or system quota. There you can set your own rules
 and sendmail will abide them. This gives you far better control and
 you're limited by your own imagination.

 2.- Implement a mail server with quota capabilities. For instance
 cyrus-imap. There you can set quota limits, warning messages to users,
 percentages and so on. This is the easiest approach.

So there isn't an equivalent to postfix's mailbox_size_limit?

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quota and sendmail accepts 10k mail size

2008-07-10 Thread lyd mc
Hi Mikhail,

Thank you for the great suggestion. I will try it in our new server.

Regards,
alyd

--- On Thu, 7/10/08, Mikhail Goriachev [EMAIL PROTECTED] wrote:
From: Mikhail Goriachev [EMAIL PROTECTED]
Subject: Re: quota and sendmail accepts 10k mail size
To: [EMAIL PROTECTED], [EMAIL PROTECTED], freebsd-questions@freebsd.org
Date: Thursday, July 10, 2008, 10:19 PM

Quoting lyd mc [EMAIL PROTECTED]:


 However, my company wants to have 20meg mbox space per user. If the  
 User exceeds, he/she should not recieved any mail.

 So, I use system quota to prevent sendmail from writing to mbox of a


Let me suggest slightly different approaches:

1.- You could have /usr/ports/mail/mimedefang making the decisions  
instead of sendmail or system quota. There you can set your own rules  
and sendmail will abide them. This gives you far better control and  
you're limited by your own imagination.

2.- Implement a mail server with quota capabilities. For instance  
cyrus-imap. There you can set quota limits, warning messages to users,  
percentages and so on. This is the easiest approach.



Regards,
Mikhail.

-- 
Mikhail Goriachev
Webanoide


  
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quota and sendmail accepts 10k mail size

2008-07-09 Thread lyd mc
Hi Derek,

It is good to hear from you.

You are right about sendmail has only global option to limit mail size. 

However, my company wants to have 20meg mbox space per user. If the User 
exceeds, he/she should not recieved any mail.

So, I use system quota to prevent sendmail from writing to mbox of a user which 
is under quota.Sendmail should bounce the mail and reply to sender with this 
kind of error:

- The following addresses had permanent fatal errors - [EMAIL 
PROTECTED]

(reason: 550 5.0.0 output error)

Here is my configs:

I enable quota to /var and /home filesystem

/dev/ipsd0s1f   /home   ufs rw,userquota    2   2
/dev/ipsd0s1d   /var    ufs rw,userquota    2   2

# qouta -v user.underquota
Disk quotas for user user.underquota (uid 1333):
 Filesystem   usage   quota   limit   grace   files   quota   limit   grace
  /home 210   20480   20480  11   0   0
   /var   62960*   20480   20480    none 1   0   0

As you can see here, user.underquota already exceeded the limit (soft and 
hard). If I try to send a mail to this user more than 13k mail size, sendmail 
cannot write to this mbox (since mbox of a user is located in /var/mail) and 
will reply with an error message. At first I thought it was working, however, 
when i try to send 10k, 7k, 5k or less mail size, sendmail can write to 
user.underquota mbox.

User file permition:

#ls -l
-rw-rw    1 user.underquota    mail 64413589 Jul  8 09:54 
user.underquota 

So, what do you think? Do i missed some config? or this is a bug?

Thank you.

Best regards,

Alyd




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: quota and sendmail accepts 10k mail size

2008-07-08 Thread Derek Ragona

At 08:14 PM 7/7/2008, lyd mc wrote:

Greetings,

I setup my mail server on freebsd7.0R and it is working great!

However, I have a problem on quota. It suppose to block any incoming 
message to specific user which is under quota. But sendmail can still send 
to the user under quota if the mail size is ~ less than 10k. Quota only 
works when the mail size is  greater than 13k.


Is there any way to correct this problem? Please help.


By the way, i disable the grace period via quota.h.

   #define MAX_IQ_TIME (0) /* seconds in 1 week */
   #define MAX_DQ_TIME (0) /* seconds in 1 week */


And my mail users authenticate via ldap.

Thank you and more power.


I don't fully understand what you are trying to limit, most sendmail size 
limits are set either globally, or by protocol.  The General setting is set 
in you .mc file with:


confMAX_MESSAGE_SIZEMaxMessageSize  [infinite] The maximum size of messages
that will be accepted (in bytes).

Otherwise read through the page on the options here and you can refine the 
size limit by the protcol/mta:


http://www.sendmail.org/documentation/configurationReadme

-Derek


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


quota and sendmail accepts 10k mail size

2008-07-07 Thread lyd mc
Greetings,

I setup my mail server on freebsd7.0R and it is working great!

However, I have a problem on quota. It suppose to block any incoming message to 
specific user which is under quota. But sendmail can still send to the user 
under quota if the mail size is ~ less than 10k. Quota only works when the mail 
size is  greater than 13k.

Is there any way to correct this problem? Please help.


By the way, i disable the grace period via quota.h.

   #define MAX_IQ_TIME (0) /* seconds in 1 week */
   #define MAX_DQ_TIME (0) /* seconds in 1 week */


And my mail users authenticate via ldap.

Thank you and more power.









___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]