Hallo Leute!
Ich bin leider mit meinem Latein am Ende und finde auch nicht wirklich eine Lösung im Netz zu meinem Problem. Es ist auch kein reines Ubuntuproblem aber könnte sich genauso unter Ubuntu abspielen. Ich habe versucht einen Mailserver auf meinem Debian 4.0 Server, nach diesem HowTo http://www.frag-ines.de/index.php?id=134 , aufzusetzen Alle Dienste starte auch aber wenn ich mich in vexim einlogge und eine neue "locale Domain" einrichten will kommt immer der Fehler "Error getting UID/GID for" Da ich finde, das das HowTo genau an dieser Stelle recht schwammig formuliert ist ☹ Was muss ich denn bei locale Domain eintragen bzw nach welchem Format? Ich verstehe das leider nicht was er überhaupt mit der Fehlermeldung meint. Ich poste euch mal meine Codeschnipsel die ich mir aus dem HowTo zusammengereimt habe. Im Vorfeld habe ich den User genau so erzeugt wie es dort beschrieben ist.
/usr/share/vexim/config/variables.php
<?php /* SQL Database login information */ require_once "DB.php"; include_once dirname(__FILE__) . "/i18n.php"; $sqlserver = "unix+localhost"; $sqltype = "mysql"; $sqldb = "vexim"; $sqluser = "vexim"; $sqlpass = "testpasswort"; $dsn = "$sqltype://$sqluser:$sqlpass@$sqlserver/$sqldb"; $db = DB::connect($dsn); if (DB::isError($db)) { die ($db->getMessage()); } $db->setFetchMode(DB_FETCHMODE_ASSOC); /* We use this IMAP server to check user quotas */ $imapquotaserver = "{mail.CHANGE.com:143/imap/notls}"; $imap_to_check_quota = "no"; /* Setting this to 0 if only admins should be allowed to login */ $AllowUserLogin = 1; /* Choose whether to break up domain and user lists alphabetically */ $alphadomains = 1; $alphausers = 1; /* Set to either "des" or "md5" depending on your crypt() libraries */ $cryptscheme = "md5"; /* Choose the type of domain name input for the index page. It should either be 'static', 'dropdown' or 'textbox'. Static causes the domain name part of the URL to be used automatically, and the user cannot change it. Dropdown uses a dropdown style menu with <select> and <option>. Textbox presents a blank line for the user to type their domain name one. Textbox might be prefered if you have a large number of domains, or don't want to reveal the names of sites which you host */ $domaininput = "dropdown"; /* The UID's and GID's control the default UID and GID for new domains and if postmasters can define their own. THE UID AND GID MUST BE NUMERIC! */ $uid = "99"; $gid = "99"; $postmasteruidgid = "yes"; /* The location of your mailstore for new domains. Make sure the directory belongs to the configured $uid/$gid! */ $mailroot = "/var/opt/vmail/"; /* path to Mailman */ $mailmanroot = "http://www.geraldreimertz.de"; /* sa_tag is the default value to offer when we create new domains for SpamAssassin tagging sa_refuse is the default value to offer when we create new domains for SpamAssassin dropping */ $sa_tag = "2"; $sa_refuse = "5"; /* max size of a vacation message */ $max_vacation_length = 255; /* Welcome message, sent to new POP/IMAP accounts */ $welcome_message = "Welcome, {$_POST['realname']} !\n\nYour new E-mail account is all ready for you.\n\n" . "Here are some settings you might find useful:\n\n" . "Username: {$_POST['localpart']}@{$_SESSION['domain']}\n" . "POP3 server: mail.{$_SESSION['domain']}\n" . "SMTP server: mail.{$_SESSION['domain']}\n"; /* Welcome message, sent to new domains */ $welcome_newdomain = "Welcome, and thank you for registering your e-mail domain\n" . "{$_POST['domain']} with us.\n\nIf you have any questions, please\n" . "don't hesitate to ask your account representitive.\n";
~/vexim2/setup/mysql.sql
--- --- Database: `vexim` --- CREATE DATABASE IF NOT EXISTS `vexim`; USE vexim; --- --- Table: `domains` --- DROP TABLE IF EXISTS `vexim`.`domains`; CREATE TABLE IF NOT EXISTS `vexim`.`domains` ( domain_id mediumint(8) unsigned NOT NULL auto_increment, domain varchar(64) NOT NULL default '', maildir varchar(128) NOT NULL default '', uid smallint(5) unsigned NOT NULL default '99', gid smallint(5) unsigned NOT NULL default '99', max_accounts int(10) unsigned NOT NULL default '0', quotas int(10) unsigned NOT NULL default '0', type varchar(5) default NULL, avscan bool NOT NULL default '0', blocklists bool NOT NULL default '0', complexpass bool NOT NULL default '0', enabled bool NOT NULL default '1', mailinglists bool NOT NULL default '0', maxmsgsize mediumint(8) unsigned NOT NULL default '0', pipe bool NOT NULL default '0', spamassassin bool NOT NULL default '0', sa_tag smallint(5) unsigned NOT NULL default '0', sa_refuse smallint(5) unsigned NOT NULL default '0', PRIMARY KEY (domain_id), UNIQUE KEY domain (domain), KEY domain_id (domain_id), KEY domains (domain) ); --- --- Table: `users` --- DROP TABLE IF EXISTS `vexim`.`users`; CREATE TABLE IF NOT EXISTS `vexim`.`users` ( user_id int(10) unsigned NOT NULL auto_increment, domain_id mediumint(8) unsigned NOT NULL, localpart varchar(192) NOT NULL default '', username varchar(255) NOT NULL default '', clear varchar(255) default NULL, crypt varchar(48) default NULL, uid smallint(5) unsigned NOT NULL default '65534', gid smallint(5) unsigned NOT NULL default '65534', smtp varchar(255) default NULL, pop varchar(255) default NULL, type enum('local', 'alias', 'catch', 'fail', 'piped', 'admin', 'site') NOT NULL default 'local', admin bool NOT NULL default '0', on_avscan bool NOT NULL default '0', on_blocklist bool NOT NULL default '0', on_complexpass bool NOT NULL default '0', on_forward bool NOT NULL default '0', on_piped bool NOT NULL default '0', on_spamassassin bool NOT NULL default '0', on_vacation bool NOT NULL default '0', enabled bool NOT NULL default '1', flags varchar(16) default NULL, forward varchar(255) default NULL, unseen bool default '0', maxmsgsize mediumint(8) unsigned NOT NULL default '0', quota int(10) unsigned NOT NULL default '0', realname varchar(255) default NULL, sa_tag smallint(5) unsigned NOT NULL default '0', sa_refuse smallint(5) unsigned NOT NULL default '0', tagline varchar(255) default NULL, vacation varchar(255) default NULL, PRIMARY KEY (user_id), UNIQUE KEY username (localpart, domain_id), KEY local (localpart) ); --- --- Table: `blocklists` --- DROP TABLE IF EXISTS `vexim`.`blocklists`; CREATE TABLE IF NOT EXISTS `vexim`.`blocklists` ( block_id int(10) unsigned NOT NULL auto_increment, domain_id mediumint(8) unsigned NOT NULL, user_id int(10) unsigned default NULL, blockhdr varchar(192) NOT NULL default '', blockval varchar(192) NOT NULL default '', color varchar(8) NOT NULL default '', PRIMARY KEY (block_id) ); --- --- Table: `domainalias` --- CREATE TABLE IF NOT EXISTS `vexim`.`domainalias` ( domain_id mediumint(8) unsigned NOT NULL, alias varchar(64) ); --- --- Table: `groups` --- DROP TABLE IF EXISTS `vexim`.`groups`; CREATE TABLE IF NOT EXISTS `vexim`.`groups` ( id int(10) auto_increment, domain_id mediumint(8) unsigned NOT NULL, name varchar(64) NOT NULL, is_public char(1) NOT NULL default 'Y', enabled bool NOT NULL default '1', PRIMARY KEY (id), UNIQUE KEY group_name(domain_id, name) ); --- --- Table: `group_contents` --- DROP TABLE IF EXISTS `vexim`.`group_contents`; CREATE TABLE IF NOT EXISTS `vexim`.`group_contents` ( group_id int(10) NOT NULL, member_id int(10) NOT NULL, PRIMARY KEY (group_id, member_id) ); --- --- Priviledges: --- GRANT SELECT,INSERT,DELETE,UPDATE ON `vexim`.* to "vexim"@"localhost" IDENTIFIED BY 'testpasswort'; FLUSH PRIVILEGES; --- --- add initial domain: admin --- INSERT INTO `vexim`.`domains` (domain_id, domain) VALUES ('1', 'admin'); --- --- add initial user; postmaster --- INSERT INTO `vexim`.`users` ( domain_id, localpart, username, clear, crypt, uid, gid, smtp, pop, realname, type, admin ) VALUES ( '1', 'siteadmin', 'siteadmin', 'CHANGE', '$1$12345678$2lQK5REWxaFyGz.p/dos3/', '65535', '65535', '', '', 'SiteAdmin', 'site', '1' ); --- fix password when using DES encrypted password: -- UPDATE `vexim`.`users` SET `crypt` = '0Apup3ZbF9RPg' -- WHERE `user_id` = '1' LIMIT 1 ;
Habe gerade alles mit genau diesen Settings neu ausgeführt, der Fehler blieb jedoch. Also irgendwo muss der Fehler hocken. Was mich stutzig macht, ist das der neu angelegte User vmail gar nirgendwo auftaucht. Oder was für einen Sinn hat der? Vielen Dank für eure Hilfe!
Grüße quickz