Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] How can I create the postfix pgsql tables, or how
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
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Tue Jan 02, 2024 7:10 pm    Post subject: [SOLVED] How can I create the postfix pgsql tables, or how Reply with quote

How can I create the postfix pgsql tables, or how can I get their schemas?


Code:

Jan  2 19:32:56 www postfix/trivial-rewrite[23586]: warning: pgsql query failed: fatal error from host 127.0.0.1: ERROR:  relation "relay_domains" does not exist?LINE 1: SELECT domain FROM relay_domains WHERE domain='bounce.email....?


Hence I need some method to create these tables initially or there is a problem with authentication for whatever is doing it on demand.
But all tutorials I seem to find on the net does not describe how to create these so it might be the latter


Last edited by pgu on Fri Jan 05, 2024 5:27 pm; edited 2 times in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Tue Jan 02, 2024 7:28 pm    Post subject: Reply with quote

Postfix does not assume any particular database including its structure or queries.
It expects all administration work to be done for what it is told in the maps created by you or others to exist and query.

Look at the map and then create what you need in PostgreSQL for this case.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Tue Jan 02, 2024 9:15 pm    Post subject: Reply with quote

I know, but there are some table and column names which are commonly used so I was hoping not to have to reverse engineer all the schemas. At least I did not have to do that 10+ years ago.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Wed Jan 03, 2024 6:43 am    Post subject: Reply with quote

Even the https://wiki.gentoo.org/wiki/Complete_Virtual_Mail_Server/Postfix_to_Database describes several common table names, but nothing related to the actual schema.

It tells you to create them:
Code:

mysql -u root -p mailsql < genericmailsql.sql

but I can't find any information on how to obtain genericmailsql.sql.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Wed Jan 03, 2024 1:25 pm    Post subject: Reply with quote

pgu wrote:
but I can't find any information on how to obtain genericmailsql.sql.

There is a link, labeled "SQL dump", to a file listing right on that page, though the file is formatted for MySQL and may not work with PostgreSQL.

Again, create whatever structure you require and set the queries in Postfix map files.
There is no one right way nor do you have to follow any table name or table schema.
Back to top
View user's profile Send private message
pgu
l33t
l33t


Joined: 30 Jul 2009
Posts: 721
Location: Oslo, Norway

PostPosted: Fri Jan 05, 2024 5:25 pm    Post subject: Reply with quote

grknight wrote:

There is a link, labeled "SQL dump", to a file listing right on that page, though the file is formatted for MySQL and may not work with PostgreSQL.


Thank you. I did not notice this link. I'll try to see how that matches my table/column names if not I'll just figure out the schema from the queries.
But I can recall that there were some schemas available for the most common table lookups corresponding to the bdb files.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1663

PostPosted: Fri Jan 05, 2024 5:33 pm    Post subject: Reply with quote

pgu wrote:
But I can recall that there were some schemas available for the most common table lookups corresponding to the bdb files.

There isn't. Postfix wants one value back for each query.
This can come from any software and not every feature is used by every install.

This flexibility allows for data from other program or site to be shared with Postfix without Postfix knowing about unnecessary details.
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