?
Solved

mail transfer restriction

Posted on 2002-03-19
7
Medium Priority
?
417 Views
Last Modified: 2013-12-17
Hi
anyone can help me restricting the mail transfer size per mail ?
Not the max. size of the mbox of certain users.
(e.g. max transfer size per mail = 2 MB)

Is there a way to do this individually by user?


I'm using Berkley sendmail 8.9.3-0.1 on SUSE linux box.

Thanks for your help

Mathias
0
Comment
Question by:mfuerlinger
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 15

Expert Comment

by:samri
ID: 6879910
It is possible to transfer mail that runs thru your sendmail program.    All you need to do is to add the following keywork in your sendmail.cf (most likely to be found in /etc/ or /etc/mail).

O MaxMessageSize=2000000

The figure will be in bytes (2 million bytes).  And yes one would argue 2000000 is not 2MB.  The figure you easily be calculated anyway.

FYI, there is already a PAQ for question similar to this.
http://www.experts-exchange.com/sendmail/Q.20269428.html

Limiting mailbox size would not be quite straightforward.  One option would be storing a mail in a separate filesystem, and imposing user-quota on that specific fs.  

Next alternatives is to hack this code and patch it to check_compat() routine.

http://www.netsys.com/library/sendmail/logall.c 

And again, I am not a C programmer, nor does I know the detail on internal coding of sendmail.  Looking thru the code it looks possible.  Grab a copy and try it out.

Another option to limit mailbox size is, maybe switch to other MTA, PostFix for example.  I never personally tried it, but learn ed somewhere that mailbox size could be controlled.

good luck.

0
 
LVL 1

Author Comment

by:mfuerlinger
ID: 6880068
The MaxMessageSize flag is only good for general email restriction ?
is there a way to restrict different sizes for different users ?

thanks.

mfuerlinger
0
 
LVL 15

Expert Comment

by:samri
ID: 6881738
I doubt Sendmail has that capability built in by default.  One options for Sendmail is to use libmilter capability.

Or the check_compat() routine should be an option if you prefer to do some hacking.

0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 40

Expert Comment

by:jlevie
ID: 6882532
samri is correct. If you want per-user control of message size you'll have to write your own code to go into check_compat() or into a libmilter filter.
0
 
LVL 15

Expert Comment

by:samri
ID: 6884612
I remember seeing somewhere that Postfix can have control over user mailbox size.  

Perhaps somebody could reconfirm this so that mfuerlinger could have another option.

I have tried to get Postfix up and running - ran into trouble, and decided not to spend more time (yet) on it.

Btw.  As for the mailbox restriction, I would personally might go using different FS for the mailbox spool, and enable userquota on such FS.  There some issues, but it should work.
0
 
LVL 15

Accepted Solution

by:
samri earned 300 total points
ID: 6946857
Does any of the proposed solution works, or do you still need more time to look for other possibilities.

cheers.
0
 
LVL 1

Author Comment

by:mfuerlinger
ID: 9927112
to clean this topic
(meanwhile changed from sendmail to postfix.......still configuring)
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nearly six years ago I was hired by a company to be their senior server engineer. One of my first projects was to implement Exchange Server 2007 on a Windows Server 2008 Single Copy Cluster for high availability. That was the easy part; read on to l…
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question