fetchmail-friends
[Top] [All Lists]

[fetchmail] PATCH: Include user-specified message in bounces

2003-07-02 10:23:04

Hello All.

See the attachment for patches against fetchmail-6.2.2 that provides an
interface for including an user-specified message in bounce messages.

I had sent similar patches a while ago, but they didn't get into the
codebase, and I hadn't received any mail stating why. I'm assuming it's
because the patches were deficient in one or more ways, and I [now]
agree with that assessment. These patches are [much?] improved.

Rationale:
  As fetchmail doesn't include the MDA's error message, and outputs
  a generic "...has been rejected" line, I wanted a facility to better
  inform the sender of why his mail was rejected, or what recourse he
  might take.

In a nutshell:
  - A new command-line option "--bouncetext <string>" and corresponding
    resource "set bouncetext <string>", which accepts literal text or
    a filename to include in the human-readable portion of bounce
    messages. This is a global option, with no server or user override.
  - The string (whether literal or a filename) is "properly escaped",
    and is output with "\r\n"-delimited lines.
  - A minor tweak to the lexer to ignore \a, \b, \f, and \v, rather
    than just un-escaping them. I do not believe this results in any
    breakage. I would have done the same for octal and hex escapes, but
    didn't, due to what I think are portability issues (i.e., non-ASCII
    platforms?).
  - Updated the man page, --dumpconfig, and -V to support this feature,
    and clarified the man page's blurb about escapes in quoted strings.

Deficiencies:
  - The check for a file vs. literal text is primitive; it simply tests
    the first character for a '/', and if found, tries to open what is
    assumed to be a file for the text.
  - I suppose this feature could be used to introduce a security risk
    to the recipient of the bounce message, but if so, the hard-coded
    message is also suspect.
  - I did all the bullet-points in NOTES's section on adding options
    except hacking fetchmailconf (I would have, but since I don't have
    the dependancies, I couldn't test it), and adding to FEATURES and
    NEWS (as I don't know if these patches will be accepted), 

Thanks to ESR and the contributors for fetchmail - I wouldn't hack it
if I didn't like it!

Dave

-- 
  ______________________                         ______________________
  \__________________   \    D. J. HAWKEY JR.   /   __________________/
     \________________/\     hawkeyd(_at_)visi(_dot_)com    /\________________/
                      http://www.visi.com/~hawkeyd/

Attachment: fetchmail-6.2.2.udiff
Description: fetchmail-6.2.2-bouncetext.udiff

<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail] PATCH: Include user-specified message in bounces, D J Hawkey Jr <=