[Dovecot] LMTP with virtual and system users
Philipp Kolmann
kolmann at zid.tuwien.ac.at
Mon Dec 30 10:40:58 EET 2013
Hi Adrian,
Am 26.12.2013 12:20, schrieb Adrian Zaugg:
> You can use exim to prepare the address as you wish: only the user name
> for pam users and the full address for virtual users.
>
> Configure a new router to strip the domain part for pam users:
>
> local_pam_users:
> debug_print = "R: strip domain for local pam users"
> driver = redirect
> check_local_user
> domains = @ : localhost : ${primary_hostname}
> data = ${local_part}
> redirect_router = local_user
>
> I'm not 100% sure of the domains condition; it should restrict the
> router to your domain(s) where your pam users receive their email. The
> redirect_router designates the router which routes your local deliveries
> to your lmtp transport. Place the new router to run just before your
> "local_user" router.
>
> Since your config works for your virtual users, you don't need to do
> anything in addition.
I had tried this once already. I have used your snipplet and attached
the debug output from exim. Sadly it didn't work, because the mtp
process got the foll email again and not just the username.
thanks
Philipp
--
-----------------------------------------------------------------------
DI Mag. Philipp Kolmann mail: kolmann at zid.tuwien.ac.at
Technische Universitaet Wien web: www.zid.tuwien.ac.at
Zentraler Informatikdienst (ZID) tel: +43(1)58801-42011
Wiedner Hauptstr. 8-10, A-1040 Wien DVR: 0005886
-----------------------------------------------------------------------
-------------- next part --------------
17788 --------> local_pam_users router <--------
17788 local_part=pkolmann domain=lukas.rudolfina.at
17788 checking domains
17788 lukas.rudolfina.at in "@ : localhost : lukas.rudolfina.at"? yes (matched "@")
17788 checking for local user
17788 seeking password data for user "pkolmann": using cached result
17788 getpwnam() succeeded uid=1002 gid=1002
17788 R: strip domain for local pam users
17788 calling local_pam_users router
17788 rda_interpret (string): ${local_part}
17788 expanded: pkolmann
17788 file is not a filter file
17788 parse_forward_list: pkolmann
17788 extract item: pkolmann
17788 local_pam_users router generated pkolmann at lukas.rudolfina.at
17788 errors_to=NULL transport=NULL
17788 uid=unset gid=unset home=NULL
17788 routed by local_pam_users router
17788 envelope to: pkolmann at lukas.rudolfina.at
17788 transport: <none>
17788 locking /var/spool/exim4/db/retry.lockfile
17788 locked /var/spool/exim4/db/retry.lockfile
17788 EXIM_DBOPEN(/var/spool/exim4/db/retry)
17788 returned from EXIM_DBOPEN
17788 opened hints database /var/spool/exim4/db/retry: flags=O_RDONLY
17788 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
17788 Considering: pkolmann at lukas.rudolfina.at
17788 unique = \0\pkolmann at lukas.rudolfina.at
17788 dbfn_read: key=R:lukas.rudolfina.at
17788 dbfn_read: key=R:pkolmann at lukas.rudolfina.at
17788 dbfn_read: key=R:pkolmann at lukas.rudolfina.at:<philipp at kolmann.at>
17788 no domain retry record
17788 no address retry record
17788 pkolmann at lukas.rudolfina.at: queued for routing
17788 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
17788 routing pkolmann at lukas.rudolfina.at
17788 --------> local_user router <--------
17788 local_part=pkolmann domain=lukas.rudolfina.at
17788 checking domains
17788 search_open: mysql "NULL"
17788 cached open
17788 search_find: file="NULL"
17788 key="SELECT domain FROM domain WHERE domain='lukas.rudolfina.at';" partial=-1 affix=NULL starflags=0
17788 LRU list:
17788 :/etc/aliases
17788 End
17788 internal_search_find: file="NULL"
17788 type=mysql key="SELECT domain FROM domain WHERE domain='lukas.rudolfina.at';"
17788 cached data used for lookup of SELECT domain FROM domain WHERE domain='lukas.rudolfina.at';
17788 lookup failed
17788 lukas.rudolfina.at in "@:localhost:"? yes (matched "@")
17788 lukas.rudolfina.at in "+local_domains"? yes (matched "+local_domains")
17788 checking local_parts
17788 pkolmann in "! root"? yes (end of list)
17788 checking for local user
17788 seeking password data for user "pkolmann": using cached result
17788 getpwnam() succeeded uid=1002 gid=1002
17788 R: local_user for pkolmann at lukas.rudolfina.at
17788 calling local_user router
17788 local_user router called for pkolmann at lukas.rudolfina.at
17788 domain = lukas.rudolfina.at
17788 set transport dovecot_lmtp
17788 queued for dovecot_lmtp transport: local_part = pkolmann
17788 domain = lukas.rudolfina.at
17788 errors_to=NULL
17788 domain_data=NULL localpart_data=NULL
17788 routed by local_user router
17788 envelope to: pkolmann at lukas.rudolfina.at
17788 transport: dovecot_lmtp
17788 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
17788 After routing:
17788 Local deliveries:
17788 pkolmann at lukas.rudolfina.at
17788 Remote deliveries:
17788 Failed addresses:
17788 Deferred addresses:
17788 search_tidyup called
17788 close MYSQL connection: localhost/exim/exim
17788 >>>>>>>>>>>>>>>> Local deliveries >>>>>>>>>>>>>>>>
17788 --------> pkolmann at lukas.rudolfina.at <--------
17788 locking /var/spool/exim4/db/retry.lockfile
17788 locked /var/spool/exim4/db/retry.lockfile
17788 EXIM_DBOPEN(/var/spool/exim4/db/retry)
17788 returned from EXIM_DBOPEN
17788 opened hints database /var/spool/exim4/db/retry: flags=O_RDONLY
17788 dbfn_read: key=T:pkolmann at lukas.rudolfina.at
17788 no retry record exists
17788 search_tidyup called
17791 changed uid/gid: local delivery to pkolmann <pkolmann at lukas.rudolfina.at> transport=dovecot_lmtp
17791 uid=1002 gid=1002 pid=17791
17791 auxiliary group list: <none>
17791 home=/home/pkolmann current=/home/pkolmann
17791 set_process_info: 17791 delivering 1VxWnG-0004cr-Cr to pkolmann using dovecot_lmtp
17791 dovecot_lmtp transport entered
17791 using socket /var/run/dovecot/lmtp
17791 LMTP<< 220 lukas.rudolfina.at Dovecot ready.
17791 LMTP>> LHLO lukas.rudolfina.at
17791 LMTP<< 250-lukas.rudolfina.at
17791 LMTP<< 250-8BITMIME
17791 LMTP<< 250-ENHANCEDSTATUSCODES
17791 LMTP<< 250 PIPELINING
17791 LMTP>> MAIL FROM:<philipp at kolmann.at>
17791 LMTP<< 250 2.1.0 OK
17791 LMTP>> RCPT TO:<pkolmann at lukas.rudolfina.at>
17791 LMTP<< 550 5.1.1 <pkolmann at lukas.rudolfina.at> User doesn't exist: pkolmann at lukas.rudolfina.at
17791 LMTP>> QUIT
17791 LMTP<< 221 2.0.0 Client quit
17791 dovecot_lmtp transport yields 1
17791 search_tidyup called
17788 dovecot_lmtp transport returned FAIL for pkolmann at lukas.rudolfina.at
17788 post-process pkolmann at lukas.rudolfina.at (2)
17788 LOG: MAIN
17788 ** pkolmann at lukas.rudolfina.at R=local_user T=dovecot_lmtp: LMTP error after RCPT TO:<pkolmann at lukas.rudolfina.at>: 550 5.1.1 <pkolmann at lukas.rudolfina.at> User doesn't exist: pkolmann at lukas.rudolfina.at
17788 >>>>>>>>>>>>>>>> deliveries are done >>>>>>>>>>>>>>>>
More information about the dovecot
mailing list