Solved

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

Posted on 2004-08-19
6
201 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 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

19 Experts available now in Live!

Get 1:1 Help Now