Jobberbase + Dreamhost workarounds

in Tools & Tips

Note: This problem probably applies to other web hosting services as well. But as I have only tested it on Dreamhost (who are excellent by the way), I wanted to write about that specifically.

Dreamhost has certain anti-spam procedures that prevents Jobberbase from working straight out of the box. Default Jobberbase uses a form of PHP Mail() to route job applications direct from online form to employer email (no job applicant data is actually stored on the server). But because Jobberbase does this by crafting the application as an email from the applicant to employer, up to changing the from name and email fields, Dreamhost’s mail server filters think it’s spam.

The trick is to change the from fields on the emails that are sent. I’ve changed the from to say it’s the webmaster of my jobs board (rather than pretending it’s the applicant), and then modified the code to make sure that the applicant name and email were still captured in the body of the message.

The modified email sent to employers looks like this:

From: Online job board webmaster@myjobboard.com
To: Employer company name hr@company.com

Subject: [Job board name] I wish to apply for position name

Message:
Applicant name: applicant name
Applicant email: applicant email

Cover letter:

Cover letter starts here…

The code hacks to make this happen comes in two parts. First, open page_apply.php in your Jobberbase root directory and find the part that begins with $data = array. Below change the apply_msg part to:

'apply_msg' => strip_tags("Applicant name: ".$apply_name."\n"."Applicant email: ".$apply_email."\n \n"."Cover letter: "."\n \n".$apply_msg),

Then open class.Postman.php in the _includes directory and find public function MailApplyOnline($data). Change the line below to:

$mailer->SetFrom('webmaster@your-email-domain.com', 'Your job board name');

The first chunk of code includes the name and email in the body of the message. The second chunk of code sends it from a Google mail address of your choice (preferably the same one you used in Mailer Settings). That’s it!

Update: To retrieve emails blocked by Dreamhost, navigate to your root directory on the FTP and go to Maildir/new for the text logs.


P.S. While you’re patching up Jobberbase, I’d also recommend allowing job posters to use .info email domains. See the fix here.

P.P.S. My contact form on the site was broken too, and I had to modify emails_en.xml (in the translations folder under your selected theme) to turn line 109 into “{BR}{BR}—{BR} Sent by: {SENDER_NAME} at {SENDER_EMAIL}”.

P.P.P.S. The spam bots eventually figured out a way to game the auto-approve-from-previous-posters feature and I had to require moderation for all postings by using one of these hacks. Once you do that, you’ll need to modify the job ad publishing text on the translations.ini in your theme folder.


Jan 21, 2014 update: I’d previously recommended using Gmail for more “secure” email (solution here). But I’ve gone back to using Dreamhost’s default email service set on the same domain as my job board. The reason is that I was getting such a large volume of spam (even with recaptcha on every posting) and bounced-back emails that I was afraid of having my email account flagged by Google. So I switched back to Dreamhost!

Also my recaptcha gave me a “Could not open sockets” error one day and I had to implement the solution below (see original Stack Overflow Q&A) on recaptchalib.php to get it to work:

define("RECAPTCHA_VERIFY_SERVER", gethostbyname("www.google.com"))

By Jason Li

Share this post on

comments powered by Disqus