ISPConfig+Roundcube. How to move the "quarantine files" to the Junk Folder

Discussion in 'General' started by voltron81, Sep 25, 2009.

  1. voltron81

    voltron81 New Member

    Hello,
    I'm realizing a mail server and I've used the howto forge tutorial. Just perfect.
    How can I set up the system to move all the quarantine files (mails with viruses and mail tagged as kill tag) to the junk mail?
    So in that way no email will be lost...
    Any suggestions?

    Thanks
    Michele
     
  2. voltron81

    voltron81 New Member

    If i change in /etc/amavisd.conf from:
    Code:
    #
    # Quarantine settings
    #
    
    $final_virus_destiny = D_BOUNCE;
    $final_spam_destiny = D_DISCARD;
    $final_banned_destiny = D_BOUNCE;
    $final_bad_header_destiny = D_PASS;
    
    
    to:
    Code:
    #
    # Quarantine settings
    #
    
    $final_virus_destiny = D_DISCARD;
    $final_spam_destiny = D_DISCARD;
    $final_banned_destiny = D_DISCARD;
    $final_bad_header_destiny = D_PASS;
    
    
    is it gonna be fine?

    Thanks
     
  3. voltron81

    voltron81 New Member

    Ok now that I've read a bit about amavisd, vith $spam_quarantine_to= i can say to the system to send all the spam_quarantine to a folder of the server or to an email address.
    The problem is that I can send the spam_quarantine just to a folder... so I'll have a folder where I can find the spam_quarantine of all the emails.
    What I want to realize is something like that:
    the system will copy the spam_quarantine to this folder:
    /var/vmail/%domain/%user/%.Junk/new
    So that every email will have in the junk folder his the spam_quarantine.

    Any idea to how to realize it?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I dont think that it can be realized like this as amavisd does not has placeholders for the path. Instead you should configure amavisd to tag spam in the subject and then use the email filters in the mail accounts to store the spam files to the junk folder.
     
  5. voltron81

    voltron81 New Member

    Hi till,
    the problem is that I don't want to loose any email.
    I would like to have even the email checked as virus or kill level into junk mail.

    Do you think is possible have a configuration that set the subject **SMAP** for an email tagged as normal spam and **QUARANTINE** for an email tagged as virus or kill level of spam and skip all of them into junk folder?

    Thanks
    Michele
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    I understand that and I posted the solution that is normally used in this case above.

    As fars as i know, there is no separate tag for virus emails in amavisd.
     
  7. voltron81

    voltron81 New Member

    Ok I'll try the solution that you suggest me.
    Just another question:
    How can I setup this email filters?

    Thanks
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Go to the email mailbox settings, there is a tab were you can add them.
     
  9. voltron81

    voltron81 New Member

    Ok , I guess you're talking about the "Email filter" page.
    So there I can setup that every email that have SPAM into the subject, will be moved to a folder.
    What I've to write into the "move to" field to have that email into che junk folder?
    Maybe .Junk ???

    And: there is a way to setup this filter for all the emails of a domain or I've to do it 1 by 1?

    Thanks
     
  10. voltron81

    voltron81 New Member

    any idea?
    ;)
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    The foldername is "Junk" without the dot.

    If you want to set this up for all domains, you can modify the /var/vmail/.mailfilter file. The file is written in the maildrop filter language.
     
  12. voltron81

    voltron81 New Member

    Ok great,
    I've find on the web this kind of modify for .mailfilter:
    Code:
    # Move SPAM to Junk
    `test -e /var/vmail/$HOST/$USER/.Junk`
    if ( $RETURNCODE != 0 )
    {
      `maildirmake -f Junk /var/vmail/$HOST/$USER`
      `chmod -R 0700 /var/vmail/$HOST/$USER/.Junk`
      `echo INBOX.Junk >> /var/vmail/$HOST/$USER/courierimapsubscribed`
    }
    if (/^Subject:.*\*\*SPAM\*\*/:h)
    {
    to /var/vmail/$HOST/$USER/.Junk/
    }
    Do you think this kind of modify will work for my configuration?
    Unfortunately I can not try right now because I'm trying to solve some security issues...
    Thanks
    Michele
     

Share This Page