Mailing List Archive

SIZE announcement @ connectf
When someone connects to Exim (or any server really) and do an EHLO the
server will return a maximum SIZE they will accept.

I ran a test against a few providers:

SIZE Announced Megabyte
GMAIL 157286400 150.00
Outlook 157286400 150.00
InMotion 52428800 50.00
GoDaddy 104857600 100.00
HostGator 52428800 50.00
Dreamhost 40960000 39.06
One 104857600 100.00
Gmail announces a message of 150 Megabyte, I believe the size they will
accept is actually more in the range of 50 Megabyte.

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?
--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SIZE announcement @ connectf [ In reply to ]
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!)


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/
Re: SIZE announcement @ connectf [ In reply to ]
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@posix.co.za Tel: +27.128070590 Cell: +27.826010496
For fast, reliable, low cost Internet in ZA: https://ftth.posix.co.za


--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/