Solved

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

Posted on 2004-08-19
6
202 Views
Last Modified: 2010-03-18
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
0
Comment
Question by:busbyjon
6 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 84 total points
ID: 11844079
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
 
LVL 14

Assisted Solution

by:pablouruguay
pablouruguay earned 83 total points
ID: 11846574
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
 
LVL 1

Assisted Solution

by:master_chris
master_chris earned 83 total points
ID: 11899195
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

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now