Re: E-mail server, minimalist approach



At 00:08 26.03.2006, Matthew Seaman wrote:
On Sat, Mar 25, 2006 at 09:38:42PM +0100, Vaaf wrote:

> My minimalist approach to using MySQL for instance, is to stay away
> from phpMyAdmin and just create my databases like this:
>
> CREATE DATABASE IF NOT EXISTS database;
> GRANT USAGE ON database.* TO database@localhost IDENTIFIED BY 'password';
> GRANT ALL ON database.* TO database@localhost;

Ummm... the minimalist approach would only require /two/ lines:

CREATE DATABASE IF NOT EXISTS database ;
GRANT ALL ON database.* TO database@localhost IDENTIFIED BY 'password' ;

More pertinently, the really big advantage of doing stuff the
command-line way is that you can arrange all this sort of thing as a
series of scripts preserved under CVS or the like. Takes a little
more effort the first time you do it, then saves you having to
rediscover it all the next or any subsequent time.

Cheers,

Matthew

--
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
Kent, CT11 9PW

I feel so silly :)
Thank you for pointing that out.

Yes, I am searching the command-line way for having virtual
e-mail users and virtual domains.

I've set up and configured Postfix, Courier-IMAP and SASL.

According to (a revised setup of) high5.net/howto, this is all I need:

CREATE DATABASE IF NOT EXISTS mail;
GRANT ALL ON mail.* TO mail@localhost IDENTIFIED BY 'fooBehej';

USE mail;
CREATE TABLE IF NOT EXISTS alias (
address varchar(255) NOT NULL default '',
goto text NOT NULL,
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (address),
KEY address (address)
) TYPE=MyISAM COMMENT='Postfix virtual aliases';

USE mail;
CREATE TABLE IF NOT EXISTS domain (
domain varchar(255) NOT NULL default '',
description varchar(255) NOT NULL default '',
aliases int(10) NOT NULL default '0',
mailboxes int(10) NOT NULL default '0',
maxquota int(10) NOT NULL default '0',
transport varchar(255) default NULL,
backupmx tinyint(1) NOT NULL default '0',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (domain),
KEY domain (domain)
) TYPE=MyISAM COMMENT='Postfix virtual domains';

USE mail;
CREATE TABLE IF NOT EXISTS mailbox (
username varchar(255) NOT NULL default '',
password varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
maildir varchar(255) NOT NULL default '',
quota int(10) NOT NULL default '0',
domain varchar(255) NOT NULL default '',
created datetime NOT NULL default '0000-00-00 00:00:00',
modified datetime NOT NULL default '0000-00-00 00:00:00',
active tinyint(1) NOT NULL default '1',
PRIMARY KEY (username),
KEY username (username)
) TYPE=MyISAM COMMENT='Postfix virtual mailboxes';

But then, unfortunately, Postfixadmin to properly govern these.
Aren't there any alternatives?

All the best,
Vaaf

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: problem using identity column as primary key
    ... >> I am thinking of creating an identity column to use it as primary key ... More and more programmers who have absolutely no database training are ... the gap in the sequence is not filled in and the sequence ... vin CHARNOT NULL REFERENCES Motorpool); ...
    (microsoft.public.sqlserver.programming)
  • Re: Updating the SQL key value
    ... before creating the database, by the time I've come to pick a primary key, ... articles, each of which must be issued under a particular licence (e.g. ... GPL GNU General Public Licence http://www.gnu ... ...
    (comp.lang.php)
  • Re: Concatenate and Null Values -- Features
    ... Tony Toews dislikes cascade deletes as well as cascade updates, ... fence regarding the use of natural versus surrogate (autonumber) keys. ... Database Normalization Tips ... For optimal database design and performance, the primary key of a table ...
    (microsoft.public.access.reports)
  • Re: Option groups, radio buttons and reports...oh my!!
    ... designing a 'questionnaire' database of using separate columns for the ... referencing the primary key of the Questions and Answers table. ... composite primary key of QuestionAnswers. ... a composite one of RespondentID and QuestionID; ...
    (microsoft.public.access.gettingstarted)
  • Re: AutoNumber Question
    ... I would like to point out that a primary key does not need to be meaningless ... database, as it would be if it was part of relationships. ... VIN is being reused. ... so a VIN has meaning separate from ...
    (microsoft.public.access.tablesdbdesign)