Si on my environment "append" is not an issue it should be pipe for the
transport.
I solved it this way:
I posted this first after "begin routers":

dovecot_user:
   driver = redirect
   no_verify
  domains = +local_domains
  allow_fail
  allow_defer
  require_files = +/maildata/$local_part@$domain/
##if require files fail all other routers will be walked through
  data = /var/mail/maildata/$local_part@$domain/
  directory_transport =  dovecot_virtual_delivery
  user =vmail
  group = vmail

In my transport section:

dovecot_virtual_delivery:
 driver = pipe
command = /usr/libexec/dovecot/dovecot-lda  -d  $local_part@$domain -f
$sender_address
  message_prefix =
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
home_directory = /var/mail/maildata/$local_part@$domain
  log_output
  user = vmail
  temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78

Testing my conf:

./router_pruefen [email protected]
Exim version 4.72 uid=0 gid=0 pid=23866 D=fbb95cfd
Berkeley DB: Berkeley DB 4.7.25: (March  5, 2012)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc TCPwrappers OpenSSL
Content_Scanning DKIM Old_Demime
Lookups (built-in): lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz
dnsdb dsearch ldap ldapdn ldapm nis nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp
Fixed never_users: 0
Size of off_t: 8
OpenSSL compile-time version: OpenSSL 1.0.0-fips 29 Mar 2010
OpenSSL runtime version: OpenSSL 1.0.0-fips 29 Mar 2010
changed uid/gid: forcing real = effective
  uid=0 gid=0 pid=23866
  auxiliary group list: <none>
seeking password data for user "root": cache not available
getpwnam() succeeded uid=0 gid=0
configuration file is /etc/exim/exim.conf
log selectors = 00000ffc 00212001
Loading lookup modules from /usr/lib64/exim/4.72-4.el6/lookups
Loaded 0 lookup modules
Total 17 lookups
trusted user
admin user
seeking password data for user "vmail": cache not available
getpwnam() succeeded uid=5000 gid=5000
seeking password data for user "vmail": using cached result
getpwnam() succeeded uid=5000 gid=5000
seeking password data for user "vmail": using cached result
getpwnam() succeeded uid=5000 gid=5000
originator: uid=0 gid=0 login=root name=root
sender address = [email protected]
Address testing: uid=0 gid=93 euid=0 egid=93
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing [email protected]
address match: [email protected]
pattern=^[a-z-0-9.-]+@(tropenklinik|gaestehaus-albblick).de
[email protected] in "^[a-z-0-9.-]+@(tropenklinik|gaestehaus-albblick).de"? no
(end of list)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering [email protected]
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
routing [email protected]
--------> check_mailout router <--------
local_part=tester domain=tplk.loc
checking domains
tplk.loc in "@ : localhost : tplk.loc : store.local
:tuepdc.local:tuebdc.local"? yes (matched "@")
tplk.loc in "! +local_domains"? no (matched "! +local_domains")
check_mailout router skipped: domains mismatch
--------> dovecot_user router <--------
local_part=tester domain=tplk.loc
checking domains
cached yes match for +local_domains
cached lookup data = NULL
tplk.loc in "+local_domains"? yes (matched "+local_domains" - cached)
checking require_files
file check: +/maildata/$local_part@$domain/
expanded file: /maildata/[email protected]/
stat() yielded 0
calling dovecot_user router
rda_interpret (string): /var/mail/maildata/$local_part@$domain/
expanded: /var/mail/maildata/[email protected]/
file is not a filter file
parse_forward_list: /var/mail/maildata/[email protected]/
extract item: /var/mail/maildata/[email protected]/
set transport dovecot_virtual_delivery
dovecot_user router generated /var/mail/maildata/[email protected]/
  pipe, file, or autoreply
  errors_to=NULL transport=dovecot_virtual_delivery
  uid=5000 gid=5000 home=NULL
routed by dovecot_user router
  envelope to: [email protected]
  transport: <none>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Considering /var/mail/maildata/[email protected]/
