Bug#600007: environment option can not set USER for pipe transport

2010-10-14 Thread Joachim Breitner
Hi again,

Am Mittwoch, den 13.10.2010, 19:12 +0200 schrieb Joachim Breitner:
 Am Mittwoch, den 13.10.2010, 19:10 +0200 schrieb Andreas Metzler:
  Shouldn't this do as a workaround for
  the time being?
  
  command = /usr/bin/env USER=$local_p...@$domain /usr/lib/dovecot/deliver 
  -f $sender_address
 
 Probably. I can also try to use use_shell, as the shell will probably
 re-do the environment and might read it from right to left.

Confirmed. With “use_shell” the USER in environment takes precedence
over exim’s own one. I assume that this is due to different parsing of
the environment in the shell and in deliver. It works for me this way,
but the behavior is still undesirably arbitrary.

Thanks,
Joachim

-- 
Joachim nomeata Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata


signature.asc
Description: This is a digitally signed message part


Bug#600007: environment option can not set USER for pipe transport

2010-10-13 Thread Andreas Metzler
On 2010-10-12 Joachim Breitner nome...@debian.org wrote:
[...]
 Setting HOME works fine using home_directory. But it seems that I cannot
 set USER via the environment option, as in

 vuser_sieve:
   driver = pipe
   command = /usr/lib/dovecot/deliver -f $sender_address
   home_directory = /var/vhosts/$domain/$local_part
   environment = USER=$local_p...@$domain

 (with or without the quotes, does not matter)

 Reading the code (./src/transports/pipe.c, function
 pipe_transport_entry), I see that the entries from the environment
 option are just appended to the list of environment variables, so I
 assume that both values for USER – exim’s default and the one I set –
 are passed in the environment, leading to undefined behaviour.
[...]

This is also documented. (spec.txt 29.4 Environment variables: The
environment variables listed below are set up when the command is
invoked. [...] Note that the environment option can be used to add
additional variables [...])


 I think it would be better if entries in environment really override the
 defaults from exim.

 For me, this is not critical, as it only affects the logging output. But
 it certainly is unexpected behaviour. Such a setup is also recommended
 by dovceot, see the example on http://wiki.dovecot.org/LDA/Exim at the
 very bottom.
[...]

I will forward this upstream. Shouldn't this do as a workaround for
the time being?

command = /usr/bin/env USER=$local_p...@$domain /usr/lib/dovecot/deliver -f 
$sender_address

cu andreas



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#600007: environment option can not set USER for pipe transport

2010-10-13 Thread Joachim Breitner
Hi,

Am Mittwoch, den 13.10.2010, 19:10 +0200 schrieb Andreas Metzler:
 On 2010-10-12 Joachim Breitner nome...@debian.org wrote:
 [...]
 This is also documented. (spec.txt 29.4 Environment variables: The
 environment variables listed below are set up when the command is
 invoked. [...] Note that the environment option can be used to add
 additional variables [...])

yes,  I noticed that it wasn’t working as expected.

  I think it would be better if entries in environment really override the
  defaults from exim.
 
  For me, this is not critical, as it only affects the logging output. But
  it certainly is unexpected behaviour. Such a setup is also recommended
  by dovceot, see the example on http://wiki.dovecot.org/LDA/Exim at the
  very bottom.
 [...]
 
 I will forward this upstream.

Thanks.

 Shouldn't this do as a workaround for
 the time being?
 
 command = /usr/bin/env USER=$local_p...@$domain /usr/lib/dovecot/deliver -f 
 $sender_address

Probably. I can also try to use use_shell, as the shell will probably
re-do the environment and might read it from right to left.

Greetings,
Joachim
-- 
Joachim nomeata Breitner
Debian Developer
  nome...@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nome...@joachim-breitner.de | http://people.debian.org/~nomeata


signature.asc
Description: This is a digitally signed message part


Bug#600007: environment option can not set USER for pipe transport

2010-10-12 Thread Joachim Breitner
Package: exim4
Version: 4.72-1
Severity: wishlist
Tags: upstream

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

I’d like to use deliver (from the dovecot package) in a vhost setup
without having deliver look up information from the dovecot-auth server.
To that end, I need to set the environment variables HOME and USER.
Setting HOME works fine using home_directory. But it seems that I cannot
set USER via the environment option, as in

vuser_sieve:
  driver = pipe
  command = /usr/lib/dovecot/deliver -f $sender_address
  home_directory = /var/vhosts/$domain/$local_part
  environment = USER=$local_p...@$domain

(with or without the quotes, does not matter)

Reading the code (./src/transports/pipe.c, function
pipe_transport_entry), I see that the entries from the environment
option are just appended to the list of environment variables, so I
assume that both values for USER – exim’s default and the one I set –
are passed in the environment, leading to undefined behaviour.

I think it would be better if entries in environment really override the
defaults from exim.

For me, this is not critical, as it only affects the logging output. But
it certainly is unexpected behaviour. Such a setup is also recommended
by dovceot, see the example on http://wiki.dovecot.org/LDA/Exim at the
very bottom.

Thanks,
Joachim


- -- Package-specific info:
Exim version 4.72 #1 built 03-Jun-2010 17:41:48
Copyright (c) University of Cambridge, 1995 - 2007
Berkeley DB: Berkeley DB 4.8.30: (April  9, 2010)
Support for: crypteq iconv() IPv6 GnuTLS move_frozen_messages DKIM
Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch 
nis nis0 passwd
Authenticators: cram_md5 plaintext
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
GnuTLS compile-time version: 2.8.6
GnuTLS runtime version: 2.8.6
Configuration file is /etc/exim4/exim4.conf

- -- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages exim4 depends on:
ii  debconf [debconf-2.0] 1.5.36 Debian configuration management sy
ii  exim4-base4.72-1 support files for all Exim MTA (v4
ii  exim4-daemon-light4.72-1 lightweight Exim MTA (v4) daemon

exim4 recommends no packages.

exim4 suggests no packages.

- -- debconf information:
  exim4/drec:

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAky0r7kACgkQ9ijrk0dDIGyIwACbBnnTHQ/Z28qm4YOuF1w+n0aV
huwAmgLSMXIJAnTW4kxOUQqJL9XYlxF2
=N90d
-END PGP SIGNATURE-



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org