Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jul 2008 21:39:29 -0700 (PDT)
From:      lyd mc <alydiomc@yahoo.com>
To:        derek@computinginnovations.com, freebsd-questions@freebsd.org
Subject:   Re: quota and sendmail accepts <10k mail size
Message-ID:  <632084.63626.qm@web52210.mail.re2.yahoo.com>

next in thread | raw e-mail | index | archive | help
Hi Derek,

It is good to hear from you.

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

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

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

----- The following addresses had permanent fatal errors ----- <user.underq=
uota@company.com>

(reason: 550 5.0.0 output error)

Here is my configs:

I enable quota to /var and /home filesystem

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

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

As you can see here, user.underquota already exceeded the limit (soft and h=
ard). If I try to send a mail to this user more than 13k mail size, sendmai=
l 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, ho=
wever, 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----=A0=A0=A0 1 user.underquota =A0=A0=A0=A0=A0=A0 mail=A0=A0=A0=A0=
=A0=A0=A0=A0 64413589 Jul=A0 8 09:54 user.underquota=20

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

Thank you.

Best regards,

Alyd
=0A=0A=0A      



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?632084.63626.qm>