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 [EMAIL PROTECTED] IDENTIFIED BY 'password';
> GRANT ALL ON database.* TO [EMAIL PROTECTED];

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

  CREATE DATABASE IF NOT EXISTS database ;
  GRANT ALL ON database.* TO [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to