Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: exim: users

Rate limit Outgoing mail based on recipient domain

 

 

exim users RSS feed   Index | Next | Previous | View Threaded


ludaludaluda at gmail

Dec 31, 2010, 1:01 PM

Post #1 of 5 (1130 views)
Permalink
Rate limit Outgoing mail based on recipient domain

Hi,

What I am looking for is a way to rate limit outgoing emails on the basis of
the domain to which the email is going to.

For instance, let's say I want only 5 emails per minute to yahoo.com, and I
don't want gmail.com emails to be affected once yahoo has reached it's rate
limit. I however want to resume sending yahoo emails once the limit has
expired.

I do not the sender to influence this rate limit at all, only recipients.

I don't want to use extra software to do this, I want it to be a "pure" exim
solution.

Thank you
--
## List details at http://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/


Lena at lena

Jan 1, 2011, 4:18 AM

Post #2 of 5 (1123 views)
Permalink
Re: Rate limit Outgoing mail based on recipient domain [In reply to]

> From: luda posch

> For instance, let's say I want only 5 emails per minute to yahoo.com

Not a reply to your question, but can help with sending to yahooMail
(one connection at a time, max 5 messages per connection):

begin routers
remote_domains_throttled:
driver = dnslookup
domains = \N^yahoo\.\N : rocketmail.com : ymail.com : y7mail.com : \
btinternet.com : btopenworld.com : att.net : sbcglobal.net : rogers.com
retry_use_local_part
transport = throttled_smtp

remote_domains:
driver = dnslookup
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : \
10.0.0.0/8 : 172.16.0.0/12 : 192.168.0.0/16
self = pass
no_more
...
begin transports
throttled_smtp:
driver = smtp
connection_max_messages = 5
serialize_hosts = *
retry_use_local_part


--
## List details at http://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/


samuel.d.darwin at gmail

Feb 14, 2012, 12:42 PM

Post #3 of 5 (636 views)
Permalink
Re: Rate limit Outgoing mail based on recipient domain [In reply to]

I hope this is added to the following thread: *Author: *Lena *Date: *
2011-01-01 07:18 -500 *To: *exim-users *Subject: *Re: [exim] Rate limit
Outgoing mail based on recipient domain

Firstly, I wonder if anyone else has further feedback about rate limiting
outgoing mail. It seems that serialize_hosts is an all or nothing
proposal. It would be better to limit outgoing connections in a fine
grained way , such as to 5 connections maximum. Such a setting doesn't
exist. Could there be a request to add such a setting?

Secondly, there is at least one report here (
http://forums.cpanel.net/f34/outbound-mail-throttling-213861.html#post1076581 )
which says that Lena's solution doesn't work , and that messages are
"dumped".
--
## 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/


Lena at lena

Feb 15, 2012, 4:48 AM

Post #4 of 5 (661 views)
Permalink
Re: Rate limit Outgoing mail based on recipient domain [In reply to]

> From: Sam Darwin

> there is at least one report here (
> http://forums.cpanel.net/f34/outbound-mail-throttling-213861.html#post1076581
> which says that Lena's solution doesn't work , and that messages are
> "dumped".

I (as an user) switched from an usual web-hosting with cPanel to VPS
because my previous web-hosting confessed that they delete all messages in
Exim queue daily with an explanation that else the machine's load average
becomes too high (I think because of repeated attemtps to deliver spam from
compromised or malicious users to non-existent recipients or to
MX servers which blacklisted the cPanel machine).
Exim runs on the same machine as Apache, CGI scripts and cPanel daemons.
Web-hostings try to cram as many users into each machine as they can,
and tend to not spend efforts to weed out spamming or compromised users.
Apparently, deleting all messages in Exim queue is
usual routine for web-hosting admins who use cPanel.
Perhaps one of many cPanel scripts does that among other things.
An admin may even not realise that that script does that.

--
## 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/


exim-users at lists

Feb 15, 2012, 4:59 AM

Post #5 of 5 (627 views)
Permalink
Re: Rate limit Outgoing mail based on recipient domain [In reply to]

On 15/02/12 12:48, Lena [at] lena wrote:

>> there is at least one report here (
>> http://forums.cpanel.net/f34/outbound-mail-throttling-213861.html#post1076581
>> which says that Lena's solution doesn't work , and that messages are
>> "dumped".
>
> I (as an user) switched from an usual web-hosting with cPanel to VPS
> because my previous web-hosting confessed that they delete all messages in
> Exim queue daily with an explanation that else the machine's load average
> becomes too high (I think because of repeated attemtps to deliver spam from
> compromised or malicious users to non-existent recipients or to
> MX servers which blacklisted the cPanel machine).
> Exim runs on the same machine as Apache, CGI scripts and cPanel daemons.
> Web-hostings try to cram as many users into each machine as they can,
> and tend to not spend efforts to weed out spamming or compromised users.
> Apparently, deleting all messages in Exim queue is
> usual routine for web-hosting admins who use cPanel.
> Perhaps one of many cPanel scripts does that among other things.
> An admin may even not realise that that script does that.

I used to work at a web host. Exim was configured on each webserver to
pass off mail to a smarthost. However, we rate limited how many emails
each user could send. It was a custom solution which recorded and looked
up "messages sent" data in a mysql database. I installed an ident server
to make it possible to rate limit mail that was sent by connecting to
127.0.0.1:25, as well as that sent by running the exim binary. You
exceed the limit, and your email is rejected at SMTP time. The firewall
on each web hosting box prevented outgoing SMTP connections, so the only
SMTP server you could use was the local rate limited one. And in turn,
the only one that could connect to was the smarthost (iptables can match
outgoing connections based on the uid of the process making the connection)

--
Mike Cardwell https://grepular.com/ http://cardwellit.com/
OpenPGP Key 35BC AF1D 3AA2 1F84 3DC3 B0CF 70A5 F512 0018 461F
XMPP OTR Key 8924 B06A 7917 AAF3 DBB1 BF1B 295C 3C78 3EF1 46B4
Attachments: signature.asc (0.58 KB)

exim users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.