Btw, there are a few other oddities in that postfix article. For example, the step 3 "Create a mysql user" says that "Note that the GRANT statements need to be executed after creating the tables in the next step." But the next step isn't to create a table.... the previous one is, maybe thats what its referring to?
]]>When the guide talks about "the postfix user" it refers to the 'postfix' system user, which has nothing to do with the 'postfixuser' in mysql. When you use the username 'postfixuser' in the cnf files; and also used that user in the GRANT command in mysql then you should be able to connect to mysql using that username. First; make sure your connection to mysql works okay by trying this:
mysql --user postfixuser -p
This will connect and actually ask for a password; you should get a mysql-client prompt then. Until that works; don't bother starting postfix because it won't work either. If it doesn't work; tell us what the error-message is.
And yes, the 'virtualdomain.tld' is a reference to the actual domain name you want to user for sending and receiving email
]]>CREATE TABLE `domains` (
`domain` varchar(50) NOT NULL default ,
PRIMARY KEY (`domain`),
UNIQUE KEY `domain` (`domain`)
);
CREATE TABLE `forwardings` (
`source` varchar(80) NOT NULL default ,
`destination` text NOT NULL,
PRIMARY KEY (`source`)
);
CREATE TABLE `users` (
`email` varchar(80) NOT NULL default ,
`password` varchar(20) NOT NULL default ,
`quota` varchar(20) NOT NULL default '20971520',
`domain` varchar(255) NOT NULL default ,
UNIQUE KEY `email` (`email`)
);
This gives me a syntax error. I tried adding '' (2 single quotes) after each "default" statement, and that made the commands work. But i'm not sure whether I should have done that or not.... ?
Then, I get to the step "Test Postfix" and of course it fails. System logs show this when I try to start postfix:
warning: connect to mysql server localhost: Access denied for user 'postfixuser'@'localhost' (using password: YES)
If i do a "mysql --user=postfixuser postfix" I get access denied. I followed every step in the article up to this point.
I'm not sure which config files might be helpful to post, so let me know which ones I should. Keep in mind I have never used postfix or mysql (apparently it's acually "mariadb"??)
EDIT: specifically, i've got 2 questions:
-in the 3 files for mysql_virtual_(domains, forwards, mailboxes), the user in the wiki is listed as "postfixuser". But at the beginning of the guide it says to check for the existence of user "postfix". So should the user in these 3 mysql files be "postfix" or "postfixuser"?
-does "virtualdomain.tld" need to be changed to my domain name that I purchased through a registrar, or does it need to stay as "virtualdomain.tld"?