SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
With that much configuring, I made a couple of typing mistakes, and the logs revealed where they were at; once my typos were gone, everything worked except one thing, and it was at one of the points where my setup deviated from tutorial: a database on a separate host, with local ip, 10.11.12.13.
In the file /etc/postfix/mysql-virtual-mailbox-maps.cf and in the other two like it, for domains, and aliases, I had to make change from
Code:
host = localhost
to
Code:
hosts = 10.11.12.13
I noticed some online examples said host, and others said hosts; when I tried it with the hosts, the database connected. It was the only rough spot. It probably defaults to localhost on an error, and so for everybody using localhost, it doesn't matter. But to get it to connect to remote hosts, it had to be plural.
There are lots of steps and components, and they all have to be right. The tutorial was clean. Thanks Astrogeek and any other contributors.
But, I'm not finding that file in the postfix package from SBo (for 14.2) and the package from -current. Is it one you created? I don't see any reference to it in the SlackDocs article you linked. Was this just a hodgepodge of things from other websites or is it part of the package (and/or tutorial) and I just totally missed it?
If it is part of the tutorial, we should definitely change it. If it isn't part of the tutorial, maybe you could add a section about connecting postfix to an external database.
First, thanks for the kind words! Always appreciated!
And I am glad to see that it is still useful after so long a time with few updates!
Honestly, it has been a while since I wrote that so I'll have to take a refresher look at it later today. I have multiple instances running based on that setup and have never encountered a problem with the host name such as you describe, all of mine are host = localhost I think, but I am not aware of anything that would require 'hosts' in that parameter.
Could you post a link to one of the tutorials that suggests 'hosts' to geve me a starting point to look into it, please?
I have had a to-do on my list to update that doc for... well too long! Perhaps as the weather cools and I settle in for the winter... your comments are terrific incentive!
I did some quick look around and was on that page when you posted the link, but thanks!
Indeed, I am seeing a lot of 'hosts' usage. Slac-in-the-box may be correct that it defaults to localhost on error, but I just restarted one configured with 'host = localhost' and see no actual error message.
It is the first time I have seen any mysql connector use 'hosts' - it is 'host' the world around in my (possibly limited) experience. As it is processed by postfix code, I guess it must be a postfix thing but will try to get to the bottom of it now that I see it...
From my local man mysql_table which may be different than above link..
Code:
hosts The hosts that Postfix will try to connect to and query from. Specify unix: for UNIX domain
sockets, inet: for TCP connections (default). Example:
hosts = host1.some.domain host2.some.domain:port
hosts = unix:/file/name
The hosts are tried in random order, with all connections over UNIX domain sockets being tried
before those over TCP. The connections are automatically closed after being idle for about 1
minute, and are re-opened as necessary. Postfix versions 2.0 and earlier do not randomize the
host order.
NOTE: if you specify localhost as a hostname (even if you prefix it with inet:), MySQL will con‐
nect to the default UNIX domain socket. In order to instruct MySQL to connect to localhost over
TCP you have to specify
hosts = 127.0.0.1
Although it does not say so, my guess is that it simply does not recognize 'host', or 'zebra' for that matter, uses the unix socket by default, and does not complain about unrecognized parameter names.
When you have no local mysql instance that can be connected to by default, you see the error.
I'll fix that later this evening, and thanks for the heads up!
*** EDIT: Should be all fixed now, and includes a note about the appropriate man page to reference for those details. - Thanks again to all!
Last edited by astrogeek; 10-07-2018 at 09:22 PM.
Reason: Fixed
I got so excited about imapd and smptd working on slackware cloud instance, (and it's now had 60 hours uptime without any unwanted connections) that I kept the momentum by reading ncurses man page again, and trying to make ncurses based front end for managing the mysql mailserver database... got so distracted that I didn't even notice the replies yesterday. Looks like everyone answered themselves! I'm so used to things not working in my trial and error linux hacking, that when all the pieces finally fit and something works, I get kind of giddy. Slackware has great documentation! Thanks. The next round's on me.
BTW, if there already is a ncurses front end to mysql, please save me.
I am not aware of an ncurses front end for mysql for general queries (but I haven't really looked either). I am not aware of an ncurses front end for managing the vmail tables either.
I wrote a shell script which I use for managing my own, but I also have a more {complete|complex} schema structure which would make it not generally useful.
When I get around to updating the docs page I'll try to include a simple shell script for managing the basic schema. In the mean time, give it a try yourself - you obviously have a good handle on it already!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.