How do I setup my server for POP3
mail?
First, the domain(s) which you are going to use for mail
need to have MX records that point to your server. If you
are using AceShellss name servers you can do this in the
DNS manager. If you are using the domain(s) for mail and
want a seamless changeover you should leave this step until
last.
The software package we recommend for mail services is postfix,
and you will also need a POP3 daemon; we recommend qpopper.
To install these you can use apt:
apt-get install postfix
apt-get install qpopper
Under RedHat you will need to install qpopper manually.
If you are unsure how to do this, please see the section
on installing RPM's, or contact support.
Postfix needs a couple of changes to its default configuration
file before it will work. Edit /etc/postfix/main.cf and
add / uncomment the following lines:
virtual_maps = hash:/etc/postfix/virtual
inet_interfaces = localhost, <your_ip_address_here>
Finally, you need to add the domain names and email addresses
into /etc/postfix/virtual. The format is as follows:
yourdomain.com vitrual
fred@yourdomain.com fred
bloggs@yourdomain.com fred
simon@yourdomain.com simon@anotherdomain.com
@yourdomain.com john
This will make emails to bloggs@yourdomain.com or fred@yourdomain.com
be delivered to the user "fred". The default mailbox
location is /var/spool/mail/. Any other email sent to something@yourdomain.com
will go to the user "john".
Whenever you make a change to the virual file Postfix's
databases must be rebuild. This can be done by running the
command below while in /etc/postfix:
postmap /etc/postfix/virtual
qpopper will automatically provide POP3 access to the default
mailboxes using normal user validation.
How do I setup my server to act as a SMTP relay?
First, we cannot allow users to setup open relays. They
are security risks and against our AUP.
We would recommend that you use POP3 pre-authentication.
This works by getting the user to fetch their mail by POP3
first. The daemon then caches the user's IP address and
will allow relaying for a limited time (30 mins by default).
The first setup is to setup postfix and qpopper as described
above. If using Debain, then simply install the qpopper-dracd
package:
apt-get install qpopper-dracd
Under Redhat one of the required packages for qpopper is
"dracd". dracd (dynamic relay access control)
is the software that does the authentication as described
above. First install openssl libraries:
apt-get install openssl095a
Then install these RPM packages we have made available for
download:
dracd-1.11
qpopper-4.0.1
wget http://www.AceShells.com/downloads/dracd-1.11-1.i386.rpm
wget http://www.AceShells.com/downloads/qpopper-4.0.1-1.i386.rpm
rpm -Uvh dracd-1.11-1.i386.rpm qpopper-4.0.1-1.i386.rpm
Note: dracd requires portmap which is somewhat insecure
and should only be used if you have setup /etc/hosts.allow
and /etc/hosts.deny, and preferably a firewall also. If
you are unsure how to do this please contact support.
To start using POP3 pre-authentication you need to add/uncomment
this line in /etc/postfix/main.cf:
Debian:
mynetworks = btree:/var/lib/drac/dracd
Redhat:
mynetworks = btree:/etc/mail/dracd
You should then just need to restart xinetd and postfix.
How do I setup an autoresponder?
We suggest using procmail for autoresponders and other
automated mail processing. The first step is to turn on
procmail handling in postfix. Edit /etc/postfix/main.cf
and add/uncomment the following line:
mailbox_command = /usr/bin/procmail
Next create a .procmailrc file in the users home directory.
You can use this as a template:
EMAIL=you@yourdomain.com
SHELL=/bin/sh
:0 Whc: vacation.lock
# Perform a quick check to see if the mail was addressed
to us
* $^(To|Cc):.*$EMAIL
# Don't reply to daemons and mailinglists
* !^FROM_DAEMON
# Mail loops are evil
* $!^X-Loop: $EMAIL
| formail -rD 8192 vacation.cache
:0 ehc # if the name was not in the cache
| (formail -rI"Precedence: junk" -A"From:
$EMAIL" -A"X-Loop: $EMAIL" ; \
cat $HOME/.autoreply; \
) | $SENDMAIL -oi -t
The final step is to write the message you want to be sent
out as the auto response and put the body of that message
in the file .autoreply in the users home directory.