[email protected] -> /var/mail/maildata/[email protected]/
  transport = dovecot_virtual_delivery
search_tidyup called
>>>>>>>>>>>>>>>> Exim pid=23866 terminating with rc=0 >>>>>>>>>>>>>>>>

So exim let  dovecot-lda do the job of sorting/storing
mails/sieve/forward/vacation

Greetings
Daniel 

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen 
Tel.: 07071/206-463, Fax: 07071/206-499
eMail: [email protected]
Internet: www.tropenklinik.de





-----Ursprüngliche Nachricht-----
Von: Daniel Müller [mailto:[email protected]] 
Gesendet: Donnerstag, 5. Juni 2014 08:16
An: '[email protected]'
Betreff: WG: How do I change $home for mailusers?

No one?


EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen 
Tel.: 07071/206-463, Fax: 07071/206-499
eMail: [email protected]
Internet: www.tropenklinik.de




-----Ursprüngliche Nachricht-----
Von: Daniel Müller [mailto:[email protected]] 
Gesendet: Mittwoch, 4. Juni 2014 16:08
An: '[email protected]'
Betreff: How do I change $home for mailusers?

I am  using exim with dovecot 2.2.1 with ADS auth to samba 4.1.7 on a centos
6.4


Exim version 4.72 #1 built 28-Oct-2012 18:32:26 Copyright (c) University of
Cambridge, 1995 - 2007 Berkeley DB: Berkeley DB 4.7.25: (March  5, 2012)
Support for: crypteq iconv() IPv6 PAM Perl Expand_dlfunc TCPwrappers OpenSSL
Content_Scanning DKIM Old_Demime Lookups (built-in): lsearch wildlsearch
nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch ldap ldapdn ldapm nis
nis0 nisplus passwd sqlite
Authenticators: cram_md5 cyrus_sasl dovecot plaintext spa
Routers: accept dnslookup ipliteral manualroute queryprogram redirect
Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp Fixed
never_users: 0 Size of off_t: 8 OpenSSL compile-time version: OpenSSL
1.0.0-fips 29 Mar 2010 OpenSSL runtime version: OpenSSL 1.0.0-fips 29 Mar
2010 Configuration file is /etc/exim/exim.conf

Everythings is working fine exept exim just routes the mails to the wrong
home directory(not dovecot dir.):

exim -bt [email protected]
[email protected] cannot be resolved at this time: failed to stat
/home/TPLK/mueller/. (No such file or directory)


The homedir that is reported from ADS/Winbind is ex:

getent passwd |grep tester
TPLK\tester:*:90000:100:Testuser TestMs:/home/TPLK/tester:/bin/false
But the mails that should be delivered to:
/var/mail/maildata/[email protected]/

Now I can make a ln -s /var/mail/maildata/[email protected] tester@mydomain
in /home/TPLK and the things are up and running but for  100 users!!???

Is there a way to tell an exim router to change $home to
/var/mail/maildata/$local_part@$domain/ by default??

My router:

localuser:
  driver = accept
 router_home_directory=/var/mail/maildata/$local_part@$domain/
transport_home_directory = /var/mail/maildata/$local_part@$domain/
 transport = dovecot_virtual_delivery
 cannot_route_message = Unknown user

The Transport:

dovecot_virtual_delivery:
 driver = pipe
command = /usr/libexec/dovecot/dovecot-lda  -d  $local_part@$domain -f
$sender_address
  message_prefix =
  message_suffix =
  delivery_date_add
  envelope_to_add
  return_path_add
home_directory = /var/mail/maildata/$local_part@$domain
  log_output
  user = vmail
  temp_errors = 64 : 69 : 70: 71 : 72 : 73 : 74 : 75 : 78

You see I tested router_home_directory, transport_home_directory,
home_directory with no success!!!

Greetings
Daniel


EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen 
Tel.: 07071/206-463, Fax: 07071/206-499
eMail: [email protected]
Internet: www.tropenklinik.de






-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to