Sending sendmail(or other program) a mail queue??

hi,

Unfortunatly, somehow our spamassasin got configured to append all spam to a file named spam in the /var/spool/mqueue/ folder (if anyone could tell me why this occured that would be helpful too) and it unfortunatly took us until now to realise we were loosing emails.  I was wondering therefore if there was anyway we could send this spam file to the mail queue so it may be processed correctly and we can get our emails back...

Thanks

Jon
busbyjonAsked:
Who is Participating?
 
jlevieConnect With a Mentor Commented:
If all of the data is in a single file it probably is no longer is a format suitable for re-injecting into the mail stream. However, it the data was placed in the file in mbox format you should be able to point a mail client at the file and manually forward each message to its origninal recipient. If the content is in mbox format each message will start with a Unix From line, similar to:

From root@wilowisp.entrophy-free.net  Sun Aug 18 04:02:04 2004

which will be followed by the mail headers and message body. A blank line separates each each message from the next.
0
 
pablouruguayConnect With a Mentor Commented:
i have this problem year ago, and i solve with the jlevie method and i use the mutt mailer client.

if you use MH you dont have to use this process because mail are separeted in single files and are uncompatible for resend like jlevie say.
0
 
master_chrisConnect With a Mentor Commented:
SPAM ASSASIN SUCKS.. WE CREATED OUR OWN PROCMAILRC... IT LOOKS LIKE THIS.

iNCLUDERC=/etc/procmail/sanitizer.procmail

# Remove any Duplicate Emails
:0 Wh: msgid.lock
| formal -D 8192 msgid.cache

#<---- BEGIN DYNAMIC FILTER ---->
# Create Dump Directory for Emails
DUMP_DIR=/tmp/dynamic_ip

:0 Wic
* ? test ! -d $DUMP_DIR
| mkdir $DUMP_DIR

:0
* (^TO|^Subject:.*)IP_UP_DYNAMIC
$DUMP_DIR
#<---- END DYNAMIC FILTER ---->

# Strip Procmail Crap
:0
* ? formail -x"From" -x"From:" -x"Sender:" \
    -x"Reply-To:" -x"Return-Path:" -x"To:" \
    | egrep -is Procmail
{
   :0
   /dev/null
}

# Redirect common virus attachments inc. zipped versions
:0 B
* name=.*\.(pif|scr|com|exe|vbe|hta|bat|dll|wsf|cmd)
    {
        :0
        /var/spool/mail/spam.virus

    }
:0 B
* name=.*(judge|Part-2|document|details|msg|data|transfer|letter|abuse|message|o
hyeah).*\.(zip)
    {
        :0
        /var/spool/mail/spam.virus

    }

}

# Begin Blacklist Rules ( Using From Field )
:0
* ? formail -x"From" -x"From:" -x"Sender:" \
    -x"Reply-To:" -x"Return-Path:" -x"To:" \
    | egrep -is -f /etc/procmailrc_black_from.lst
{
  :0
  /var/spool/mail/spam
}

# Begin Blacklist Rules ( Using Subject Field )
:0
* ? formail -x"Subject" -x"Subject:" \
    | egrep -is -f /etc/procmailrc_black_subject.lst
{
  :0
  /var/spool/mail/spam
}

# Begin Blacklist Rules ( Using Entire Body )
:0 B:
* ? formail \
| egrep -is -f /etc/procmailrc_black_content.lst
{
  :0
  /var/spool/mail/spam
}

:0 B:
* ? formail \
| /bin/cat - | /usr/bin/tr -d '\r\n' \
| egrep "\<(IMG|img).*(src|SRC)\=.*(http\:\/\/).*\>"
{
   :0 B:
   * ? formail \
   | /bin/cat - | /usr/bin/tr -d '\r\n' \
   | egrep -v -f /etc/procmailrc_black_imgex.lst
   {
      :0
      /var/spool/mail/spam
   {
}
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.