Sebastian Tennant
2009-Jan-28 19:01 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Hi there, Is it possible to enable local delivery to /var/mail/<user> when <user> does not have a home directory? I''ve commented out the userforward redirect router (which looks for $home/.forward files) and the maildir_home transport (which I don''t use, but thought might affect things) without success. The error message I get is: "No such file or directory: failed to chdir to /home/<user>" Any advice/tips/pointers much appreciated. Sebastian -- Emacs'' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
Neil S. Briscoe
2009-Jan-28 20:40 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
If the user doesn''t have a home directory, you have to give the poor mail system some clue as to where it should deliver things. Where did you have in mind? Regards Neil Sebastian Tennant wrote:> Hi there, > > Is it possible to enable local delivery to /var/mail/<user> when <user> > does not have a home directory? > > I''ve commented out the userforward redirect router (which looks for > $home/.forward files) and the maildir_home transport (which I don''t use, > but thought might affect things) without success. > > The error message I get is: > > "No such file or directory: failed to chdir to /home/<user>" > > Any advice/tips/pointers much appreciated. > > Sebastian-- Neil Briscoe CensorNet Ltd - professional & affordable Web & E-mail filtering neil.briscoe at censornet.com web: www.censornet.com tel: 0845 230 9592 / fax: 0845 230 9591 / main office: 0845 230 9590 snail: The Old Post Office, Bristol Rd, Hambrook, Bristol BS16 1RY. UK. MSN: nbriscoeuk at hotmail.co.uk CensorNet Ltd is a registered company in England & Wales No. 05518629 VAT registration number 901-2048-78 Any views expressed in this email communication are those of the individual sender, except where the sender specifically states them to be the views of a member of CensorNet Ltd. CensorNet Ltd does not represent, warrant or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors or interference. ------------------------------------------------------------------------------------ Scanned for viruses, spam and offensive content by CensorNet MailSafe Try CensorNet free for 14 days. Provide Internet access on your terms. Visit www.censornet.com for more information.
Sebastian Tennant
2009-Jan-28 20:58 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>:> If the user doesn''t have a home directory, you have to give the poor > mail system some clue as to where it should deliver things. > > Where did you have in mind?The usual location, i.e., the mbox file in the spool directory; /var/mail/<user> on a stock Debian box. Seb -- Emacs'' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
Robert Steinmetz AIA
2009-Jan-28 21:16 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Sebastian Tennant wrote:> Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: > >> If the user doesn''t have a home directory, you have to give the poor >> mail system some clue as to where it should deliver things. >> >> Where did you have in mind? >> > > The usual location, i.e., the mbox file in the spool directory; > /var/mail/<user> on a stock Debian box. > > Seb >There is a configuration option to deliver all mail to /var/spool/<user> if that is what you want. I understood you wanted a conditional delivery, to use /var/spool only if there is no user home directory. I don''t know how to accomplish that. -- Robert Steinmetz, AIA Principal Steinmetz & Associates
Maarten Bezemer
2009-Jan-28 21:29 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
On Wed, 28 Jan 2009, Robert Steinmetz AIA wrote:> Sebastian Tennant wrote: > > Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: > > > >> If the user doesn''t have a home directory, you have to give the poor > >> mail system some clue as to where it should deliver things. > >> > >> Where did you have in mind? > > > > The usual location, i.e., the mbox file in the spool directory; > > /var/mail/<user> on a stock Debian box. > > > There is a configuration option to deliver all mail to /var/spool/<user> > if that is what you want. > I understood you wanted a conditional delivery, to use /var/spool only > if there is no user home directory. > I don''t know how to accomplish that.Normally I think delivery is deferred if exim cannot check the user''s home directory for .forward file or procmail rc file. IIRC there is a home_directory option you can set to try to fool this check. For example, use /home/fakehomedir for all your users. But in fact, if your users have any need for configuration files, or even pop bulletin support or something like that, you''re probably going to need a home directory for each user anyway. Or are you planning to use something like teapop or courier/cyrus (I always forget which does what) with virtual pop boxes? HTH, Maarten
Sebastian Tennant
2009-Jan-28 21:37 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Quoth Robert Steinmetz AIA <rob at steinmetznet.com>:> Sebastian Tennant wrote: >> Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: >>> If the user doesn''t have a home directory, you have to give the poor >>> mail system some clue as to where it should deliver things. >>> >>> Where did you have in mind? >> >> The usual location, i.e., the mbox file in the spool directory; >> /var/mail/<user> on a stock Debian box. > > There is a configuration option to deliver all mail to /var/spool/<user> > if that is what you want.I think that option is already in play, i.e., this is where mail is already being delivered, but I''ve just discovered that it only works if the user in question has a home directory.> I understood you wanted a conditional delivery, to use /var/spool only > if there is no user home directory.Yes, sorry. I realise now that the wording of my original post was not at all clear in that respect. Seb -- Emacs'' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
Neil S. Briscoe
2009-Jan-28 21:53 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Sebastian Tennant wrote:> Quoth Robert Steinmetz AIA <rob at steinmetznet.com>: >> Sebastian Tennant wrote: >>> Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: >>>> If the user doesn''t have a home directory, you have to give the poor >>>> mail system some clue as to where it should deliver things. >>>> >>>> Where did you have in mind? >>> The usual location, i.e., the mbox file in the spool directory; >>> /var/mail/<user> on a stock Debian box. >> There is a configuration option to deliver all mail to /var/spool/<user> >> if that is what you want. > > I think that option is already in play, i.e., this is where mail is > already being delivered, but I''ve just discovered that it only works if > the user in question has a home directory. >You will probably find that the router being used calls check_local_user a description of which can be found at http://exim.choma.hu/exim-html-4.62/doc/html/spec_html/ch15.html>> I understood you wanted a conditional delivery, to use /var/spool only >> if there is no user home directory. > > Yes, sorry. I realise now that the wording of my original post was not > at all clear in that respect.So if you want to find what calls check_local_user first use /usr/sbin/exim4 -bt user which will output a list of routers called, ending in the router that is actually used. Now you can check whether that router really does use check_local_user and if so, remove that check - if that is what you really want. Or perhaps one of the other options will work for you. Regards Neil -- Neil Briscoe CensorNet Ltd - professional & affordable Web & E-mail filtering neil.briscoe at censornet.com web: www.censornet.com tel: 0845 230 9592 / fax: 0845 230 9591 / main office: 0845 230 9590 snail: The Old Post Office, Bristol Rd, Hambrook, Bristol BS16 1RY. UK. MSN: nbriscoeuk at hotmail.co.uk CensorNet Ltd is a registered company in England & Wales No. 05518629 VAT registration number 901-2048-78 Any views expressed in this email communication are those of the individual sender, except where the sender specifically states them to be the views of a member of CensorNet Ltd. CensorNet Ltd does not represent, warrant or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors or interference. ------------------------------------------------------------------------------------ Scanned for viruses, spam and offensive content by CensorNet MailSafe Try CensorNet free for 14 days. Provide Internet access on your terms. Visit www.censornet.com for more information.
Sebastian Tennant
2009-Jan-28 21:57 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Quoth Maarten Bezemer <mcbexim at robuust.nl>:> On Wed, 28 Jan 2009, Robert Steinmetz AIA wrote: > >> Sebastian Tennant wrote: >>> Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: >>> >>>> If the user doesn''t have a home directory, you have to give the poor >>>> mail system some clue as to where it should deliver things. >>>> >>>> Where did you have in mind? >>> >>> The usual location, i.e., the mbox file in the spool directory; >>> /var/mail/<user> on a stock Debian box. >>> >> There is a configuration option to deliver all mail to >> /var/spool/<user> if that is what you want. I understood you wanted >> a conditional delivery, to use /var/spool only if there is no user >> home directory. I don''t know how to accomplish that. > > Normally I think delivery is deferred if exim cannot check the user''s home > directory for .forward file or procmail rc file.... which is why I commented out the userforward router, but it has made no difference.> IIRC there is a home_directory option you can set to try to fool this > check. For example, use /home/fakehomedir for all your users.Hmm... interesting. I''ll check this out. Thanks a lot.> But in fact, if your users have any need for configuration files, or > even pop bulletin support or something like that, you''re probably > going to need a home directory for each user anyway.My users aren''t really human users :-) i.e., I''m not providing an email service.> Or are you planning to use something like teapop or courier/cyrus (I > always forget which does what) with virtual pop boxes?Virtual pop boxes yes, teapop/courier/cyrus no. Actually, it''s to provide blog posting via email functionality for the WordPress blogs I''m hosting. (WordPress can be configured to check pop boxes and publish the contents of whatever it finds). Seb -- Emacs'' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
Sebastian Tennant
2009-Jan-28 22:03 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>:> Sebastian Tennant wrote: >> Quoth Robert Steinmetz AIA <rob at steinmetznet.com>: >>> Sebastian Tennant wrote: >>>> Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: >>>>> If the user doesn''t have a home directory, you have to give the poor >>>>> mail system some clue as to where it should deliver things. >>>>> >>>>> Where did you have in mind? >>>> >>>> The usual location, i.e., the mbox file in the spool directory; >>>> /var/mail/<user> on a stock Debian box. >>> >>> There is a configuration option to deliver all mail to /var/spool/<user> >>> if that is what you want. >> >> I think that option is already in play, i.e., this is where mail is >> already being delivered, but I''ve just discovered that it only works if >> the user in question has a home directory. > > You will probably find that the router being used calls > check_local_user a description of which can be found at > http://exim.choma.hu/exim-html-4.62/doc/html/spec_html/ch15.htmlThat sounds like a very good tip. I''ll check it first thing tomorrow. Thanks.>>> I understood you wanted a conditional delivery, to use /var/spool only >>> if there is no user home directory. >> >> Yes, sorry. I realise now that the wording of my original post was not >> at all clear in that respect. > > So if you want to find what calls check_local_user first use > > /usr/sbin/exim4 -bt user > > which will output a list of routers called, ending in the router that is > actually used. > > Now you can check whether that router really does use check_local_user > and if so, remove that check - if that is what you really want. Or > perhaps one of the other options will work for you.Another valuable piece of advice. Thanks again. Seb -- Emacs'' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap
Robert Steinmetz AIA
2009-Jan-28 23:30 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
We use it with aliases/virtual users and it works for us. I get mail for virtual users defined in /etc/aliases in /var/mail It''s been so long since I set it up I don''t recall what I did. Sebastian Tennant wrote:> Quoth Robert Steinmetz AIA <rob at steinmetznet.com>: > >> Sebastian Tennant wrote: >> >>> Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>: >>> >>>> If the user doesn''t have a home directory, you have to give the poor >>>> mail system some clue as to where it should deliver things. >>>> >>>> Where did you have in mind? >>>> >>> The usual location, i.e., the mbox file in the spool directory; >>> /var/mail/<user> on a stock Debian box. >>> >> There is a configuration option to deliver all mail to /var/spool/<user> >> if that is what you want. >> > > I think that option is already in play, i.e., this is where mail is > already being delivered, but I''ve just discovered that it only works if > the user in question has a home directory. > > >> I understood you wanted a conditional delivery, to use /var/spool only >> if there is no user home directory. >> > > Yes, sorry. I realise now that the wording of my original post was not > at all clear in that respect. > > Seb >-- Robert Steinmetz, AIA Principal Steinmetz & Associates
Sebastian Tennant
2009-Jan-29 10:13 UTC
[Pkg-exim4-users] Local delivery to accounts without home directories
Quoth "Neil S. Briscoe" <neil.briscoe at censornet.com>:> You will probably find that the router being used calls > check_local_userExactly. Using your ''exim4 -bt <user>'' tip I established that the router in question is local_user, and sure enough it contains the line check_local_user, which I commneted out, and deliveries to accounts without home directories now work.> remove that check - if that is what you really want.I''ve already checked to see if exim now delivers messages with local parts that don''t exist as accounts, and it dosen''t, so that''s OK (the local_user router is skipped entirely if the local part is not a local user).> Or perhaps one of the other options will work for you.Setting router_home_diectory to some directory or other would do it, but this is a litlle messy. If there aren''t any unforseen consequences I''ll stick with simply commenting out check_local_user. Thanks a lot for your help. Seb -- Emacs'' AlsaPlayer - Music Without Jolts Lightweight, full-featured and mindful of your idyllic happiness. http://home.gna.org/eap