ianw1974 Posted December 14, 2005 Report Share Posted December 14, 2005 I've been following a howto on setting up a Mail Server using Postfix/MySQL. It's all working fine, but I'm trying to tidy things up, because I don't understand a few things. Note, I've abbreviated a lot of table info, because it's just to get a gist of what's there. First off, there are a few tables created, most of which I know what are doing. There is one however, I don't know why it exists. The tables I have are: alias relocated transport users virtual The alias table is simple. It's used for local users, like root, or admin, etc, that exist on the Linux system, so you have: admin = admin@mydomain.com The transport table is where I set up the normal domains, or virtual domains. So: mydomain.com = local: virtual.mydomain.com = virtual The users table is where I configure the users, so: admin@mydomain.com = /home/admin/.maildir ian@virtual.mydomain.com = /home/vmail/ian/.maildir The virtual table, then tells me to redirect for virtual users, so: ian@mydomain.com = ian@virtual.mydomain.com this is so that the email ends up in his /home/vmail/ian/.maildir, otherwise I get user "ian" doesn't exist, because it tries to map it to the user ian that doesn't exist on the Linux system as a user - because he's virtual. The problem is, I don't know why I need the relocated table. I've been trying to figure out a better way for logging in through webmail. The reason is, my virtual users HAVE to log in using ian@virtual.mydomain.com instead of ian@mydomain.com. At first I thought the relocated table would solve this, so I could redirect in a similar way for the routing of emails to the virtual account. But it doesn't work. I did think of setting my virtual domain so it just said "work". Then the user would log in with ian@work via webmail. However, when I do this, the email doesn't forward to the account, and fails because it then appends the rest of the domain to the end of the name. So, it would become ian@work.mydomain.com. Anyone any ideas as to what relocated is for, and how I can clean up the virtual logins? I know I could just create Linux usernames and passwords, but that gets round the whole point of the virtual user process. Just for info, the link for the virtual howto is: http://www.gentoo.org/doc/en/virt-mail-how...style=printable Quote Link to comment Share on other sites More sharing options...
aioshin Posted December 15, 2005 Report Share Posted December 15, 2005 this will not answer directly your questions, but might help on setting up a mail server that depends on mysql database http://postfixwiki.org/index.php?title=Vir...-IMAP_and_MySQL I have tried it successfully on centos but never made it on mandriva Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 15, 2005 Author Report Share Posted December 15, 2005 I know why I'm getting the problem, it's because when I log into webmail, it looks at the users table. I just need to figure a way to clean it up. I would need to point the login lookups to another table so it can figure out one email address, points to the users database for the username and password, and then go from there. However, I'm not sure how I would do this, so I'll investigate and figure out how I can tidy it up. I'll check the link though, as there might be something in there that may help. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted December 15, 2005 Author Report Share Posted December 15, 2005 I've actually solved the problem this morning now. It was really simply. All I had to do was create another field within the table, of which I called "login". I put this between the first and third columns which were "id" and "email". Then I filled with a username, be it, admin, ian, etc, etc. Then I edited the /etc/courier/authlib/authmysqlrc file so that the field: MYSQL_LOGIN_FIELD login before this was pointing to the "email" field, which was why I was having problems. Now I don't have any problems at all :P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.