Re: [exim] SIZE announcement @ connectf

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Mark Elkins
Data:  
Para: exim-users
Asunto: Re: [exim] SIZE announcement @ connectf


On 20/03/2018 08:57, Ted Cooper via Exim-users wrote:
> On 20/03/18 12:24, Rob Gunther via Exim-users wrote:
>> [snip]
>> I did this little bit of research because I actually want to accept
>> different max message sizes with Exim - BASED ON THE RECIPIENT DOMAIN.
>>
>> If my Exim server answers, issues a size of 157286400 is there any way I
>> can (must be RFC complaint) reduce the size for specific domains?
>>
>> If the recipient is domain A, I want an actual max SIZE of 35883008 or
>> some value lower than the size announced at initial connection.
>>
>>
>> Any ideas?
> message_size_limit is expandable, so if the mail server can be allocated
> an interface per received domain, it could use that as a key to lookup
> the value.
>
>
> example.com MX 10 interface-one.example.net
> example.org MX 10 interface-two.example.net
>
> message_size_limit = ${lookup {$received_ip_address} iplsearch \
> {SIZES_FILE}{$value}{50M}}
>
> SIZES_FILE:
> 1.1.1.1:    20M
> 2.2.2.2:    150M

>
>
> Otherwise, you're stuck in a Catch-22; SIZE is returned at EHLO, well
> before RCPT TO, and never given to the sender again.
>
> _Some_ sending servers will include SIZE=N on the MAIL FROM line, at
> which time you could take some action. Not universal.
>
> https://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html
>
> (What happened to the anchors on individual items in the manual? Sorry,
> can only link the whole page!)


Hmm... In "transports" - I have a mysql-delivery....

mysql_delivery:
  driver = appendfile
  directory = /var/spool/mail/$domain/$local_part/
  maildir_format = true
  directory_mode = 0755
  create_directory = true
  user = xxxx
  group = yyyy
  mode = 0660
  message_size_limit = ${lookup mysql {select msgsize from users where
user='${local_part}@${domain}'}}M
  quota = ${lookup mysql {select mailquota from users where
user='${local_part}@${domain}'}}M
  quota_is_inclusive=false

I keep the details of each user in a MySQL Database (allows for multiple
applications to use/manage the data) and allow individuals to choose
(within limits) the size of their mail box (quota) and the max size of
any one message (message_size_limit). Seems to work OK. You could limit
this per Domain as well I guess..... I find per user granulation makes
more sense for me.

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