Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-08-19
6
Medium Priority
?
211 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
3 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 336 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 332 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 332 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

824 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