Two possible solutions (beyond the one provided already):

If you are on some unix systems where user directories are owned by "<username>.users", you can add the user of the perl script to 'users', and they then should have access to the directories. However, such a practice is becoming passe since any member of users may have access, though one can set up rather restrictive file permissions. Also, if you do this, try to avoid using 'nobody' as the script owner because this is the second most common target for crackers to try to get into because of the power the 'nobody' account can have on some systems.

A better solution is to create a director outside of the standard userspace that your script owner can read/write to, then have the users link their .forward/.vacation files to this area (Though, I cannot remember OOTOMH if just the existence of these files, or having valid contents, is necessary to trip the appropriate mailer actions).

I still like the idea that this probably can easily be run by the user themselves, and thus prevent the standard problems of file permissions.


In reply to Re: writing to a user's directory by Masem
in thread writing to a user's directory by dwork

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.