Archive

Archive for July, 2009

Qmail vpopmail transfer

July 31st, 2009

Another challenging task for server admin is to transfer the existing qmail with vpopmail to another server. Copying qmail and vpopmail directory won’t work

Here are the steps you need to keep in mind and follow if you are going to install qmail and vpopmail in the same path

qmail -> /var/qmail
vpopmail -> /home/vpopmail

1) Install qmail and vpopmail as per the instruction in new server using qmailrocks docs
By default the installation of vpopmail will be in /home/vpopmail.

2) Copy the contents of /var/qmail/control and /var/qmail/users to the new server

3) Take the dump of vpopmail database you can view the details of database in the path

cat ~vpopmail/etc/vpopmail.mysql

4) Copy the file in the new server

5) Dump the database

6) rsync the ~vpopmail/domains/ to~vpopmail the new server ~vpopmail/domains/ folder

7) chown vpopmail.vchkpw ~vpopmail -R

8) This step is most important, you should verify the uid of vpopmail and gid of vchkpw and they should be same in the new server too. The file /var/qmail/users/assign will have the details of uid and gid of the old server.

In the second scenario

Old server

qmail -> /var/qmail
vpopmail -> /var/qmail/vpopmail

New server

qmail -> /var/qmail
vpopmail -> /home/vpopmail

Here you need to worry about the path mentioned for the mail accounts in the vpopmail database. Take the dump of the database you can edit the dump using vi and sed as usually it won’t be that big since it contains only information about the mail account and its path not the entire mails. You need to alter the path with the new installation path.

open the dump file with vi editor

:%s/var//qmail//vpopmail//home//vpopmail/g 

Rest of the steps are same as above.

PS: Dont just copy vpopmail to new server it is not going to work, vpop binaries like vuserinfo has the installation path in it and it will give out errors.

VN:F [1.9.1_1087]
Rating: 6.4/10 (5 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

Shijil T S Mailservice, linux

Qmailrocks qmail install

July 31st, 2009

Qmail is one of the favorite MTA’s of server admins and needless to mention most of us use qmailrocks documentation qmailrocks.org for installing it.

Even after following the complete steps you still will have problem with the mail service, like when you try to test the connectivity to mailserver using telnet you will get the error like

 Connection closed by foreign host

immediately.

Next thing you need to do is to tail the log file of smtpd

 tail /var/log/qmail/qmail-smtpd/current 

You will see the output something like

 /var/qmail/bin/qmail-smtpd: error while loading shared libraries: libselinux.so.1: failed to map segment from shared object: Cannot allocate memory 

The problem is with the softlimit set in

 /var/qmail/supervise/qmail-smtpd/run  

go the the line

 exec /usr/local/bin/softlimit -m 30000000   

and change it to

 exec /usr/local/bin/softlimit -m 50000000  

restart qmail


qmailctl stop
qmailctl start 

Your mailserver still have problems in sending mails, you should also check whether the RDNS set for the main ip of the server

Good to go :)

VN:F [1.9.1_1087]
Rating: 5.5/10 (2 votes cast)
VN:F [1.9.1_1087]
Rating: 0 (from 0 votes)

admin Mailservice, linux