[Exim] Help with Exim-Mysql and using local delivery

Inizio della pagina
Delete this message
Reply to this message
Autore: Paul
Data:  
To: exim-users
Oggetto: [Exim] Help with Exim-Mysql and using local delivery
This is a multi-part message in MIME format.
--
Dear All,

I am using Exim 3.34 with MySQL successfully enabled and working correctly.
I am having two issues which are:

1).    When a user does not exist in the SQL (or /etc/passwd), Exim still
attempts to deliver mail to them.
2).    Users in the local system password file are NOT overridden by the SQL
table users.


I have attached several text files showing debug output of each scenario as
well as my configuration file and the SQL table struct's.

configuration.txt                   My Exim Configuration file
sql-commands.txt                SQL Table definition and INSERT statement
local-user-no-delivery.txt     Debug from an attempt to deliver to a user
present in the /etc/passwd file but NOT present in the SQL table
(/etc/passwd should have precedence over the
SQL tables)
local-user-wrong.txt             Debug from an attempt that works correctly
and deliveries properly. In case this helps debugging the problem.
non-user-log.txt                   Debug from an attempt to deliver to a
user that does NOT exist in the SQL table. This should result in a normal
550: no such user


If anyone can provide some advice regarding these issues or an exact answer
that would be great as I have spent a vast amount of time designing this
system only to get so far and get stuck at two simple problems. Thank you
all for your time.

Regards,

Paul
--

CREATE TABLE mailboxes (
     username       char(128) NOT NULL,
     password       char(32),
     domain         char(64),
     mailboxfile    char(128),
     status         char(3),
     forwardaddress char(128),
     UNIQUE         username_i (username)
) \g;


INSERT INTO mailboxes (username,password,domain,mailboxfile,status,forwardaddress) values ('paule','paule','monitoring.testdomain.net.au','/var/spool/mail/p/a/paule',1,'');








--
Exim version 3.34 debug level 9 uid=0 gid=0
Berkeley DB: Sleepycat Software: Berkeley DB 3.1.17: (July 31, 2000)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=
port = 25
listening on all interfaces (IPv4)
pid written to /var/spool/mail/exim-daemon.pid-bd
LOG: 0 MAIN
exim 3.34 daemon started: pid=1695, no queue runs, listening for SMTP on port 25
set_process_info: 1695 daemon: no queue runs, port 25
daemon running with uid=8 gid=12 euid=8 egid=12
listening on port 25...
Connection request from 100.100.100.100/10626
1 SMTP accept process running
listening on port 25...
interface address = 200.200.200.200
host in rfc1413_hosts? yes (*)
ident callback failed
sender_fullhost = [100.100.100.100]
sender_rcvhost = [100.100.100.100]
Process 1723 is handling incoming connection from [100.100.100.100]
checking for IP options
no IP options found
host in host_lookup? yes (*)
looking up host name for 100.100.100.100
IP address lookup yielded 100.100.100.100
sender_fullhost = 100.100.100.100 [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100])
set_process_info: 1723 handling incoming connection from 100.100.100.100 [100.100.100.100]
host in host_reject? no (option unset)
host in host_reject_recipients? no (option unset)
host in sender_unqualified_hosts? no (option unset)
host in receiver_unqualified_hosts? no (option unset)
host in helo_verify? no (option unset)
host in helo_accept_junk_hosts? no (option unset)
SMTP>> 220 testdomian.net.au ESMTP Exim 3.34 #8 Tue, 21 May 2002 16:31:01 +1000

set_process_info: 1723 handling incoming connection from 100.100.100.100 [100.100.100.100]
ready for new message
smtp_setup_msg entered
SMTP<< HELO testremote.net.au
sender_fullhost = 100.100.100.100 (testremote.net.au) [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100] helo=testremote.net.au)
set_process_info: 1723 handling incoming connection from 100.100.100.100 (testremote.net.au) [100.100.100.100]
SMTP>> 250 testdomian.net.au Hello 100.100.100.100 [100.100.100.100]

SMTP<< MAIL FROM:<paul@???>
paul@??? in sender_reject? no (option unset)
paul@??? in sender_reject_recipients? no (option unset)
SMTP>> 250 <paul@???> is syntactically correct

SMTP<< RCPT TO:<testme@???>
testdomian.net.au in local_domains? yes (matched testdomian.net.au)
SMTP>> 250 <testme@???> is syntactically correct

SMTP<< DATA
SMTP>> 354 Enter message, ending with "." on a line by itself

search_tidyup called
host in ignore_fromline_hosts? no (option unset)
>>Original headers (size=13):

Subject: Test

rewrite_one_header: type=F:
From: paul@???
>>Final headers:

