The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Delete mail marked by SpamAssassin

Discussion in 'E-mail Discussions' started by Sumsar, May 12, 2003.

  1. Sumsar

    Sumsar Guest

    Hello!

    I know this has been raised several times before - but I was unable to find any answer in the previous posts. Therefore I am hoping somebody now have the words of wisdom.

    I want the server to delete all mail marked as spam by SpamAssassin (which means all mails with the line "X-Spam-Flag: YES" in the header).

    As many seem to have found out, I also realized, that the filters are run BEFORE SpamAssassin and not after.

    Has there been found a solution to this? My ISP just says they will wait for an updated Cpanel, but I'd kind of like this problem to be fixed right now :)

    All help is appreciated.

    Rasmus (Denmark)
     
  2. hormigo

    hormigo Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    we need that to.
    We try to delete all market emails but the first problem is the exim filters check emails before than SpamAssassin mark mails as a spam.

    I think that only can be fixed in future updates

    Regards
     
  3. sej7278

    sej7278 Member

    Joined:
    Jan 12, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Yup, I've got so fed-up with spam that I've changed my primary Email address.

    Hopefully a future Cpanel upgrade will either make SA execute before Exim, or replace Exim with Procmail (from which you can call spamc).
     
  4. sexy_guy

    sexy_guy Well-Known Member

    Joined:
    Mar 19, 2003
    Messages:
    848
    Likes Received:
    0
    Trophy Points:
    16
    Get yourself a copy of MailScanner and a anti-virus package. Configure MailScanner to use spamassasin. Tell Spamassassin in MailScanner that any msg that scores a spam rating higher then point 8 should be deleted. End of story. It works great. Your only problem would be finding somebody who can install this on your Cpanel box and unless you know what to modify in Mailscanner script you may have a major problem getting it to work. Mine was installed by a professional and i couldnt be happier. Not only does Mailscanner clean our spam but it also does RBL lookups and wipes out viruses. ;)
     
  5. Valuehosted

    Valuehosted Well-Known Member

    Joined:
    Dec 12, 2002
    Messages:
    124
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sweden
    give the man some credit - whos the pro installer that you used and what did it run you?

    Great info,

    --Tone
     
  6. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    That is incorrect info. The filters are run AFTER Spamassassin. The only exception to this is the main email account.
     
  7. Uneeeq

    Uneeeq Member

    Joined:
    Feb 4, 2003
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    I found an answer to this just yesterday

    setup your filter first

    then create a brand spanking new email address via cpanel

    set that email address as DEFAULT email address

    restart exim
    service exim restart

    - it works!

    I have not tested accounts that were created before we created the filter, so I do not know if the old accounts do not inherit the new filter, but I am sure with some poking around we can find that filter file and recopy it to all old accounts as well, probably located in etc/vfilters
     
  8. robnelli

    robnelli Member

    Joined:
    Apr 16, 2004
    Messages:
    14
    Likes Received:
    0
    Trophy Points:
    1
    I have had a similar problem with many clients' email and spam. They don't use their email accounts anymore but they constantly fill up with spam and mail from places no longer of interest. I wrote a Mail_Cleanup program that handles the problem and I tell my clients up front. Using the client's Cpanel, I enable SpamAssassin and have the spam routed to the Spam mailbox. I then install my Mail_Cleanup perl program in the site's cgi-bin and schedule the program to run weekly via cron with the cron results mailed back to me. The program can also make a backup copy of the mailboxes (except the spambox) before replacing it with cleaned-up mailboxes if you feel a need for added reduced risk. The configuration file for the program allows for setting the retention period for mail and for spam. I usually set the spam retention to 21 days and mail to 60 days. This way I know that all mail is eventually cleaned up. I've attached the file in a zip file for anyone's use. Happy cleaning!!
     

    Attached Files:

  9. dory36

    dory36 Well-Known Member

    Joined:
    Aug 30, 2003
    Messages:
    179
    Likes Received:
    0
    Trophy Points:
    16
    Not sure what the fuss is about with the filter order.

    I set up SA, and in the cpanel/mail menu set the filters to handle spam the way I wanted, and it works as I would expect when spam is sent to any email address in the account.

    As for purging spam folders, here is an untried idea.

    Set up a cron job that will run every month and:
    - delete each user's trash folder
    - rename the spam folder to be the trash folder

    It's down low on my list of things to do for myself if I don't find a better solution by the time it pops to the top.

    Bill
     
  10. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    You seem to have wasted your money! :p

    You can do these and a lot more with the stand-alone Cpanel version of Spamassassin and Exim. You don't need the Mailscanner to dabble in blacklists or spam.
     
  11. Keegan

    Keegan Well-Known Member

    Joined:
    Oct 22, 2001
    Messages:
    110
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    DataCenter Provider

    Does anyone have this file or can you re-upload it somewhere? The file is corrupt on download.
     
Loading...

Share This Page