Saturday, May 8, 2010

How to configure alias, forwarder, virtual domain etc with Qmail?

Take some parameters :

Server :
Local domain :
Remote domain : or
IP : Remote IP : or
A/c :
A/c :

1. Forwarding e-mail to another host :
a. Go to /var/qmail/control directory.
b. Put entries in /var/qmail/control/rcpthosts like:
c. Now go to /var/qmail/control/smtproutes and put or //will forward to remote server.
d. Or : or : //Port mentioned.

2. Users and alias users :-

Qmail uses a different method of handling users and aliases than do other SMTP servers, such as sendmail. In sendmail, all system aliases are defined in the /etc/aliases file. In Qmail, these aliases are defined in "dot-qmail" files, which are found in the /var/qmail/alias directory for system-wide aliases or in the user's home directory for user-specific aliases.

So, here are the steps :
a. cd /var/qmail/alias
touch .qmail-test123
b. Put the following line in that hidden file.
& or like this. Just for e-mail forwarding.
c. To forward e-mail to local users, you could inject the e-mail directly into a mailbox file or a maildir directory. Inside .qmail-test, type this line:

/var/qmail/mailnames/ //for mailbox

No comments:

Post a Comment