You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Resending a mail message while preserving the headers

Here's how to redirect (or "bounce") a mail message to another recipient. This is important when training Bayes via mail (as described in ProcmailToForwardMail), for example. It's often critical to redirect the message, rather than forwarding. Forwarding loses all of the critical header information, which is much of what Bayes trains from. Here are directions for redirecting from different clients. Note that for all redirections, you'll want to clear away all To: and Cc: entries and then add spam@example.com to the To:, in order to avoid resending the spam to another victim.

  • AOL's integrated email client: Redirecting mail is not available. (Dave Goldsmith)
  • Eudora: Select the message, go to the "Message" menu, choose redirect, fill in the address, and choose send. (BrianCorcoran and ErikWheeler)
  • Evolution: Select the message. In the "Actions" menu, choose the "Forward" submenu (not "Forward message", the "Forward" submenu). Pick "Redirect", fill in the "To" field, and press "Send". (JohannesUllrich)
  • Novell GroupWise: Note the current (as of this writing) version of GroupWise is v6.5. In general, the stock GroupWise client can't "bounce" a message, because the message has been converted to the internal GroupWise format (i.e. no longer in SMTP format). One workaround would be to write a GroupWise C3PO (Custom 3rd-Party Object - see http://developer.novell.com/ndk/gwc3po.htm) to add this functionality to the client. Using the stock client, to pass a SPAM (or HAM) message along to a collection point, use Forward to send it from GroupWise (select the message, Actions menu, Forward; type in the address and click on Send). At the receiving end, you'll need a Procmail receipe (or similar tool) to delete the headers down to the string "message/rfc822" plus the blank line after it. All the header info is preserved by GroupWise. Note that older, unsupported versions of GroupWise either don't support IMAP (v5.2 and earlier) or don't support it well (v5.5/v5.5EP); this support is much-improved in v6.5. Finally, the GroupWise system includes a Trusted Application API (see http://developer.novell.com/ndk/gwtapp.htm) with which you could implement a more-direct connection to SA. Here is an example .procmailrc I use for user "spam" (please note it's my first and only ever effort at these things!):
# /home/spam/.procmailrc

# GroupWise forwarded mail, subject starts Fwd:
#     Strip off the forwarding mail, leaving the attachment
#     Remove the leading blank line

VERBOSE=on
DEFAULT=$HOME/Maildir/
LOGFILE=$HOME/procmail.log

:0
* ^Subject: Fwd:
{
    :0fw: splitmsg.lck
    | sed -e '1,/message\/rfc822/d'

    :0fw: splitmsg.lck
    | sed -e '1d'
}

(JonGerdes & PsiCop)

  • KMail: In recent versions of KMail (1.6 and later) you need to copy the message first to your "sent-mail" folder. Then choose the command "Send again..." from the menu "Message". (MalteStretz)
  • Lotus Notes: Does not seem to have a method to resend messages. (DennisHennen)
  • Microsoft Outlook 97: Double-click on the message so it opens in a new window. Click on Tools-Resend This Message. A warning will appear about you not being the original sender of the message. Click Yes. A message window appears. Update the To: field and click on 'Send'. (DaveGoldsmith)
  • Microsoft Outlook 2000 & higher: Double-click on the message so it opens in a new window. Click on Actions->Resend This Message. A warning will appear about you not being the original sender of the message. Click Yes. A message window appears. Update the To: field and click on 'Send'. (DaveGoldsmith)
  • Microsoft Outlook Express: It does not appear to have a redirect option. (DaveGoldsmith and AlexBates)
  • Mutt: Select the message and use the bounce command by pressing lowercase 'b'.
  • Netscape Communicator 4.x and 7.x: They don't appear to have a redirect option.
  • OS/X Mail.app: With the email message open or selected, go to Mail's 'Message' menu and select 'Bounce to sender' or 'Redirect'. If you use this frequently, go to the "View" menu, choose "Customize toolbar", and add a button for "Redirect". (MarionBates)
  • Pegasus Mail: Click onto Forward and select "Forward the messages without editing (redirect, or bounce)" (JosefRadinger)
  • Pine: For a single message, highlight the message and press "b" to bounce it. Enter the target address and press enter. For multiple messages, select all the messages you'd like to bounce with either ":" to select them one at a time, or ";" to select multiple messages by message number, subject, body text, etc. Once selected, press "a", then "b" to Apply the Bounce command to all of them. Enter the target email address. Once done, press ";", then "a" to Unselect All selected messages. More can be found at: http://www.itc.virginia.edu/desktop/email/pine/bounce.html
    Bouncing with Pine to my PlussedEmail address adds several headers that I strip off with procmail and sed:
ReSent-Date: Wed, 27 Oct 2004 10:50:57 -0500 (CDT)
ReSent-From: User Name <username@company.com>
ReSent-To: username+spam@company.com
ReSent-Subject: pain is killing your sister
ReSent-Message-ID: <Pine.LNX.4.58.0410271050570.29000@company.com>

.procmailrc stanza:

 ^TO_.*spam@company.com
* < 256000

   {
   :0fw: spamassassin.spamlock
   | sed -e '/^ReSent-/ d'

   :0c: spamassassin.spamlock
   | sa-learn --spam

   :0: spamassassin.filelock
   spam
   }
  • Sylpheed: Click on the message, go to the "Message" menu, choose "Redirect", fill in the "To:" address, and press send. Alternately, right click in the message and choose "Redirect" from the popup menu, fill in the "To:" address, and press send. (DaveGoldsmith)
  • Mozilla Thunderbird: As of version 0.8+ the Redirect functionality is missing, but you can add it by installing the [http://mailredirect.mozdev.org redirect plugin]. (MatiasPelenur)

Contributors

Thanks to WilliamStearns for the original [http://www.stearns.org/doc/spamassassin-setup.current.html<ac:structured-macro ac:name="redirect" ac:schema-version="1" ac:macro-id="1c932c32-81d6-4ac3-b2f7-e6aa761f6366"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="redirection info] used on this page." /></ac:link></ac:parameter><ac:parameter ac:name="location"><ac:link><ri:page ri:content-title="redirection info] used on this page." /></ac:link></ac:parameter></ac:structured-macro>


CategoryBayes

  • No labels