[afnog] Fetchmail/Exim Problem - saga continues!

Julius Kidubuka juki at one2net.co.ug
Fri May 20 13:58:44 EAT 2005


> I then made necessary changes to /etc/mail/mailer.conf and restarted the
> exim daemon. Fetchmail is now delivering mail to the right folders, that
> is, /usr/mail/domain-name/users/username/Maildir and all is well for now

Unfortunately the only mail being delivered to say,
/usr/mail/kulika.one2net.co.ug/users/joanna/Maildir is that which has been
sent from the system itself (.ie. after doing a, mail -v joanna) otherwise
mail from other sources (.ie. other mailservers) is still being delivered
to the file /var/mail/joanna (for this particular case)!

An entry in my fetchmail script for this particular account goes as follows;

poll 62.73.190.76 protocol POP3 nodns
localdomains ns.kulika.org kulika.one2net.co.ug
user joanna pass kctu is joanna here
smtpaddress kulika.one2net.co.ug


then also...


kulika# exim -bt joanna at kulika.one2net.co.ug
joanna at kulika.one2net.co.ug ->
/usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
  transport = address_directory


furthermore...


kulika# exim -d -bt joanna at kulika.one2net.co.ug
Exim version 4.50 (FreeBSD 4.10) uid=0 gid=0 pid=24079 D=fbb95cfd
Probably Berkeley DB version 1.8x (native mode)
Support for: iconv() IPv6 PAM Perl OpenSSL Content_Scanning Old_Demime
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb
dsearch mysql nis nis0 passwd
Authenticators: cram_md5 plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=24079
  auxiliary group list: 0
finduser used cached passwd data for mailnull
configuration file is /usr/local/etc/exim/configure
log selectors = 00000ffc 00020800
trusted user
admin user
originator: uid=0 gid=0 login=root name=Charlie Root
sender address = root at kulika.one2net.co.ug
Address testing: uid=0 gid=6 euid=0 egid=6
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing joanna at kulika.one2net.co.ug
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering joanna at kulika.one2net.co.ug
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing joanna at kulika.one2net.co.ug
--------> dnslookup router <--------
local_part=joanna domain=kulika.one2net.co.ug
checking domains
kulika.one2net.co.ug in "@ : kulika.one2net.co.ug"? yes (matched "@")
kulika.one2net.co.ug in "! +local_domains"? no (matched "! +local_domains")
dnslookup router skipped: domains mismatch
--------> system_aliases router <--------
local_part=joanna domain=kulika.one2net.co.ug
checking "condition"
calling system_aliases router
rda_interpret (string): ${lookup{$local_part}lsearch{/etc/aliases}}
search_open: lsearch "/etc/aliases"
search_find: file="/etc/aliases"
  key="joanna" partial=-1 affix=NULL starflags=0
LRU list:
  :/etc/aliases
  End
internal_search_find: file="/etc/aliases"
  type=lsearch key="joanna"
file lookup required for joanna
  in /etc/aliases
lookup failed
expanded:
file is not a filter file
parse_forward_list:
system_aliases router declined for joanna at kulika.one2net.co.ug
--------> vacation_director router <--------
local_part=joanna domain=kulika.one2net.co.ug
checking require_files
file check: /usr/mail/kulika.one2net.co.ug/${local_part}/.vacation
expanded file: /usr/mail/kulika.one2net.co.ug/joanna/.vacation
stat() yielded -1
errno = 2
vacation_director router skipped: file check
--------> userforward router <--------
local_part=joanna domain=kulika.one2net.co.ug
checking for local user
checking "condition"
userforward router skipped: condition failure
--------> virtual_user router <--------
local_part=joanna domain=kulika.one2net.co.ug
calling virtual_user router
rda_interpret (string): ${lookup mysql{ SELECT maildir FROM users WHERE id
= '${local_part}@${domain}' }}
search_open: mysql "NULL"
search_find: file="NULL"
  key=" SELECT maildir FROM users WHERE id = 'joanna at kulika.one2net.co.ug'
" partial=-1 affix=NULL starflags=0
LRU list:
  :/etc/aliases
  End
internal_search_find: file="NULL"
  type=mysql key=" SELECT maildir FROM users WHERE id =
'joanna at kulika.one2net.co.ug' "
database lookup required for  SELECT maildir FROM users WHERE id =
'joanna at kulika.one2net.co.ug'
MYSQL query:  SELECT maildir FROM users WHERE id =
'joanna at kulika.one2net.co.ug'
MYSQL new connection: host=localhost port=0 socket=NULL database=maildb
user=mail
lookup yielded: /usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
expanded: /usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
file is not a filter file
parse_forward_list: /usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
extract item: /usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
set transport address_directory
virtual_user router generated
/usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
  pipe, file, or autoreply
  errors_to=NULL transport=address_directory
  uid=unset gid=unset home=NULL
routed by virtual_user router
  envelope to: joanna at kulika.one2net.co.ug
  transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering /usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
joanna at kulika.one2net.co.ug ->
/usr/mail/kulika.one2net.co.ug/users/joanna/Maildir/
  transport = address_directory
search_tidyup called
close MYSQL connection: localhost/maildb/mail
>>>>>>>>>>>>>>>> Exim pid=24079 terminating with rc=0 >>>>>>>>>>>>>>>>



To cap it all, here are some excerpts from my exim conf file;

For ROUTERS CONFIGURATION:

#This router handles virtual users.
virtual_user:
    driver = redirect
    allow_fail
    allow_defer
    data = ${lookup mysql{ SELECT maildir FROM users \
            WHERE id = '${local_part}@${domain}' }}
    directory_transport = address_directory

# This router matches local user mailboxes.

localuser:
  driver = accept
  check_local_user
  transport = local_delivery
  condition = ${if eq {$domain}{$primary_hostname} {yes}{no} }


For TRANSPORTS CONFIGURATION:

local_delivery:
  driver = appendfile
  maildir_format
  #file = /var/mail/$local_part
  directory = $home/Maildir/
  delivery_date_add
  envelope_to_add
  return_path_add
  group = mail
  mode = 0660


I need fetchmail to be able to deliver all the mail to the mail directory
I have as /usr/mail/kulika.one2net.co.ug/users/username/Maildir and not
/var/mail/username...


Any pointers/help on how to go about this will be highly appreciated.


Thanks,
Juki.

"Get rich or die trying!"



More information about the afnog mailing list