[exim] message_size_limit

Top Page
Delete this message
Reply to this message
Author: Mark Elkins
Date:  
To: exim-users
Subject: [exim] message_size_limit
Hi,

I run an ISP and provide e-mail services for a few thousand people. I
run exim on a gentoo machine. My users details are stored in a mysql
database.

Every now an then, I get a complaint that mails don't come through. Its
due to my message_size_limit

I have a global message_size_limit of 100M

I also have a per user configurable limit - the value is in the DB
table...  and a configurable quote per person - so my 'delivery' block
looks like...

----------------------------------------------------------
mysql_delivery:
  driver = appendfile
  directory = /var/spool/mail/$domain/$local_part/
  maildir_format = true
  directory_mode = 0755
  create_directory = true
  user = smmsp
  group = smmsp
  mode = 0660
  message_size_limit = ${lookup mysql {select imsize from admin \
    where user='${local_part}@${domain}'}}M
  quota = ${lookup mysql {select mquota from admin \
    where user='${local_part}@${domain}'}}M
  quota_is_inclusive=false
  quota_warn_threshold = 80%

  message_suffix = ${lookup mysql {insert into maillog set
mfrom='${quote_mysql:$sender_address}',\
    mto='${quote_mysql:$local_part}@${domain}', domain='${domain}',
mvia='${quote_mysql:$sender_host_address}',\
    msize=${message_size}, mdelivered=current_timestamp,
mailid='$message_id', mspam='$spam_score_int',\
    mreturn='${quote_mysql:$return_path}' }{}{}}

  quota_warn_message = "\
    To: $local_part@$domain\n\
    Subject: Mailbox is 80% full\n\n\
    This message is automatically created by the mail delivery system.\n\n\
    The size of your mailbox has exceeded the warning threshold of 80%.\n\
    Please consider cleaning out old e-mail or reducing the number of
days\n\
    you keep mail on the system (a local E-Mail setting).\n\n\
    Mark Elkins - mje@???\n"
----------------------------------------------------------

When an e-mail bounces back to the sender - it does not appear to have
any "Message too big" message in the bounced e-mail. How do I fix that?

Is there a way to also send a brief e-mail to the recipient client that
there was a problem - that someone was sending an e-mail that was too
big of X bytes and that their limit is Y bytes..... something similar to
"quota_warn_message" ??

--

Mark James ELKINS  -  Posix Systems - (South) Africa
mje@??? Tel: +27.826010496 <tel:+27826010496>
For fast, reliable, low cost Internet in ZA: https://ftth.posix.co.za