P Received: from 100.100.100.100 ([100.100.100.100] helo=testremote.net.au)
        by testdomian.net.au with smtp (Exim 3.34 #8)
        id 17A3Ak-0000Rn-00
        for testme@???; Tue, 21 May 2002 16:31:02 +1000
  Subject: Test
I Message-Id: <E17A3Ak-0000Rn-00@???>
F From: paul@???
B Bcc:
  Date: Tue, 21 May 2002 16:31:02 +1000


search_tidyup called
Data file written for message 17A3Ak-0000Rn-00
Writing spool header file
Size of headers = 360
LOG: 0 MAIN
<= paul@??? H=100.100.100.100 (testremote.net.au) [100.100.100.100] P=smtp S=361
SMTP>> 250 OK id=17A3Ak-0000Rn-00

search_tidyup called
Sender: paul@???
Recipients:
testme@???
forked delivery process 1724
set_process_info: 1723 handling incoming connection from 100.100.100.100 (testremote.net.au) [100.100.100.100]
ready for new message
smtp_setup_msg entered
Exim version 3.34 debug level 9 uid=8 gid=12
Berkeley DB: Sleepycat Software: Berkeley DB 3.1.17: (July 31, 2000)
Caller is an admin user
Caller is a trusted user
set_process_info: 1724 delivering specified messages
delivering message 17A3Ak-0000Rn-00
set_process_info: 1724 delivering 17A3Ak-0000Rn-00
Opened spool file 17A3Ak-0000Rn-00-H
user=root uid=0 gid=0 sender=paul@???
sender_fullhost = 100.100.100.100 (testremote.net.au) [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100] helo=testremote.net.au)
sender_local=0 resent=no ident=unset
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
body_linecount=0 message_linecount=9
Delivery address list:
testme@???
locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=0
>>>>>>>>>>>>>>>>>>>>>>>>

Considering: testme@???
testdomian.net.au in local_domains? yes (matched testdomian.net.au)
testdomian.net.au in percent_hack_domains? no (end of list)
unique = testme@???
dbfn_read: key=D:testme@???
testme@???: queued for directing
>>>>>>>>>>>>>>>>>>>>>>>>

directing testme@???
calling system_aliases director
df_lookup entered: search type = lsearch
system_aliases director: lsearch key=testme
file="/etc/aliases"
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="testme" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="testme"
file lookup required for testme
in /etc/aliases
lookup failed
system_aliases director declined for testme:
calling userforward director
search_open: mysql "NULL"
search_find: file="NULL"
key="SELECT forwardaddress FROM mailboxes WHERE username = 'testme'" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="NULL"
type=mysql key="SELECT forwardaddress FROM mailboxes WHERE username = 'testme'"
database lookup required for SELECT forwardaddress FROM mailboxes WHERE username = 'testme'
MYSQL query: SELECT forwardaddress FROM mailboxes WHERE username = 'testme'
MYSQL new connection: host=localhost port=3306 database=authdb user=userdb password=passdb
MYSQL: no data found
lookup failed
file is not a filter file
parse_extract_addresses:
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="SELECT domain FROM virtual WHERE domain = 'testdomian.net.au'" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="NULL"
type=mysql key="SELECT domain FROM virtual WHERE domain = 'testdomian.net.au'"
database lookup required for SELECT domain FROM virtual WHERE domain = 'testdomian.net.au'
MYSQL query: SELECT domain FROM virtual WHERE domain = 'testdomian.net.au'
MYSQL using cached connection for localhost:3306/authdb/userdb/passdb
lookup yielded: testdomian.net.au
testdomian.net.au in "testdomian.net.au"? yes (matched testdomian.net.au)
calling virtual_local_user director
virtual_local_user director called for testme@???
queued for virtual_delivery transport: local_part=testme domain=testdomian.net.au
errors_to=NULL
domain_data=NULL local_part_data=NULL
virtual_local_user director succeeded for testme
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
    testme@???
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
  Deferred addresses:
search_tidyup called
close MYSQL connection: localhost:3306/authdb/userdb/passdb

>>>>>> Local deliveries >>>>>>

locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=0
dbfn_read: key=T:testme@???
delivering testme@??? as testme using virtual_delivery:
uid=8 gid=12 home=NULL current=/
auxiliary group list: <none>
set_process_info: 1726 delivering 17A3Ak-0000Rn-00 to testme using virtual_delivery
appendfile transport entered
search_open: mysql "NULL"
search_find: file="NULL"
key="SELECT mailboxfile FROM mailboxes WHERE username = 'testme'" partial=-1
LRU list:
internal_search_find: file="NULL"
type=mysql key="SELECT mailboxfile FROM mailboxes WHERE username = 'testme'"
database lookup required for SELECT mailboxfile FROM mailboxes WHERE username = 'testme'
MYSQL query: SELECT mailboxfile FROM mailboxes WHERE username = 'testme'
MYSQL new connection: host=localhost port=3306 database=authdb user=userdb password=passdb
MYSQL: no data found
lookup failed
search_tidyup called
close MYSQL connection: localhost:3306/authdb/userdb/passdb
virtual_delivery transport returned DEFER for testme@???
added retry item for T:testme@???: errno=-22 0 flags=0
post-process testme@??? (1)
LOG: 0 MAIN
== testme@??? T=virtual_delivery defer (-22): appendfile: file or directory name "" is not absolute
set_process_info: 1724 tidying up after delivering 17A3Ak-0000Rn-00
Processing retry items
Succeeded addresses:
Failed addresses:
Deferred addresses:
testme@???
locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=42
testme@??? in *? yes (*)
retry for T:testme@??? = *
dbfn_read: key=T:testme@???
Writing retry data for T:testme@???
first failed=1021962662 last try=1021962662 next try=1021963562 expired=0
error -22 0: appendfile: file or directory name "" is not absolute
dbfn_write: key=T:testme@???
end of retry processing
time on queue = 0s
warning counts: required 0 done 0
LOG: 0 MAIN
Frozen
delivery deferred: update_spool=1 header_changed=0
Writing spool header file
Size of headers = 360
end delivery of 17A3Ak-0000Rn-00
search_tidyup called
search_tidyup calledf
--
Connection request from 100.100.100.100/63878
1 SMTP accept process running
listening on port 25...
interface address = 200.200.200.200
host in rfc1413_hosts? yes (*)
ident callback failed
sender_fullhost = [100.100.100.100]
sender_rcvhost = [100.100.100.100]
Process 3355 is handling incoming connection from [100.100.100.100]
checking for IP options
no IP options found
host in host_lookup? yes (*)
looking up host name for 100.100.100.100
IP address lookup yielded 100.100.100.100
sender_fullhost = 100.100.100.100 [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100])
set_process_info: 3355 handling incoming connection from 100.100.100.100 [100.100.100.100]
host in host_reject? no (option unset)
host in host_reject_recipients? no (option unset)
host in sender_unqualified_hosts? no (option unset)
host in receiver_unqualified_hosts? no (option unset)
host in helo_verify? no (option unset)
host in helo_accept_junk_hosts? no (option unset)
SMTP>> 220 monitoring.remotetester.net.au ESMTP Exim 3.34 #8 Tue, 21 May 2002 16:44:54 +1000

set_process_info: 3355 handling incoming connection from 100.100.100.100 [100.100.100.100]
ready for new message
smtp_setup_msg entered
SMTP<< HELO remotedomain.net.au
sender_fullhost = 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100] helo=remotedomain.net.au)
set_process_info: 3355 handling incoming connection from 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
SMTP>> 250 monitoring.remotetester.net.au Hello 100.100.100.100 [100.100.100.100]

SMTP<< MAIL FROM:<paul@???>
paul@??? in sender_reject? no (option unset)
paul@??? in sender_reject_recipients? no (option unset)
SMTP>> 250 <paul@???> is syntactically correct

SMTP<< RCPT TO:<paule@???>
monitoring.remotetester.net.au in local_domains? yes (matched monitoring.remotetester.net.au)
SMTP>> 250 <paule@???> is syntactically correct

SMTP<< DATA
SMTP>> 354 Enter message, ending with "." on a line by itself

search_tidyup called
host in ignore_fromline_hosts? no (option unset)
>>Original headers (size=13):

Subject: Test

rewrite_one_header: type=F:
From: paul@???
>>Final headers:

P Received: from 100.100.100.100 ([100.100.100.100] helo=remotedomain.net.au)
        by monitoring.remotetester.net.au with smtp (Exim 3.34 #8)
        id 17A3OA-0000s7-00
        for paule@???; Tue, 21 May 2002 16:44:54 +1000
  Subject: Test
I Message-Id: <E17A3OA-0000s7-00@???>
F From: paul@???
B Bcc:
  Date: Tue, 21 May 2002 16:44:54 +1000


search_tidyup called
Data file written for message 17A3OA-0000s7-00
Writing spool header file
Size of headers = 359
LOG: 0 MAIN
<= paul@??? H=100.100.100.100 (remotedomain.net.au) [100.100.100.100] P=smtp S=360
SMTP>> 250 OK id=17A3OA-0000s7-00

search_tidyup called
Sender: paul@???
Recipients:
paule@???
forked delivery process 3366
set_process_info: 3355 handling incoming connection from 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
ready for new message
smtp_setup_msg entered
Exim version 3.34 debug level 9 uid=8 gid=12
Berkeley DB: Sleepycat Software: Berkeley DB 3.1.17: (July 31, 2000)
Caller is an admin user
Caller is a trusted user
set_process_info: 3366 delivering specified messages
delivering message 17A3OA-0000s7-00
set_process_info: 3366 delivering 17A3OA-0000s7-00
Opened spool file 17A3OA-0000s7-00-H
user=root uid=0 gid=0 sender=paul@???
sender_fullhost = 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100] helo=remotedomain.net.au)
sender_local=0 resent=no ident=unset
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
body_linecount=0 message_linecount=9
Delivery address list:
paule@???
locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=0
>>>>>>>>>>>>>>>>>>>>>>>>

Considering: paule@???
monitoring.remotetester.net.au in local_domains? yes (matched monitoring.remotetester.net.au)
monitoring.remotetester.net.au in percent_hack_domains? no (end of list)
unique = paule@???
dbfn_read: key=D:paule@???
paule@???: queued for directing
>>>>>>>>>>>>>>>>>>>>>>>>

directing paule@???
calling system_aliases director
df_lookup entered: search type = lsearch
system_aliases director: lsearch key=paule
file="/etc/aliases"
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="paule" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="paule"
file lookup required for paule
in /etc/aliases
lookup failed
system_aliases director declined for paule:
calling userforward director
search_open: userdb "NULL"
search_find: file="NULL"
key="SELECT forwardaddress FROM mailboxes WHERE username = 'paule'" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="NULL"
type=userdb key="SELECT forwardaddress FROM mailboxes WHERE username = 'paule'"
database lookup required for SELECT forwardaddress FROM mailboxes WHERE username = 'paule'
userdb query: SELECT forwardaddress FROM mailboxes WHERE username = 'paule'
userdb new connection: host=localhost port=3306 database=authdb user=userdb password=passdb
lookup yielded:
file is not a filter file
parse_extract_addresses:
search_open: userdb "NULL"
cached open
search_find: file="NULL"
key="SELECT domain FROM virtual WHERE domain = 'monitoring.remotetester.net.au'" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="NULL"
type=userdb key="SELECT domain FROM virtual WHERE domain = 'monitoring.remotetester.net.au'"
database lookup required for SELECT domain FROM virtual WHERE domain = 'monitoring.remotetester.net.au'
userdb query: SELECT domain FROM virtual WHERE domain = 'monitoring.remotetester.net.au'
userdb using cached connection for localhost:3306/authdb/userdb/passdb
lookup yielded: monitoring.remotetester.net.au
monitoring.remotetester.net.au in "monitoring.remotetester.net.au"? yes (matched monitoring.remotetester.net.au)
calling virtual_local_user director
virtual_local_user director called for paule@???
queued for virtual_delivery transport: local_part=paule domain=monitoring.remotetester.net.au
errors_to=NULL
domain_data=NULL local_part_data=NULL
virtual_local_user director succeeded for paule
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
    paule@???
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
  Deferred addresses:
