Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
mysql + courier + postfix - HOWTO help
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
stard
n00b
n00b


Joined: 14 Dec 2006
Posts: 7

PostPosted: Thu Dec 14, 2006 9:49 am    Post subject: mysql + courier + postfix - HOWTO help Reply with quote

Hi

I have followed the HowTo at http://www.gentoo.org/doc/en/virt-mail-howto.xml. The only major difference is the use of apache2 with php5 even though it states it is not supported. I have found that the phpmyadmin and apache work fine together.

My problem is understanding how to get the virtual mailbox support working.

Local accounts currently work fine but I can't seem to get the database entries correct for the virtual accounts to work.

postfix states that it cant deliver the mail to the user but the username seems to be translated into the path of the mailbox for the user.

log file entry
to=</home/vmail/testdomain.com/test/.maildir/@testdomain.com>

of course testdomain is not the real domain name from the log.

I will be hosting two domain names on the server one is the domain of the server and I would rather use virtual mailboxes for both even though one is local.

Any hints/tips/guides on how to configure the setup correctly?
Back to top
View user's profile Send private message
stard
n00b
n00b


Joined: 14 Dec 2006
Posts: 7

PostPosted: Fri Dec 15, 2006 3:17 am    Post subject: Reply with quote

Anyone have any ideas at all?
Back to top
View user's profile Send private message
stard
n00b
n00b


Joined: 14 Dec 2006
Posts: 7

PostPosted: Fri Dec 15, 2006 4:20 am    Post subject: Reply with quote

OK, I found one problem, the mysql-virtual.cf was pointing at the wrong table, my bad. It doesn't give the error shown above now but it just rejects the mail with an 451 <test@testdomain.com>: Temporary lookup failure message in the postfix log instead as well as an undeliverable mail to the sender.

I have the user setup in the users table and I have tried with the domain name as both local and virtual in the transport table with the same result.


Any help would be appreciated.
:?
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Dec 15, 2006 6:01 pm    Post subject: Reply with quote

Can't see people queuing up to help here. I think it's on the basis that if you follow the HOWTO then it will work.

I don't think I can be bothered to go through the docs but here's my 2p.

I can't see any requirement for you to understand the tables. You configure Postfix per the docs. You create the tables, per the docs, using a provided .sql file. You use phpmyadmin. What's to understand?

I personally use Postfix, Postfixadmin, MySQL 5, PHP5 and Apache2, with Dovecot, so I may be able to help.

I think you need to restart Postfix and check the logs as you may have a general error in your config.

Then watch the logs for all errors around time of delivery.

You need to have thoroughly checked your Postfix configs against the HOWTO as a prerequisite.
Back to top
View user's profile Send private message
stard
n00b
n00b


Joined: 14 Dec 2006
Posts: 7

PostPosted: Sat Dec 16, 2006 11:28 am    Post subject: Reply with quote

I have followed the how to up to the installation of squirrelmail.

I have rechecked the postfix, sasl and courier configs and they seem to all be correct.

As far as I can tell the only major difference between what I have done and the HOWTO is that the version of apache and php are different which I am fairly sure are irrelevant to the problem I am having.

If I disable the sql lookup I can deliver mail to and from local users fine along with being able to imap/pop the mailboxes.

When I reconfigure it to use sql I get the 451 error. As for understanding the tables I am sure it would be useful to understand what each table was actually for and the intention of the content for each? If the tables were left in the original state after using the .sql file then the domain names and account names would all be incorrect. It may not be understand the tables themselves in this case then more understanding what is actually in them?

Thanks for replying.
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Sat Dec 16, 2006 8:22 pm    Post subject: Reply with quote

The tables themselves are just an alternative way to give Postfix and Courier their configs/data. Postfix needs to now which domains to accept mail for and which users relate to those domains. Courier needs to know what usernames it has and what their passwords are. Both need to know the location of the maildirs for the users.

Part of the howto tries to explain thusly

Quote:

Your new database has default values and tables set up for two domains. The following tables are included:

* alias - local email alias and mailman alias information.
* relocated - relocated user email address maps
* transport - default mail transport information for all domains you are hosting
* users - all user account information
* virtual - virtual domain email alias maps



I used Postfixadmin to create and admin my virtual users, so it did the legwork.

The config files tell Postfix what kind of SQL query it can run to get each type of information. It is also given the location of the database and the credentials it needs.

Hope this is some kind of help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum