Problem with vpopmail and tmda-ofmipd

Gerardo Arceri <[email protected]>
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
First of all i run a very uncommon configuration of vpopmail and qmail 
where every domain has a local system user like:
domain.com has domain_com as the domain user and the email files for 
that domain are owned by domain_com
I had to work a loooong way to make everything work, (tmda-cgi is a pain 
in the neck to get it working under this config)
Now i'm stuck with ofmipd
First of all authentication using vhckpw is broken (at least under my 
config), vchkpw throws a segfault after succesfully checking the 
password and after a setegid call, but don't worry since i could make it 
work using pop3 authentication.
Now, after i send the email i get this awful error
===================================================================
process_message raised an exception:
Traceback (most recent call last):
  File "/usr/bin/tmda-ofmipd", line 796, in found_terminator
    self.__auth_username)
  File "/usr/bin/tmda-ofmipd", line 1115, in process_message
    os.setgid(Util.getgid(prepend))
  File "/usr/lib/python2.4/site-packages/TMDA/Util.py", line 97, in getgid
    return pwd.getpwnam(username)[3]
KeyError: 'getpwnam(): name not found: domain.com'
error: uncaptured python exception, closing channel 
<__main__.SMTPChannel connected 111.11.111.111:2811 at -0x483de8f4> 
(exceptions.KeyError:'getpwnam(): name not found: lincopan.com.ar' 
[/usr/lib/python2.4/asyncore.py|read|69] 
[/usr/lib/python2.4/asyncore.py|handle_read_event|391] 
[/usr/lib/python2.4/asynchat.py|handle_read|137] .
====================================================================

I've traced the error to Util.py extracting the system user for the 
domain from /var/qmail/control/virtualdomains which reads:
=======================
domain.com:domain.com
=======================
Remember that Vpopmail uses the qmail/users/assign files to map domains 
to system users, so it's trying the wrong username, i don't know if this 
calls for a fix in which ofmipd or Util.py should parse the assign file 
to get the correct username of perhaps add the feature to get the 
username from a script much like vpopmail-vdir.sh but for the username.

What are my possibilities besides patching Util.py with new python code 
at which I'm a total noob.
Thanks!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.