search_tidyup called
close userdb connection: localhost:3306/authdb/userdb/passdb

>>>>>> Local deliveries >>>>>>

locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=0
dbfn_read: key=T:paule@???
delivering paule@??? as paule using virtual_delivery:
uid=8 gid=12 home=NULL current=/
auxiliary group list: <none>
set_process_info: 3368 delivering 17A3OA-0000s7-00 to paule using virtual_delivery
appendfile transport entered
search_open: userdb "NULL"
search_find: file="NULL"
key="SELECT mailboxfile FROM mailboxes WHERE username = 'paule'" partial=-1
LRU list:
internal_search_find: file="NULL"
type=userdb key="SELECT mailboxfile FROM mailboxes WHERE username = 'paule'"
database lookup required for SELECT mailboxfile FROM mailboxes WHERE username = 'paule'
userdb query: SELECT mailboxfile FROM mailboxes WHERE username = 'paule'
userdb new connection: host=localhost port=3306 database=authdb user=userdb password=passdb
lookup yielded: /var/spool/mail/p/a/paule
appendfile: mode=600 notify_comsat=0 quota=0
file=/var/spool/mail/p/a/paule format=unix
prefix=From ${if def:return_path{$return_path}{MAILER-DAEMON}} ${tod_bsdinbox}\n
suffix=\n
locking by lockfile fcntl
lock name: /var/spool/mail/p/a/paule.lock
hitch name: /var/spool/mail/p/a/paule.lock.monitoring.remotetester.net.au.3ce9ece6.00000d28
lock file created
mailbox /var/spool/mail/p/a/paule is locked
writing to file /var/spool/mail/p/a/paule
writing data block fd=8 size=46 timeout=0
writing data block fd=8 size=479 timeout=0
writing data block fd=8 size=1 timeout=0
appendfile yields 0 with errno=0 more_errno=0
search_tidyup called
journalled paule@???
close userdb connection: localhost:3306/authdb/userdb/passdb
virtual_delivery transport returned OK for paule@???
added retry item for T:paule@???: errno=0 0 flags=1
post-process paule@??? (0)
paule@??? succeeded: adding to nonrecipients list
LOG: 0 MAIN
=> paule <paule@???> D=virtual_local_user T=virtual_delivery
set_process_info: 3366 tidying up after delivering 17A3OA-0000s7-00
Processing retry items
Succeeded addresses:
paule@???
locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=42
deleted retry information for T:paule@???
Failed addresses:
Deferred addresses:
end of retry processing
LOG: 0 MAIN
Completed
end delivery of 17A3OA-0000s7-00
search_tidyup called
search_tidyup called
--
Exim version 3.34 debug level 9 uid=0 gid=0
Berkeley DB: Sleepycat Software: Berkeley DB 3.1.17: (July 31, 2000)
Caller is an admin user
Caller is a trusted user
originator: uid=0 gid=0 login=root name=
port = 25
listening on all interfaces (IPv4)
pid written to /var/spool/mail/exim-daemon.pid-bd
LOG: 0 MAIN
exim 3.34 daemon started: pid=1215, no queue runs, listening for SMTP on port 25
set_process_info: 1215 daemon: no queue runs, port 25
daemon running with uid=8 gid=12 euid=8 egid=12
listening on port 25...
Connection request from 100.100.100.100/17281
1 SMTP accept process running
listening on port 25...
interface address = 200.200.200.200
host in rfc1413_hosts? yes (*)
ident callback failed
sender_fullhost = [100.100.100.100]
sender_rcvhost = [100.100.100.100]
Process 1233 is handling incoming connection from [100.100.100.100]
checking for IP options
no IP options found
host in host_lookup? yes (*)
looking up host name for 100.100.100.100
IP address lookup yielded 100.100.100.100
sender_fullhost = 100.100.100.100 [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100])
set_process_info: 1233 handling incoming connection from 100.100.100.100 [100.100.100.100]
host in host_reject? no (option unset)
host in host_reject_recipients? no (option unset)
host in sender_unqualified_hosts? no (option unset)
host in receiver_unqualified_hosts? no (option unset)
host in helo_verify? no (option unset)
host in helo_accept_junk_hosts? no (option unset)
SMTP>> 220 testdomain.net.au ESMTP Exim 3.34 #8 Tue, 21 May 2002 16:28:52 +1000

set_process_info: 1233 handling incoming connection from 100.100.100.100 [100.100.100.100]
ready for new message
smtp_setup_msg entered
SMTP<< HELO remotedomain.net.au
sender_fullhost = 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100] helo=remotedomain.net.au)
set_process_info: 1233 handling incoming connection from 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
SMTP>> 250 testdomain.net.au Hello 100.100.100.100 [100.100.100.100]

SMTP<< MAIL FROM:<paul@???>
paul@??? in sender_reject? no (option unset)
paul@??? in sender_reject_recipients? no (option unset)
SMTP>> 250 <paul@???> is syntactically correct

SMTP<< RCPT TO:<zzeezz@???>
testdomain.net.au in local_domains? yes (matched testdomain.net.au)
SMTP>> 250 <zzeezz@???> is syntactically correct

