Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix 2.2.5 upgrade problem [SOLVED]
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
BlueSol
n00b
n00b


Joined: 13 Oct 2003
Posts: 4
Location: Sunnyvale, CA, US

PostPosted: Wed Dec 28, 2005 2:28 pm    Post subject: Postfix 2.2.5 upgrade problem [SOLVED] Reply with quote

So I finally took the plunge and upgraded to postfix 2.2.5 from postfix 2.1.5. This upgrade was not automatic due to all the changes. I thought I had everything covered until I realized that my server was refusing outside SMTP connections. I hadn't changed my main.cf file as I was not affected by any of the newer revision changes. As far as I can tell, postfix is not looking into my database for virtual_mailbox_domains.

The following does not work...
Code:

# main.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf


Code:

# mysql/mysql_virtual_domains_maps.cf
user = postfix
password = PASSWORD
hosts = localhost
dbname = postfix
table = domain
select_field = description
where_field = domain
additional_conditions = and backupmx = '0' and active = '1'


Manually adding in domains does work...
Code:

# main.cf
virtual_mailbox_domains = mydomain.com, mysql:/etc/postfix/mysql/mysql_virtual_domains_maps.cf


Any ideas? It worked in 2.1.5 just fine.


Last edited by BlueSol on Wed Dec 28, 2005 9:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


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

PostPosted: Wed Dec 28, 2005 2:41 pm    Post subject: Reply with quote

Did you run postfix upgrade-configuration ?

What exactly goes on in your logs wehn you start Postfix?

What made you draw the conclusion is isn't using the DB?
Back to top
View user's profile Send private message
langthang
Retired Dev
Retired Dev


Joined: 27 Nov 2003
Posts: 620

PostPosted: Wed Dec 28, 2005 6:25 pm    Post subject: Reply with quote

what does `postmap -q <yourdomain> mysql:/etc/postfix/mysql-virtual_mailbox_domains.cf` return? It should return your domain name; else change your query.
With postfix-2.2.x you can do something like
Code:
# mysql/mysql_virtual_domains_maps.cf
user = postfix
password = PASSWORD
hosts = localhost
dbname = postfix
query = SELECT domain
        FROM domain
        WHERE domain = '%s'
        AND backupmx = '0'
        AND active = '1'

man 5 mysql_table for detail.
BTW, check if you have mysql support with `postconf -m`
_________________
Gentoo users' map
Back to top
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Wed Dec 28, 2005 6:59 pm    Post subject: Reply with quote

Postfix 2.2.5 uses a different and more powerful SQL syntax. Your config from 2.1.x won't work. This page may help you make the necessary changes.

http://postfixwiki.org/index.php?title=Virtual_Users_and_Domains_with_Courier-IMAP_and_MySQL

kashani
_________________
Will personally fix your server in exchange for motorcycle related shop tools in good shape.
Back to top
View user's profile Send private message
BlueSol
n00b
n00b


Joined: 13 Oct 2003
Posts: 4
Location: Sunnyvale, CA, US

PostPosted: Wed Dec 28, 2005 9:32 pm    Post subject: D'oh! Reply with quote

As always, you people are life savers. It's working again.

I must apologize for the lack of testing/log information. I'd been up all night doing upgrades at the point. Yes, I ran postfix upgrade-configuration and nothing happened. The logs looked ok with no errors related to the DB. I had tried removing all extra setup except for the DB/Vitual options, which I found to be the source, thus I assumed there was a problem querying the DB.

Postmap returned nothing due to the change in query setup. Thanks for the link. I had problems finding info ont he new 2.2.5 format.
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