Archive for the ‘Exim’ category

Lowest numbered MX record points to localhost

July 29th, 2010

If you see the following in exim’s main_log:

temporarily rejected RCPT : lowest numbered MX record points to local host

This indicates that the domain doesn’t exist in /etc/localdomains. Edit the file with your favorite editor and ensure it’s listed there.

At the same time, you’ll want to ensure it isn’t listed in /etc/remotedomains.

Share

Automatically Create DomainKeys Records When Creating Account

May 21st, 2010

Hopefully this will someday be an option in “Tweak Settings”, but in the meantime, you can add DomainKeys records to your customers DNS zones automatically by creating a “hook” which will be run after /scripts/wwwacct (the script behind “Create an Account” in WHM).

You’ll want to create a file called /scripts/postwwwacct, and add the following content:

my %OPTS = @ARGV;
my $user = $OPTS{’user’};
/usr/local/cpanel/bin/domain_keys_installer $user

You’re all set now — there’s nothing else that needs to be done. Note that this only creates the DomainKeys records for new accounts. If you want to create DomainKeys records for all your existing users at once, check out my other article on the topic: http://www.cpaneladmins.com/2009/12/07/install-domainkeys-and-spf-records-for-all-users/

Share

Adding SPF records for a user via SSH

May 6th, 2010

# /usr/local/cpanel/bin/spf_installer USERNAME

Share

Exim Guide

May 3rd, 2010

I could write up a post on exim commands, but it would take some time, and “Bradthemad” has already done it. With that, the exim cheatsheet.

Share

Bug in Mailman version 2.1.12.cp3

April 10th, 2010

Error:Bug in Mailman version 2.1.12.cp3

We're sorry, we hit a bug!

Let’s make sure that all other permissions are set properly:

# ./usr/local/cpanel/3rdparty/mailman/bin/check_perms
No problems found

As mailman is working properly on this server, no errors were discovered, but as you’re received the error above, you’ll likely see some errors displayed.

Share

DomainKeys and SPF Record Checking

April 10th, 2010

You probably know that you can configure DomainKeys and SPF records in cPanel >> Email Authentication (if you didn’t, there you go :) ). If you’d like to confirm that your TXT records are working properly, here are some resources for you:

SPF Record Check – via HTTP
PoliteMail’s SPF Check – outputs a brief breakdown of your records details – the IP addresses permitted in the record, the hostname, and the mailserver name. Then outputs the TXT record it queried.

MXToolBox’s SuperTool – Provides SPF checks, among other useful queries.

kitterman.com

SPF Record Check – via email
This is pretty neat – you can send an email to spf-test@openspf.org from the domain you want to test, and it will reject the message, but in that rejection message, you’ll see the results of your test:

spf-test@openspf.org
SMTP error from remote mail server after RCPT TO::
host mailout02.controlledmail.com [72.81.252.18]:
550 5.7.1 : Recipient address rejected:
SPF Tests: Mail-From Result="pass": Mail From="test@cpaneladmins.com" HELO name="server.cpaneladmins.com" HELO Result="none" Remote IP="12.34.56.78"

DomainKeys Record Check

http://www.mailradar.com/domainkeys/

Other Resources:
OpenSPF.org’s Wizard – If you want to configure SPF records manually, go here. Note that you won’t be able to edit the records via cPanel >> Email Authentication later on, though.

Share

Install DomainKeys and SPF Records for All Users

December 7th, 2009


cd /var/cpanel/users
for user in * ; do /usr/local/cpanel/bin/domain_keys_installer $user ; done
for user in * ; do /usr/local/cpanel/bin/spf_installer $user ; done

Share

Configuring DomainKeys from the CLI

September 28th, 2009
/usr/local/cpanel/bin/domain_keys_installer USERNAME
Share

Track down “nobody” spammers, Add Extended Logging To Exim

September 25th, 2009

If you’re seeing outgoing spam from nobody@your.hostname.tld, you can track it down fairly easily.

In WHM, go to Exim Configuration Editor, then select Advanced Editor. In the first field, paste in:


log_selector = +address_rewrite +all_parents +arguments +connection_reject +delay_delivery +delivery_size +dnslist_defer +incoming_interface +incoming_port +lost_incoming_connection +queue_run +received_sender +received_recipients +retry_defer +sender_on_delivery +size_reject +skip_delivery +smtp_confirmation +smtp_connection +smtp_protocol_error +smtp_syntax_error +subject

You will then see extended logging in /var/log/exim_mainlog. You can simply run

grep cwd=/home /var/log/exim_mainlog

and that will show you the path for any user that is sending email via sendmail through exim. It won’t give you the filename, but at least you’ll have the user/folder name, and you can look through the scripts from there.

Share

How to run Exim on a Secondary Port

September 24th, 2009

Some ISPs will filter or completely block traffic on port 25, so you may want to make another port available to your customers.  To configure exim to listen on a secondary port:

Navigate to WHM -> Service Configuration -> Service Manager, then check the box for “exim on another port.”  You can use the default secondary port of 26, or enter your own.

Picture 3

Share

cPanel Web Site Hosting by IntraHost