SMTP<< DATA
SMTP>> 354 Enter message, ending with "." on a line by itself

search_tidyup called
host in ignore_fromline_hosts? no (option unset)
>>Original headers (size=13):

Subject: Test

rewrite_one_header: type=F:
From: paul@???
>>Final headers:

P Received: from 100.100.100.100 ([100.100.100.100] helo=remotedomain.net.au)
        by testdomain.net.au with smtp (Exim 3.34 #8)
        id 17A38e-0000Jt-00
        for zzeezz@???; Tue, 21 May 2002 16:28:52 +1000
  Subject: Test
I Message-Id: <E17A38e-0000Jt-00@???>
F From: paul@???
B Bcc:
  Date: Tue, 21 May 2002 16:28:52 +1000


search_tidyup called
Data file written for message 17A38e-0000Jt-00
Writing spool header file
Size of headers = 360
LOG: 0 MAIN
<= paul@??? H=100.100.100.100 (remotedomain.net.au) [100.100.100.100] P=smtp S=361
SMTP>> 250 OK id=17A38e-0000Jt-00

search_tidyup called
Sender: paul@???
Recipients:
zzeezz@???
forked delivery process 1234
set_process_info: 1233 handling incoming connection from 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
ready for new message
smtp_setup_msg entered
Exim version 3.34 debug level 9 uid=8 gid=12
Berkeley DB: Sleepycat Software: Berkeley DB 3.1.17: (July 31, 2000)
Caller is an admin user
Caller is a trusted user
set_process_info: 1234 delivering specified messages
delivering message 17A38e-0000Jt-00
set_process_info: 1234 delivering 17A38e-0000Jt-00
Opened spool file 17A38e-0000Jt-00-H
user=root uid=0 gid=0 sender=paul@???
sender_fullhost = 100.100.100.100 (remotedomain.net.au) [100.100.100.100]
sender_rcvhost = 100.100.100.100 ([100.100.100.100] helo=remotedomain.net.au)
sender_local=0 resent=no ident=unset
Non-recipients:
Empty Tree
---- End of tree ----
recipients_count=1
body_linecount=0 message_linecount=9
Delivery address list:
zzeezz@???
locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=0
>>>>>>>>>>>>>>>>>>>>>>>>

Considering: zzeezz@???
testdomain.net.au in local_domains? yes (matched testdomain.net.au)
testdomain.net.au in percent_hack_domains? no (end of list)
unique = zzeezz@???
dbfn_read: key=D:zzeezz@???
zzeezz@???: queued for directing
>>>>>>>>>>>>>>>>>>>>>>>>

directing zzeezz@???
calling system_aliases director
df_lookup entered: search type = lsearch
system_aliases director: lsearch key=zzeezz
file="/etc/aliases"
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
key="zzeezz" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="/etc/aliases"
type=lsearch key="zzeezz"
file lookup required for zzeezz
in /etc/aliases
lookup failed
system_aliases director declined for zzeezz:
calling userforward director
search_open: mysql "NULL"
search_find: file="NULL"
key="SELECT forwardaddress FROM mailboxes WHERE username = 'zzeezz'" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="NULL"
type=mysql key="SELECT forwardaddress FROM mailboxes WHERE username = 'zzeezz'"
database lookup required for SELECT forwardaddress FROM mailboxes WHERE username = 'zzeezz'
MYSQL query: SELECT forwardaddress FROM mailboxes WHERE username = 'zzeezz'
MYSQL new connection: host=localhost port=3306 database=authdb user=authdb password=passdb
MYSQL: no data found
lookup failed
file is not a filter file
parse_extract_addresses:
search_open: mysql "NULL"
cached open
search_find: file="NULL"
key="SELECT domain FROM virtual WHERE domain = 'testdomain.net.au'" partial=-1
LRU list:
7/etc/aliases
End
internal_search_find: file="NULL"
type=mysql key="SELECT domain FROM virtual WHERE domain = 'testdomain.net.au'"
database lookup required for SELECT domain FROM virtual WHERE domain = 'testdomain.net.au'
MYSQL query: SELECT domain FROM virtual WHERE domain = 'testdomain.net.au'
MYSQL using cached connection for localhost:3306/authdb/authdb/passdb
lookup yielded: testdomain.net.au
testdomain.net.au in "testdomain.net.au"? yes (matched testdomain.net.au)
calling virtual_local_user director
virtual_local_user director called for zzeezz@???
queued for virtual_delivery transport: local_part=zzeezz domain=testdomain.net.au
errors_to=NULL
domain_data=NULL local_part_data=NULL
virtual_local_user director succeeded for zzeezz
>>>>>>>>>>>>>>>>>>>>>>>>

After directing:
  Local deliveries:
    zzeezz@???
  Remote deliveries:
  Failed addresses:
  Addresses to be routed:
  Deferred addresses:
search_tidyup called
close MYSQL connection: localhost:3306/authdb/userdb/passdb

>>>>>> Local deliveries >>>>>>

locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=0
dbfn_read: key=T:zzeezz@???
delivering zzeezz@??? as zzeezz using virtual_delivery:
  uid=8 gid=12 home=NULL current=/
  auxiliary group list: <none>
set_process_info:  1236 delivering 17A38e-0000Jt-00 to zzeezz using virtual_delivery
appendfile transport entered
search_open: mysql "NULL"
search_find: file="NULL"
  key="SELECT mailboxfile FROM mailboxes WHERE username = 'zzeezz'" partial=-1
LRU list:
internal_search_find: file="NULL"
  type=mysql key="SELECT mailboxfile FROM mailboxes WHERE username = 'zzeezz'"
database lookup required for SELECT mailboxfile FROM mailboxes WHERE username = 'zzeezz'
MYSQL query: SELECT mailboxfile FROM mailboxes WHERE username = 'zzeezz'
MYSQL new connection: host=localhost port=3306 database=authdb user=userdb password=passdb
MYSQL: no data found
lookup failed
search_tidyup called
close MYSQL connection: localhost:3306/authdb/userdb/passdb
virtual_delivery transport returned DEFER for zzeezz@???
added retry item for T:zzeezz@???: errno=-22 0 flags=0
post-process zzeezz@??? (1)
LOG: 0 MAIN
  == zzeezz@??? T=virtual_delivery defer (-22): appendfile: file or directory name "" is not absolute
set_process_info:  1234 tidying up after delivering 17A38e-0000Jt-00
Processing retry items
Succeeded addresses:
Failed addresses:
Deferred addresses:
zzeezz@???
locked /var/spool/mail/db/retry.lockfile
opened DB file /var/spool/mail/db/retry: flags=42
zzeezz@??? in *? yes (*)
retry for T:zzeezz@??? = *
dbfn_read: key=T:zzeezz@???
Writing retry data for T:zzeezz@???
  first failed=1021962532 last try=1021962532 next try=1021963432 expired=0
  error -22 0: appendfile: file or directory name "" is not absolute
dbfn_write: key=T:zzeezz@???
end of retry processing
time on queue = 0s
warning counts: required 0 done 0
LOG: 0 MAIN
  Frozen
delivery deferred: update_spool=1 header_changed=0
Writing spool header file
Size of headers = 360
end delivery of 17A38e-0000Jt-00
search_tidyup called
search_tidyup called
--
######################################################################
#                  Runtime configuration file for Exim               #
######################################################################



# This is a default configuration file which will operate correctly in
# uncomplicated installations. Please see the manual for a complete list
# of all the runtime configuration options that can be included in a
# configuration file. There are many more than are mentioned here. The
# manual is in the file doc/spec.txt in the Exim distribution as a plain
# ASCII file. Other formats (PostScript, Texinfo, HTML, PDF) are available
# from the Exim ftp sites. The manual is also online via the Exim web sites.


# This file is divided into several parts, all but the last of which are
# terminated by a line containing the word "end". The parts must appear
# in the correct order, and all must be present (even if some of them are
# in fact empty). Blank lines, and lines starting with # are ignored.


############ IMPORTANT ########## IMPORTANT ########### IMPORTANT ############
#                                                                            #
# Whenever you change Exim's configuration file, you *must* remember to HUP  #
# the Exim daemon, because it will not pick up the new configuration until   #
# until you do this. It is usually a good idea to test a new configuration   #
# for syntactic correctness (e.g. using "exim -C /config/file -bV") first.   #
#                                                                            #
############ IMPORTANT ########## IMPORTANT ########### IMPORTANT ############


MYSQL_AUTHSERVER=localhost
MYSQL_AUTHPORT=3306
MYSQL_AUTHDB=authdb
MYSQL_AUTHTABLE=mailboxes
MYSQL_AUTHUSER=userdb
MYSQL_AUTHPASSWORD=passdb
MYSQL_USERNAMEFIELD=username
MYSQL_DOMAINFIELD=domain
MYSQL_ALIASFIELD=alias
MYSQL_ISALIASFIELD=is_alias

MYSQL_DOMAIN = SELECT domain FROM virtual WHERE domain = '${quote_mysql:$domain}'
MYSQL_MAILBOX = SELECT mailboxfile FROM mailboxes WHERE username = '${quote_mysql:$local_part}'
MYSQL_FORWARD = SELECT forwardaddress FROM mailboxes WHERE username = '${quote_mysql:$local_part}'

mysql_servers = "MYSQL_AUTHSERVER::MYSQL_AUTHPORT/MYSQL_AUTHDB/MYSQL_AUTHUSER/MYSQL_AUTHPASSWORD"

######################################################################
#                    MAIN CONFIGURATION SETTINGS                     #
######################################################################


# Specify your host's canonical name here. This should normally be the fully
# qualified "official" name of your host. If this option is not set, the
# uname() function is called to obtain the name.

# primary_hostname =


# Specify the domain you want to be added to all unqualified addresses
# here. An unqualified address is one that does not contain an "@" character
# followed by a domain. For example, "caesar@???" is a fully qualified
# address, but the string "caesar" (i.e. just a login name) is an unqualified
# email address. Unqualified addresses are accepted only from local callers by
# default. See the receiver_unqualified_{hosts,nets} options if you want
# to permit unqualified addresses from remote sources. If this option is
# not set, the primary_hostname value is used for qualification.

# qualify_domain =


# If you want unqualified recipient addresses to be qualified with a different
# domain to unqualified sender addresses, specify the recipient domain here.
# If this option is not set, the qualify_domain value is used.

# qualify_recipient =


# Specify your local domains as a colon-separated list here. If this option
# is not set (i.e. not mentioned in the configuration file), the
# qualify_recipient value is used as the only local domain. If you do not want
# to do any local deliveries, uncomment the following line, but do not supply
# any data for it. This sets local_domains to an empty string, which is not
# the same as not mentioning it at all. An empty string specifies that there
# are no local domains; not setting it at all causes the default value (the
# setting of qualify_recipient) to be used.

#local_domains = monitoring.testdomain.net.au


# If you want to accept mail addressed to your host's literal IP address, for
# example, mail addressed to "user@???", then uncomment the
# following line, or supply the literal domain(s) as part of "local_domains"
# above. You also need to comment "forbid_domain_literals" below. This is not
# recommended for today's Internet.

# local_domains_include_host_literals


# The following line prevents Exim from recognizing addresses of the form
# "user@???" that is, with a "domain literal" (an IP address)
# instead of a named domain. The RFCs still require this form, but it makes
# little sense to permit mail to be sent to specific hosts by their IP address
# in the modern Internet, and this ancient format has been used by those
# seeking to abuse hosts by using them for unwanted relaying. If you really
# do want to support domain literals, remove the following line, and see
# also the "domain_literal" router below.

forbid_domain_literals


# No local deliveries will ever be run under the uids of these users (a colon-
# separated list). An attempt to do so gets changed so that it runs under the
# uid of "nobody" instead. This is a paranoic safety catch. Note the default
# setting means you cannot deliver mail addressed to root as if it were a
# normal user. This isn't usually a problem, as most sites have an alias for
# root that redirects such mail to a human administrator.

never_users = root


# The use of your host as a mail relay by any host, including the local host
# calling its own SMTP port, is locked out by default. If you want to permit
# relaying from the local host, you should set
#
# host_accept_relay = localhost
#
# If you want to permit relaying through your host from certain hosts or IP
# networks, you need to set the option appropriately, for example
#
host_accept_relay = remotetester.net.au
#
# If you are an MX backup or gateway of some kind for some domains, you must
# set relay_domains to match those domains. This will allow any host to
# relay through your host to those domains.
#


#
# See the section of the manual entitled "Control of relaying" for more
# information.


# The setting below causes Exim to do a reverse DNS lookup on all incoming
# IP calls, in order to get the true host name. If you feel this is too
# expensive, you can specify the networks for which a lookup is done, or
# remove the setting entirely.

host_lookup = *


# By default, Exim expects all envelope addresses to be fully qualified, that
# is, they must contain both a local part and a domain. If you want to accept
# unqualified addresses (just a local part) from certain hosts, you can specify
# these hosts by setting one or both of
#
# receiver_unqualified_hosts =
# sender_unqualified_hosts =
#
# to control sender and receiver addresses, respectively. When this is done,
# unqualified addresses are qualified using the settings of qualify_domain
# and/or qualify_recipient (see above).


# By default, Exim does not make any checks, other than syntactic ones, on
# incoming addresses during the SMTP dialogue. This reduces delays in SMTP
# transactions, but it does mean that you might accept messages with unknown
# recipients, and/or bad senders.

# Uncomment this line if you want incoming recipient addresses to be verified
# during the SMTP dialogue. Unknown recipients are then rejected at this stage,
# and the generation of a failure message is the job of the sending host.

# receiver_verify

# Uncomment this line if you want incoming sender addresses (return-paths) to
# be verified during the SMTP dialogue. Verification can normally only check
# that the domain exists.

# sender_verify


# Exim contains support for the Realtime Blackhole List (RBL) that is being
# maintained as part of the DNS. See http://mail-abuse.org/rbl/ for background.
# Uncommenting the first line below will make Exim reject mail from any
# host whose IP address is blacklisted in the RBL at blackholes.mail-abuse.org.
# Some others have followed the RBL lead and have produced other lists: DUL is
# a list of dial-up addresses, and there are also a number of other lists
# of various kinds at orbs.org.

# rbl_domains = blackholes.mail-abuse.org
# rbl_domains = blackholes.mail-abuse.org:dialups.mail-abuse.org


# If you want Exim to support the "percent hack" for all your local domains,
# uncomment the following line. This is the feature by which mail addressed
# to x%y@z (where z is one of your local domains) is locally rerouted to
# x@y and sent on. Otherwise x%y is treated as an ordinary local part.

# percent_hack_domains = *


# When Exim can neither deliver a message nor return it to sender, it "freezes"
# the delivery error message (aka "bounce message"). There are also other
# circumstances in which messages get frozen. They will stay on the queue for
# ever unless one of the following options is set.

# This option unfreezes unfreezes bounce messages after two days, tries
# once more to deliver them, and ignores any delivery failures.

ignore_errmsg_errors_after = 2d

# This option cancels (removes) frozen messages that are older than a week.

timeout_frozen_after = 7d




######################################################################
#                      TRANSPORTS CONFIGURATION                      #
######################################################################
#                       ORDER DOES NOT MATTER                        #
#     Only one appropriate transport is called for each delivery.    #
######################################################################


# A transport is used only when referenced from a director or a router that
# successfully handles an address.


# This transport is used for delivering messages over SMTP connections.

remote_smtp:
driver = smtp


# This transport is used for local delivery to user mailboxes in traditional
# BSD mailbox format. By default it will be run under the uid and gid of the
# local user, and requires the sticky bit to be set on the /var/mail directory.
# Some systems use the alternative approach of running mail deliveries under a
# particular group instead of using the sticky bit. The commented options below
# show how this can be done.

local_delivery:
driver = appendfile
file = /var/mail/$local_part
delivery_date_add
envelope_to_add
return_path_add
group = mail

virtual_delivery:
driver = appendfile
file = ${lookup mysql {MYSQL_MAILBOX}{$value}}
delivery_date_add
envelope_to_add
return_path_add
user = mail
group = mail
#mode = 0660

##################
#local_delivery:
# driver = appendfile
# file = ${lookup mysql {MYSQL_MAILBOX}{$value}}
# delivery_date_add
# envelope_to_add
# return_path_add
# user = mail
# group = mail
# mode = 0660
#################

# This transport is used for handling pipe deliveries generated by alias
# or .forward files. If the pipe generates any standard output, it is returned
# to the sender of the message as a delivery error. Set return_fail_output
# instead of return_output if you want this to happen only when the pipe fails
# to complete normally. You can set different transports for aliases and
# forwards if you want to - see the references to address_pipe in the directors
# section below.

address_pipe:
driver = pipe
return_output


# This transport is used for handling deliveries directly to files that are
# generated by aliasing or forwarding.

address_file:
driver = appendfile
delivery_date_add
envelope_to_add
return_path_add


# This transport is used for handling autoreplies generated by the filtering
# option of the forwardfile director.

address_reply:
driver = autoreply





######################################################################
#                      DIRECTORS CONFIGURATION                       #
#             Specifies how local addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#   A local address is passed to each in turn until it is accepted.  #
######################################################################


# Local addresses are those with a domain that matches some item in the
# "local_domains" setting above, or those which are passed back from the
# routers because of a "self=local" setting (not used in this configuration).


# This director handles aliasing using a traditional /etc/aliases file.
#
##### NB NB You must ensure that /etc/aliases exists. It used to be the case
##### NB NB that every Unix had that file, because it was the Sendmail default.
##### NB NB These days, there are systems that don't have it. Your aliases
##### NB NB file should at least contain an alias for "postmaster".
#
# If any of your aliases expand to pipes or files, you will need to set
# up a user and a group for these deliveries to run under. You can do
# this by uncommenting the "user" option below (changing the user name
# as appropriate) and adding a "group" option if necessary. Alternatively, you
# can specify "user" on the transports that are used. Note that those
# listed below are the same as are used for .forward files; you might want
# to set up different ones for pipe and file deliveries from aliases.

system_aliases:
driver = aliasfile
file = /etc/aliases
search_type = lsearch
# user = exim
file_transport = address_file
pipe_transport = address_pipe


# This director handles forwarding using traditional .forward files.
# If you want it also to allow mail filtering when a forward file
# starts with the string "# Exim filter", uncomment the "filter" option.

# The no_verify setting means that this director will be skipped when
# verifying addresses if sender_verify or receiver_verify is set (though
# they are not set by default). Similarly, no_expn means that this director
# will be skipped if smtp_expn_hosts is set to allow any hosts to use the
# EXPN command.

# The check_ancestor option means that if the forward file generates an
# address that is an ancestor of the current one, the current one gets
# passed on instead. This covers the case where A is aliased to B and B
# has a .forward file pointing to A.

# The three transports specified at the end are those that are used when
# forwarding generates a direct delivery to a file, or to a pipe, or sets
# up an auto-reply, respectively.

userforward:
driver = forwardfile
check_local_user = false
# file = .forward
data = ${lookup mysql {MYSQL_FORWARD}{$value}}
no_verify
no_expn
check_ancestor
filter
file_transport = address_file
pipe_transport = address_pipe
reply_transport = address_reply


# This director matches local user mailboxes.

##localuser:
## driver = localuser
## transport = local_delivery

virtual_local_user:
domains = ${lookup mysql {MYSQL_DOMAIN}{$value}}
driver = smartuser
transport = virtual_delivery

localuser:
driver = localuser
transport = local_delivery


############
#localuser:
# driver = smartuser
# domains = ${lookup mysql {MYSQL_DOMAIN}{$value}}
#3# transport = local_delivery





######################################################################
#                      ROUTERS CONFIGURATION                         #
#            Specifies how remote addresses are handled              #
######################################################################
#                          ORDER DOES MATTER                         #
#  A remote address is passed to each in turn until it is accepted.  #
######################################################################


# Remote addresses are those with a domain that does not match any item
# in the "local_domains" setting above.


# This router routes to remote hosts over SMTP using a DNS lookup. Any domain
# that resolves to an IP address on the loopback interface (127.0.0.0/8) is
# treated as if it had no DNS entry.

lookuphost:
driver = lookuphost
transport = remote_smtp
ignore_target_hosts = 127.0.0.0/8


# This router routes to remote hosts over SMTP by explicit IP address,
# when an email address is given in "domain literal" form, for example,
# <user@???>. The RFCs require this facility. However, it is
# little-known these days, and has been exploited by evil people seeking
# to abuse SMTP relays. Consequently it is commented out in the default
# configuration. If you uncomment this router, you also need to comment out
# "forbid_domain_literals" above, so that Exim can recognize the syntax of
# domain literal addresses.

# domain_literal:
# driver = ipliteral
# transport = remote_smtp





######################################################################
#                      RETRY CONFIGURATION                           #
######################################################################


# This single retry rule applies to all domains and all errors. It specifies
# retries every 15 minutes for 2 hours, then increasing retry intervals,
# starting at 1 hour and increasing each time by a factor of 1.5, up to 16
# hours, then retries every 8 hours until 4 days have passed since the first
# failed delivery.

# Domain               Error       Retries
# ------               -----       -------


*                      *           F,2h,15m; G,16h,1h,1.5; F,4d,8h





######################################################################
#                      REWRITE CONFIGURATION                         #
######################################################################


# There are no rewriting specifications in this default configuration file.




######################################################################
#                   AUTHENTICATION CONFIGURATION                     #
######################################################################


# There are no authenticator specifications in this default configuration file.

# End of Exim configuration file
--