Hello. I'm having the following problem with dovecot 1.0.12 and above, on a FreeBSD 7.0 system - I'm trying to run pop3-login from inetd and I keep getting this error after authentication: May 25 09:46:19 charlie dovecot: POP3(gelu): /libexec/ld-elf.so.1: environment corrupt; missing value for no-nuls oe-ns-eoh The problem persists if I uncomment the lines with no-nuls oe-ns-eoh in dovecot.conf. I've also tried running pop3-login from tcpserver/ucspi-tcp and I still get the same error. Version 1.0.1 works fine on a similar setup. Please reply if you have any idea regarding a fix for this error. I need to run dovecot under a tcp wrapper of some kind (preferably inetd) as the standalone daemon doesn't allow any method to restrict access by IP. The allow_nets extra field doesn't help much as I'm using PAM and do not want to maintain yet another passdb. Restricting access via firewall rules is not an option. Until I find a way to restrict access by IP address, dovecot will only listen on the private IP address (192.168.100.1). My dovecot configuration follows: # 1.0.13: /usr/local/etc/dovecot.conf base_dir: /var/run/dovecot/ protocols: pop3 listen: 192.168.100.1 ssl_cipher_list: ALL:!LOW disable_plaintext_auth: no login_dir: /var/run/dovecot/login login_executable: /usr/local/libexec/dovecot/pop3-login login_greeting: login_process_size: 32 login_max_processes_count: 32 login_max_connections: 128 max_mail_processes: 128 verbose_proctitle: yes first_valid_uid: 1000 mail_privileged_group: mail mail_location: mbox:~/Mail/:INBOX=/var/mail/%u mail_executable: /usr/local/libexec/dovecot/pop3 mail_plugin_dir: /usr/local/lib/dovecot/pop3 pop3_uidl_format: %08Xu%08Xv pop3_client_workarounds: outlook-no-nuls oe-ns-eoh auth default: mechanisms: plain login process_size: 64 passdb: driver: pam userdb: driver: passwd socket: type: listen client: path: /var/spool/postfix/private/auth mode: 432 user: postfix group: postfix ---------------------------------------------------------------------- Finally - A spam blocker that actually works. http://www.bluebottle.com/tag/4
On Sun, 2008-05-25 at 10:21 +0300, Gelu G. Lupas wrote:> Hello. I'm having the following problem with dovecot 1.0.12 and above, > on a FreeBSD 7.0 system - I'm trying to run pop3-login from inetd and I > keep getting this error after authentication: > > May 25 09:46:19 charlie dovecot: POP3(gelu): /libexec/ld-elf.so.1: > environment corrupt; missing value for no-nuls oe-ns-eoh > > The problem persists if I uncomment the lines with no-nuls oe-ns-eoh in > dovecot.conf."uncomment"? What if you comment them? Does it at least change the error message? I've looked at this error before, but I don't see any obvious reason why it would happen. Does it work if you run it directly instead of via inetd? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080525/0cf6cdfb/attachment-0002.bin>
Timo Sirainen wrote:> "uncomment"? What if you comment them? Does it at least change the error > message? I've looked at this error before, but I don't see any obvious > reason why it would happen. > > Does it work if you run it directly instead of via inetd? >Sorry, I meant to say coomment. Yes, commenting the following line: pop3_client_workarounds = outlook-no-nuls oe-ns-eoh changes the error message to: May 25 17:26:24 charlie dovecot: POP3(gelu): /libexec/ld-elf.so.1: environment corrupt; missing value for 36 In fact when changing just about anything in the config file, changes the error message. Dovecot works fine standalone; it only breaks when run from inetd or tcpserver/ucspi-tcp. If I enable auth_verbose and auth_debug I get this error: May 25 17:34:57 charlie pop3-login: Login: user=<gelu>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured May 25 17:34:57 charlie kernel: pid 29540 (pop3), uid 0: exited on signal 11 May 25 17:34:57 charlie dovecot: POP3(gelu): /libexec/ld-elf.so.1: environment corrupt; missing value for h May 25 17:34:57 charlie dovecot: child 29540 (pop3) killed with signal 11 ---------------------------------------------------------------------- Get a free email account with anti spam protection. http://www.bluebottle.com/tag/2
On Sun, 25 May 2008, Gelu G. Lupas wrote:> Hello. I'm having the following problem with dovecot 1.0.12 and above, on a > FreeBSD 7.0 system - I'm trying to run pop3-login from inetd and I keep > getting this error after authentication: > > May 25 09:46:19 charlie dovecot: POP3(gelu): /libexec/ld-elf.so.1: > environment corrupt; missing value for no-nuls oe-ns-eoh > > The problem persists if I uncomment the lines with no-nuls oe-ns-eoh in > dovecot.conf. I've also tried running pop3-login from tcpserver/ucspi-tcp and > I still get the same error. Version 1.0.1 works fine on a similar setup. > Please reply if you have any idea regarding a fix for this error. I need to > run dovecot under a tcp wrapper of some kind (preferably inetd) as the > standalone daemon doesn't allow any method to restrict access by IP. The > allow_nets extra field doesn't help much as I'm using PAM and do not want to > maintain yet another passdb. Restricting access via firewall rules is not an > option. Until I find a way to restrict access by IP address, dovecot will > only listen on the private IP address (192.168.100.1).Dovecot does quite a bit of setup for child processes via environment variables. Maybe you could use the standalone server to run a test login, see what environment variables get set through a script, and set up an envdir (part of daemontools). Then turn off the standalone server. e.g. (partially tested) in /root/testing.pl (chmod +x) #!/usr/bin/perl $dir = "/root/dovecot-env"; mkdir $dir unless -d $dir; while (my ($k, $v) = each %ENV) { open my $f, '>', "$dir/$k" or next; $v =~ tr/\n/\0/; print $f "$v\n"; } exec "/usr/libexec/dovecot/pop3-login"; and, in dovecot.conf: protocol pop3 { #... login_executable=/root/testing.pl Then, attempt to login. then, via ucspi-tcp: instead of tcpserver [options] pop3-login use tcpserver [options] envdir /root/dovecot-env pop3-login I don't use inetd, but I'm sure a similar change could be made. Alternatively, and far easier, would be to do something with a static db in dovecot that only has allow_nets={whatever you want}. I'm pretty sure you can have portions of user info returned via different mechanisms. (So, you'd also specify an auth db of 'PAM'.) If you don't need different allow_nets for different users, that'd be pretty simple. [I don't recall specifics on how to do this, though, so I might be off base.] Best, Ben
On Sun, 2008-05-25 at 10:21 +0300, Gelu G. Lupas wrote:> Hello. I'm having the following problem with dovecot 1.0.12 and above, > on a FreeBSD 7.0 system - I'm trying to run pop3-login from inetd and I > keep getting this error after authentication: > > May 25 09:46:19 charlie dovecot: POP3(gelu): /libexec/ld-elf.so.1: > environment corrupt; missing value for no-nuls oe-ns-eohI think this solves (works around) it: http://hg.dovecot.org/dovecot-1.1/rev/c2747ab1696e I think this should be fixed in FreeBSD also (they broke it in 7.0, 6.3 works). Dovecot isn't the only program relying on *environ=NULL working. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080609/e4a62a1a/attachment-0002.bin>