[exim] unknown user problem with virtual users

Top Page
Delete this message
Reply to this message
Author: Shea Martin
Date:  
To: Exim-users, exim-ma
CC: 
Subject: [exim] unknown user problem with virtual users
Trying to setup virtual users. I setup a postgres db called email w/ postgres
owner 'exim'.

**The tables were created like this:
CREATE TABLE whitelist (
address varchar(50) NOT NULL default '',
) ;

CREATE TABLE blacklist (
address varchar(50) NOT NULL default '',
) ;

Local-Domain & Domain-Relaytable
CREATE TABLE domaintable (
domain varchar(30) NOT NULL default '',
) ;

CREATE TABLE relaytable (
domain varchar(50) NOT NULL default ''
) ;

CREATE TABLE emailtable (
local_part varchar(30) NOT NULL default '',
domain varchar(30) NOT NULL default '',
cc varchar(50) NOT NULL default '',
forward varchar(50) NOT NULL default '',
box varchar(7) NOT NULL default '',
is_away enum('yes','no') NOT NULL default 'no',
away_text tinytext NOT NULL,
user varchar(12) NOT NULL default '',
is_enabled enum('yes','no') NOT NULL default 'yes',
opt_virscan enum('yes','no') NOT NULL default 'no',
opt_spamscan enum('yes','no') NOT NULL default 'no',
opt_spampurge enum('on','off') NOT NULL default 'off',
idstring varchar(50) NOT NULL default '',
create_ts int(11) NOT NULL default '0',
lc_ts int(11) NOT NULL default '0',
lc_ip varchar(15) NOT NULL default ''
) ;

Table for courier and authentication
CREATE TABLE boxauth (
boxname varchar(7) NOT NULL default '',
boxpwd varchar(20) NOT NULL default '',
boxinfo varchar(30) NOT NULL default '',
ts_created int(11) NOT NULL default '0',
lc_ts int(11) NOT NULL default '0',
lc_ip varchar(15) NOT NULL default '',
user varchar(20) NOT NULL default '',
KEY id (boxname)
) ;


**I have a virtual user john@???.
invalid.com is an entry in the domain table.

select * from boxauth; shows:
 boxname | boxpwd | username | boxinfo
---------+--------+----------+---------
 box1    | pass   | john |


select username, local_part, domain, box from email; gives:
 username | local_part |     domain      | box
----------+------------+-----------------+------
 john    | john        |    invalid.com  | box1



** Relevent extracts from my exim/configure are:

domainlist local_domains = @ : pgsql;PGSQL_Q_LDOMAIN
domainlist relay_to_domains = pgsql;PGSQL_Q_RDOMAIN
hostlist relay_from_hosts = 127.0.0.1

fail_router:
driver = redirect
domains = ${lookup pgsql {PGSQL_Q_DISABLED}{$value}}
data = ":fail:"
allow_fail

virtual_local_mailbox:
driver = accept
domains = ${lookup pgsql {PGSQL_Q_LOCAL}{$value}}
transport = virtual_local_md_delivery

virtual_wclocal_redirect:
driver = redirect
domains = ${lookup pgsql {PGSQL_Q_WCLOCAL}{$value}}
data = ${lookup pgsql {PGSQL_Q_WCLOCFW}{$value}}

virtual_local_md_delivery:
driver = appendfile
directory = /var/spool/virtual_mail/${lookup pgsql {PGSQL_Q_BOXNAME}
{$value}}
maildir_format
user = mta
group = mta
mode = 0660
directory_mode = 0770

vacation_autoreply:
driver = autoreply
to = ${sender_address}
from = "vacation@${domain}"
subject = "Ihre Nachricht an ${local_part}@${domain}"
text = ${lookup pgsql {PGSQL_Q_AWAYTEXT}{$value}}

devnull_transport:
driver = appendfile
file = /dev/null
user = mta


begin authenticators

fixed_plain:
driver = plaintext
public_name = PLAIN
server_condition = ${lookup pgsql{PGSQL_Q_AUTHPWD1}{1}fail}
server_set_id = $2

fixed_login:
driver = plaintext
public_name = LOGIN
server_prompts = "Username:: : Password::"
server_condition = ${lookup pgsql{PGSQL_Q_AUTHPWD2}{1}fail}
server_set_id = $1

**The message in my logs/mainlog is:
2005-11-06 14:31:50 1EYpIl-0003RY-Fc <= sheam@matilda U=sheam P=local S=284
2005-11-06 14:31:50 1EYpIl-0003RY-Fc ** john@???: Unknown user
2005-11-06 14:31:50 1EYpJ0-0003Rb-Qq <= <> R=1EYpIl-0003RY-Fc U=mta P=local
S=1043
2005-11-06 14:31:50 1EYpIl-0003RY-Fc Completed
2005-11-06 14:31:50 1EYpJ0-0003Rb-Qq => sheam <sheam@matilda> R=localuser
T=local_delivery
2005-11-06 14:31:50 1EYpJ0-0003Rb-Qq Completed

I tried to send the mail from the command line. sheam is my unix username and
matilda is the hostname of the machine I am trying to setup.

Thanks,

~Shea M.