Installing qmail

I have been planning on installing mail on this server for quite some time but never really got around to do it, until now. So qmail it is. Found the website and followed their FreeBSD installation guide.

The only thing that has not really been as described is the php.ini file. I didnt have any at all but I had the distribution one so I made a copy of it:

cp /usr/local/etc/php.ini-dist /usr/local/etc/php.ini

I got as far as to page 13, has to continue some other day.

Update 2004-07-21: Today I got a bit further and now I have both CLAM antivirus protection and SpamAssassin installed.
Update 2004-08-30: Today I finished the whole installation according to qmailrocks but there are still things to be done:

2004-09-03: Continuing with qmail. So I found out by reading LifeWithQmail that the /var/qmail/users/assign controlls which users that gets addresses. Though when I ran qmail-pw2u I got this error all the time:

qmail-pw2u: fatal: unable to find alias user

and I couldn’t figure out why. Reading in some forums I started to get a clue. If a include file exists it must list alias otherwise will qmail-pw2u give this error. Which is a bit strange, specifically since I had an assignment file without alias before I started to look into this. The assignment file that is produced from the QmailRocks installation doesn’t have it and qmail definetly works after that installation.

So should I edit my newly created assign file and remove alias or should it be kept? The generated file includes three different alias rules, and according to the documentation the alias user is a catch-all user.

Still cannot get it to work to send e-mail to an ordinary user: gets: Sorry, no mailbox here by that name. vpopmail (#5.1.1)

Upgrade 4.8 -> 4.10

So once more I upgraded my system. It gets smother and smother. This time, the only problem I had was that I could not the machine to route any traffic through. It turned out that I should not remove the IPDIVERT option from the kernel config. I dont really understand why since what I read on hte man-pages it should only be used if you divert traffic to a specific socket. I dont think I do that… but I must since I need it.

EDIT: Should have read the firewall configuration more carefully!
# Network Address Translation. This rule is placed here deliberately
# so that it does not interfere with the surrounding address-checking
# rules. If for example one of your internal LAN machines had its IP
# address set to then an incoming packet for it after being
# translated by natd(8) would match the `deny’ rule above. Similarly
# an outgoing packet originated from it before being translated would
# match the `deny’ rule below.
case ${natd_enable} in
if [ -n ”${natd_interface}” ]; then
${fwcmd} add divert natd all from any to any via ${natd_interface}

There is the rule that use DIVERT!

Upgrade 4.7-> 4.8

Some programs like TeamSpeak does not work with 4.7, neither did the USB mass storage device work eitehr so see if 4.8 will help fix this. I’m using /stadn/sysinstall to upgrade. The process seems quite straight forward.

But turned out to take much longer time…
After doing the upgrade I realized that I actually had an older kernel than before, even older than the release. It was 4.7 Generic kernel, I had not set the configure option to 4.8-RELEASE and thus just downloaded 4.7 once more.

After changing the option to 4.8-RELEASE I ran into another problem or misshapp. Somehow the upgrade process failed and hang during the ftp session. I aborted the upgrade but it turned out that all files in /etc had been replaced with the ones from the upgrade, thus I could not login to the machine remotely since no users exsisted anymore. Had to drag out the box out of the closet and plugin in the keyboard and a monitor. Login in locally worked. But how to get the backup(Yes I had a backup made in case…) of etc/ was not soo easy. Finally I figured out I could use a friends ftp site and uploade the backup from my PC and download it to the server. Replaced all files and we were back!

But still only had 4.7… So another try at /stand/sysinstall, changed options and this time it worked.

Time to reboot the system.
FAIL: Got “Device not Configured” for one of the harddrives. Turned out after some investigation that my 4.7 kernel did not use static numbering of ata drives while the new did. So boot the old kernel and modify fstab to the new drive numbering and now it worked just fine.

At this point of the upgrade my outside access did not work because the GENERIC kernel does not include.

I had to build a new kernel and install it. I used the same Kernel config as for 4.7 but checked it for changes, there were only a few. Though while editing the file I made sure that the new kernel also would have static ATA device numberign to make it easier next time.

To configure the kernel:

  1. cd /usr/src/sys/i386/conf

Make a copy of GENERIC called NEWKER and modify it to your taste.

To start the build process use the config command :

  1. config NEWKER

After this step you will get the following message

Don’t forget to do make depend

If you get any errors in this step, then there is a problem in your configuration file. Check the file again and edit it. Refer to GENERIC and LINT for more details regarding device drivers.

Go to the following directory and compile the kernel.

  1. cd /usr/src/sys/compile/NEWKER

Do the following steps to compile the kernel:

  1. make depend
  2. make
  3. make install

After rebooting the system all worked, even TeamSpeak and USB mass!

Network problem with DNS

Yesterday evening I was trying to help Johan install FreeBSD on his server machine. He thought it could be interesting to try FreeBSD since it is much more secure than Windows. He had doubts having a Windows machine up on the net 24/7. So I brought the 4.7 floppies and started to install and all went well until teh installation should resolve the name of the naem of the ftp server we used( I have experienced that problems before with installing FreeBSD, for instance on the old laptop I have here.
I think the problem has to do with the ARP tables in the router is not updated and therefore the return traffic does not return to the host as it should. But I’m not really sure about it since yesterday Johan first brought up windows on the machine to transfer some files from it before we erased the HD to install FreeBSD. He was viewing some webpages so obviously had access to the net. Then we restarted machine, used DHCP to get the IP number so we would get the same as windows had used before. But the installation could not resolve the ftpserver name.
Anyone got any clue on this?