Archive for the 'DirectAdmin Support' Category

How to update your exim.conf in DirectAdmin

You can update your exim.conf by running the following as root:

wget -O /etc/exim.conf http://files.directadmin.com/services/exim.conf
wget -O /etc/exim.pl http://files.directadmin.com/services/exim.pl
chmod 755 /etc/exim.pl
cd /etc/virtual
touch blacklist_domains whitelist_from use_rbl_domains bad_sender_hosts blacklist_senders whitelist_domains whitelist_hosts whitelist_senders
echo 0 > limit
mkdir usage
chown mail:mail blacklist_domains whitelist_from use_rbl_domains bad_sender_hosts blacklist_senders whitelist_domains whitelist_hosts whitelist_senders limit usage

If you are running dovecot, you will need to re-patch your exim.conf:

patch -p0 < /usr/local/directadmin/customapache/exim.conf.dovecot.patch
patch -p0 < /usr/local/directadmin/custombuild/exim.conf.dovecot.patch

Then restart exim:

RedHat:

/sbin/service exim restart
SBDavid

DirectAdmin Mail System Setup

Simple Rules to follow to setup a Mail System

Hostname must not match any domain that is being used on the system. Example, if you have a domain called domain.com and you want to recieve mail on user@domain.com, you must *not* set your hostname to domain.com. We recommend using server.domain.com instead. You must make sure that you add the A record for server.domain.com so that it resolves.

For DirectAdmin

- The hostname must be in the /etc/virtual/domains file.
- The hostname must *not* be in the /etc/virtual/domainowners file.
- The hostname must resolve. If not, add the required A records to the dns zone such that it does.
- The directory /etc/virtual/hostname must exist.. (eg: /etc/virtual/server.domain.com). It must not contain any files
- Any domains that you want to use for email (eg: domain.com) must be in both the /etc/virtual/domains file and the /etc/virtual/domainowners file. The directory /etc/virtual/domain.com must exist and the files /etc/virtual/domain.com/passwd and /etc/virtual/domain.com/aliases exist.

- File permissions for virtual pop inboxes should be (not applicable with Dovecot/Maildir):

/var/spool/virtual/domain.com 770 username:mail
/var/spool/virtual/domain.com/* 660 username:mail

- Make sure that your main server IP has a reverse lookup on it.

The first step is to nofify direct admin regarind this change.

Boot the machine with the new IP address, chage the IP address in the system network setting and not in DirectAdmin.

Now get the new Licence.

cd /usr/local/directadmin/scripts

./getLicense.sh 1234 56789

Replace 1234 with your client ID number, and replace 56789 with your license ID number.

Start DirectAdmin with the new license:

/etc/init.d/directadmin restart

Run the ipswap.sh script to replace the old server IP (1.2.3.4) with the new server IP (4.3.2.1)

cd /usr/local/directadmin/scripts

./ipswap.sh 1.2.3.4 4.3.2.1

Restart everything:

/etc/init.d/httpd restart
/etc/init.d/proftpd restart
/etc/init.d/exim restart
/etc/init.d/dovecot restart

Using Perl to make changes to your DNS files

Example : You would like to change “v=spf1 a mx ip4:1.2.3.4 ?all” to “v=spf1 a mx ip4:1.2.3.4 -all”

of course, where 1.2.3.4 should be replaced by your server IP.

If you’d rather do this to all of your domain, you can use perl

cd /var/named

perl -pi -e ’s/\?all/\-all/’ *.db

change /var/named to the appropriate directory for your db files for your OS (/etc/bind, /etc/namdb)

Restart named after making the changes.

Get exim to listen on another port other than 25

Some ISP’s are now blocking outgoing port 25 which prevents user from using smtp via their server. The workaround is to get exim to listen on another port other than 25 to bypass the ISP’s block.

For example, to get exim to listen on both port 25 and port 587, you’d add the following code to the very top of the /etc/exim.conf file:

daemon_smtp_ports = 25 : 587

Once saved, restart exim:
Redhat:
/sbin/service exim restart

FreeBSD:
/usr/local/etc/rc.d/exim restart

More
: http://www.exim.org/exim-html-4.40/doc/html/spec_13.html#SECT13.5

« Prev - Next »