Issues related to setting up and using your mailserver and mail clients-How to convert mbox files to Maildir manually
Issues related to setting up and using your mailserver and mail clients-How to convert mbox files to Maildir manually-The mb2md script is a simple way to convert any mbox files over to Maildir.
First download the script from http://batleth.sapienti-sat.org/projects/mb2md, eg
wget http://batleth.sapienti-sat.org/projects/mb2md/mb2md-3.20.pl.gz
gunzip mb2md-3.20.pl.gz
mv mb2md-3.20.pl mb2md
chmod 755 mb2md
For simpliciy, we’ve renamed the script to mb2md.
Once setup, you can then convert the account.
Here is a sample for converting virtual pop acounts
./mb2md -s /var/spool/virtual/domain.com/user -R -d /home/username/imap/domain.com/user/Maildir
cd /home/username/imap/domain.com/user/Maildir/cur
chown username:mail *
chmod 660 *
To convert the main system account:
./mb2md -s /var/spool/mail/username -R -d /home/username/Maildir
cd /home/username/Maildir/cur
chown username:mail *
chmod 660 *
The same method can be used to convert the mbox imap folders as well, eg:
./mb2md -s /home/username/imap/domain.com/user/mail -R -d /home/username/imap/domain.com/user/Maildir
More info here: Maildir conversion thread. Includes a shell script to do this automatically for all users (posted by diradmin).
Cannot login with vm-pop3d: User ‘admin’ – failed auth, from=127.0.0.1
If you see:
User ‘admin’ – failed auth, from=127.0.0.1
in your /var/log/messages file, then you may have a newer setup for pam. Edit your /etc/pam.d/vm-pop3d file. Change:
#%PAM-1.0
auth required /lib/security/pam_pwdb.so shadow
account required /lib/security/pam_pwdb.so
To:
#%PAM-1.0
auth required /lib/security/pam_unix.so shadow
account required /lib/security/pam_unix.so
A report for 64-bit systems, the vm-pop3d file should be
#%PAM-1.0
auth required /lib64/security/pam_unix.so shadow
account required /lib64/security/pam_unix.so
Note that it’s recommended to upgrade to dovecot either way.
BYE Service not available xxx1.hostname.com IMAP4rev1 …
If you see the error:
Trying 127.0.0.1…
Connected to localhost.localdomain.
Escape character is ‘^]’.
* BYE Service not available localhost.localdomain IMAP4rev1 2003.339 at Fri, 9 Mar 2007 23:09:15 -0700 (MST)
Connection closed by foreign host.
Then delete your /etc/nologin file.
Prevent adding certain email names using the all_pre.sh script
If you wish to prevent users from adding email names like root, webmaster, postmaster, use the following code in your:
/usr/local/directadmin/scripts/custom/all_pre.sh
script:
#!/bin/sh
blockaccount()
{
if [ “$user” = “$1” ] || [ “$newuser” = “$1” ]; then
echo “You cannot create an account named $1”;
exit 1;
fi
}
if [ “$command” = “/CMD_EMAIL_POP” ]; then
if [ “$action” = “create” ] || [ “$action” = “modify” ]; then
fi
fi
exit 0;