Page 1 of 1

[SOLVED] Mass mailing w/ Exim 4

Posted: Fri Apr 27, 2007 5:09 pm
by digitalcowboy
Hi all,

I'm an experienced developer that is nonetheless a complete n00b with Swift Mailer, mass mailing and more specifically Exim administration. Here's my situation:

I'm sending thousands of personalized emails to subscribers using Swiftmailer. (I'm using a SwiftMailer component for CakePHP but I doubt that information is relevant to the problem I'm having.) I'm on a dedicated server so I have complete control and no knowledge about how to wield my massive root powers in this instance. }: -) Exim is shutting me down after a few emails with this:

Code: Select all

failed to expand condition "${perl{checkspam}}" for lookuphost router: Domain {mydomain}.com has exceeded the max emails per hour. Message discarded.
I'm sending one email at a time (from a loop that builds the email from database queries) with SwiftMailer using native connection, "from" a valid email account on the domain which is also the hostname on this server. I think I have all the DNS records set up correctly - A records for the domain and the hostname, MX records for both, etc.

Can someone more knowledgeable help me with these questions - 1) Can this be easily corrected with a change in the way I'm using Swift (change to authenticated SMTP, maybe)? 2) How? 3) Will I need to set something in the Exim config to tell it that mass mail from this domain/user/script is OK? 4) If so, how?

I saw in the Exim config where this flag is coming from and it looks like there are ways to set this up. I could probably figure this out with some research but I don't really have the time on this project to dig that far in and more important, this is a live client site/production server. So I can't afford any (more *gulp*) trial and error mistakes, like nuking the SMTP server with a bad config, while I'm learning this stuff.

Any help from some gurus would be much appreciated.

Mark

Posted: Sat Apr 28, 2007 5:25 am
by Chris Corbyn
Before I start, this will be better directed at the Exim mailing lists since it's Exim, not Swift.

There are two errors here. The "failed to expand condition" is an Exim problem. It appears to be the transport for passing mail through SpamAssassin... I wouldn't worry too much about that because Exim's configuration is very complex (it's like a programming language which talks to Perl). Under normal conditions I'm sure that's working fine.

Anyway, the end of the error message tells you what the problem is... Exim is set up with a max number of emails per-hour and you've exceeded that. I'm guessing the condition which evaluates this is in the "routers" configuration. Just grep the configuration for "lookuphost". You should find what you need to remove in there.

It's not a Swift problem, it's your mail server's configuration, but either way, if you know what the max-per-hour is you can set this with the Throttler plugin in Swift :)

http://www.swiftmailer.org/wikidocs/v3/ ... /throttler

Solved

Posted: Sat Apr 28, 2007 6:52 pm
by digitalcowboy
Thanks for your reply.

I was aware that this wasn't a Swift Mailer specific issue but was hoping someone else using Swift had encountered it. The Exim mailing list archive turned up someone else asking the same question and getting no help from the list. (They were rather rude about it, in fact.) I have managed to track this down and, if you don't mind, I'd like to post the simple solution here for others that might be looking for the answer.

This is a cPanel config setting that limits the "max emails per hour." This is why the folks on the Exim list were no help - it's a spam check that is external to Exim, though apparently a common setup.

The "max emails per hour" variable is checked by exim.pl, which is NOT a standard part of Exim but called by perl_startup in the exim.conf (where this setup is used). The variable is actually SET in cpanel.config. On my system (which is probably typical) that config file is found in /var/cpanel/.

From there it's plain and simple. On my system, in that file, there was a line that read "maxemailsperhour=500".

Thanks for Swift Mailer. I'm very pleased with it and I appreciate you taking a stab at helping me even though this clearly wasn't a Swift issue.