Re: symlink of /home causes mail delivery failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dr. Michael J. Chudobiak wrote:
> 
> Hi all,
> 
> I tried to make my /home directory a symlink to something on a different 
> disk (i.e., symlink across filesystems). It appeared to work fine when 
> browsing directories, but mail delivery stopped!
> 
> I'm using Postfix, with procmail doing the local delivery.
> 
> Is there any reason that procmail (or anything else) would fail if /home 
> is a symlink?
> 
> - Mike
> 

It depends on:

  - What shell you're using:  When presented with a directory symlink like
    "/home/A -> /tmp/A", environment variable HOME defined as "/home/A",
    and the command "cd $HOME", some shells (sh for example) won't update
    the cwd variable when they get there.  Thus the shell (sh in this
    example) will yield funny results:
		# cd $HOME
		# echo $PWD
		/home/A
		# pwd
		/home/A
		# /bin/pwd
		/tmp/a
		#
   While tcsh and ksh will show:
		# cd $HOME
		# echo $PWD
		/home/A
		# pwd
		/tmp/A
		# /bin/pwd
		/tmp/A
		#

   So...  using the shells you normally run, you need to test this and
   if you get different answers for "where am I?" in the above scenario,
   you might want to consider switching to a shell that doesn't do this
   _or_ altering how "cd" behaves by having it do "cd $1; cd `/bin/pwd`"
   instead of just "cd $1" (and depending on how your normal shell's
   .rc file is set up, you may also need to apply this trick to the
   pushd/popd and "set prompt" aliases/sets/commands, too.

 - What you've set your HOME environment variable to.  If $HOME is set
   to the pointer part of a symlink and not the pointee, you'll run into
   the problem I described above more often.

 - The type of symlink reference you've used.  "/home/A -> /tmp/A"
   will normally cause less trouble than "/home/A -> ../../tmp/A".

and

 - The specific formulas you've used in .procmailrc.

It's little gotchyas like these that make symlinked HOME directories
tougher than necessary to pull off.

One trick that normally helps in this situation is to redefine HOME in
your shell's .rc (or better yet, .login) file via something like:
		setenv HOME `/bin/pwd`

Hope this helps'idly,

-S
	

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux