Page 1 of 1

Exim queued partial mail

Posted: Mon Aug 20, 2018 11:07 pm
by gatsukito
Good morning.

I have a VPS with many users, and they are a little spammers. I have modified exim4.conf.template for restrict mails by account and amount.

Mails limit by vesta user:

Code: Select all

# for PHP scripts, limit per vesta user
acl_not_smtp:

  deny    message       = Web site of $authenticated_id user is sending too much emails - rate overlimit = $sender_rate / $sender_rate_period IP is $sender_host_address
  ratelimit             = 50 / 1s / $authenticated_id

  deny    message       = Web site of $authenticated_id user is sending too much emails - rate overlimit = $sender_rate / $sender_rate_period IP is $sender_host_address
  ratelimit             = 100 / 1h / $authenticated_id
Mails limit by user account:

Code: Select all

acl_check_rcpt:

deny    message       = Email account $authenticated_id is sending too much emails - rate overlimit = $sender_rate / $sender_rate_period
          set acl_c_msg_limit = ${lookup{$sender_address}nwildlsearch{/etc/exim4/send_limits}}
          ratelimit     = $acl_c_msg_limit / 1h / strict/ $authenticated_id
Limit max address in a mail

Code: Select all

acl_check_data:

# Limitar a un máximo de destinatarios
  deny    message = No se pudo enviar el correo, demasiados destinatarios
          condition = ${if >{ ${listcount:${addresses:$h_To:,$h_Cc:,$h_Bcc:}} }{100} {yes}{no}}
I need now than if an user send a mail to 150 addresses, exim can send first 100 addresses, and an hour next, next 50.

Somebody can help me? It is an example, but I accept another answer.

Thanks a lot.

Re: Exim queued partial mail

Posted: Sat Aug 25, 2018 12:09 pm
by gatsukito
Well, I have solved this problem a little hardy. I have limited max recipents for any user, including bcc.

At the first configuration of exim, before acl definition

recipients_max = 50