[Dovecot] Port variable in LMTP userdb lookups?

Mark Zealey mark.zealey at webfusion.com
Mon Nov 7 13:23:06 EET 2011


04-11-2011 23:56, Timo Sirainen yazmış:
> On Thu, 2011-10-20 at 12:38 +0300, Mark Zealey wrote:
>
>> I'm currently changing some systems to use the redirector service, which
>> means that to get local deliveries going I need to get lmtp set up so it
>> can be redirected as well. This is working fine, however we have a
>> number of different ports running on our servers depending on which
>> brand a customer is using. When the time comes to do the user look up,
>> we use (port, user, domain) to do a unique database lookup which works
>> fine for everything (proxied pop, imap, lmtp&  straight pop, imap) but
>> not straight lmtp - perhaps because it doesn't have a 2-stage login
>> process unlike the pop/imap protocols. Looking at the SQL query we are
>> issuing, the %a port variable is set to 0 even though the connection is
>> coming in from TCP. Is there a way to change this? We are running
>> dovecot 2.0.12 however looking through the changelogs I can't see this
>> would be fixed in the newest version.
> A quick check in code shows that this is already supposed to work. Set
> auth_debug=yes and see if LMTP's auth lookup sends lip, rip, lport and
> rport fields to auth process?

 From my reading of the code in 2.0.15, you pass the local & remote IP 
in lmtp/commands.c:427 but the struct mail_storage_service_input only 
has remote_ip and local_ip fields, not port fields (unlike the 
auth_user_info struct which has both ip's and port entries as well). I 
think that the mail_storage_service_input struct needs the uint 
local_port, remote_port fields adding in & appropriate code changes to 
pass these through?

Mark



More information about the dovecot mailing list