[exim] General exim questions

Pàgina inicial
Delete this message
Reply to this message
Autor: Paul G Webster
Data:  
A: Exim-users
Assumpte: [exim] General exim questions
Good day,

I am working on a new 'virtual user' helper services for exim that works
over readsocket, having good benchmarks so far:

http://pastie.org/1901140

the idea that the entire config is in-fact virtualised:

....
domainlist      local_domains =  
${readsocket{/tmp/pexim.sock}{local_domains ${domain}\n}{10s}}
hostlist        relay_from_hosts =  
${readsocket{/tmp/pexim.sock}{relay_from_hosts\n}{10s}}
....


all commands are mirrored in my script and the db:

Script:

our %SQL = (
         relay_from_hosts        => "SELECT  
array_to_string(array_agg(host),' : ') FROM relay_from_hosts",
         local_domains           => "SELECT  
array_to_string(array_agg(domain),' : ') FROM local_domains WHERE domain=?  
AND enabled=TRUE",
);


Database:


mail=> SELECT * FROM local_domains;
  id |      domain       | enabled
----+-------------------+---------
   1 | somedomain.it      | t


-- However ...

I was wondering though when I get a query for something like:


[      10]{0.004}: REGISTER: 10 [OK]
[      10]{0.000}: DBSELECT: dbcon-2
[      10]{0.000}: READ_IN: local_domains list.theregister.co.uk
[SQLDEBUG]{0.000}: Has binds
[      10]{0.001}: CLIENT/READONLY
[     SQL]{0.003}: Prepare succeeded
[     SQL]{0.005}: Execute succeeded
[     SQL]{0.003}: Query succeeded (method: execute)
[     SQL]{0.000}: Checking results and composing response
[     SQL]{0.000}: Clean up and return (CODE: NORESULT)
[     SQL]{0.000}: Would send back nothing, no matching SQL records
[  SYSTEM]{0.001}: Total query time: 0.015452
[  SYSTEM]{0.000}: Shutting down session: 10


What should I return? I have been returning " " and killing the socket;
should I reply *NOMATCH* as * is an invalid domain character; so it can
NEVER match?

And is there anyway to tell exim to start my script when it does;
preferable under the right owner mail/mail?


--
Using Opera's revolutionary email client: http://www.opera.com/mail/