Page 3 of 3 FirstFirst 123
Results 21 to 30 of 30

Thread: [SOLVED] Releasing quarantined emails

  1. #21
    captainmish is offline Loyal Member
    Join Date
    Mar 2007
    Location
    Plymouth, uk
    Posts
    93
    Rep Power
    8

    Default

    A quick way to release mail direct to user inboxes (requires a bit of setup but its a one liner after that) using amavisd-release

    Release quarantined banned mail from zimbra one-liner! | SubVS.co.uk

    Please vote for Bug 47625 – Include amavisd-release with amavisd (include amavisd-release in zimbra packages)

  2. #22
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    I found what I think is a better way of releasing quarantined emails (at least until bug 47625 is fixed), using zmlmtpinject.

    /opt/zimbra/bin/zmlmtpinject -s <envelope_sender> /opt/zimbra/data/amavisd/quarantine/virus-whatever -r <recipient>

    Note that <recipient> can be a list.

    Full documentation on zmlmtpinject is here: how can I use zmlmtpinject? - Zimbra :: Forums

    Shouldn't be too hard to script a solution that just takes the filename and then parses it for the envelope sender and recipient list. (Or envelope sender can just default to postmaster@<your_domain>.)

  3. #23
    dylanjh is offline Junior Member
    Join Date
    Dec 2008
    Posts
    8
    Rep Power
    6

    Default

    If using the sendmail method, Adding the "offending" sender address to the white list doesnt help either

  4. #24
    WolfyPDX is offline Intermediate Member
    Join Date
    Aug 2009
    Posts
    24
    Rep Power
    5

    Default

    Quote Originally Posted by ewilen View Post
    /opt/zimbra/bin/zmlmtpinject -s <envelope_sender> /opt/zimbra/data/amavisd/quarantine/virus-whatever -r <recipient>
    Excellent. That works nicely.

  5. #25
    shorvath is offline Junior Member
    Join Date
    Jan 2010
    Posts
    5
    Rep Power
    5

    Default

    /opt/zimbra/bin/zmlmtpinject -s <envelope_sender> /opt/zimbra/data/amavisd/quarantine/virus-whatever -r <recipient>
    That worked for me too.
    In addition I created a webmin custom command with variables for <virus-whatever> and <recipient> so my administrators can easily release messages in the future without having to drop to the command line.

    Surely this should be something available from the admin interface...???

  6. #26
    adavis is offline Intermediate Member
    Join Date
    Jan 2008
    Posts
    19
    Rep Power
    7

    Default Extracting banned email

    1. Go to the mail server's desktop
    2. Navigate to /yourZimbraRoot/zimbra/data/amavisd/quarantine
    3. Copy the banned email in question to a directory accessible on the network.
    4. Navigate to the network folder you saved the file on
    5. Change the extension type of the file to .eml
    6. You can just double click on the EML file if you have Thunderbird installed and get to the email and attachment that way.

  7. #27
    pixelplumber is offline Active Member
    Join Date
    Mar 2007
    Posts
    45
    Rep Power
    8

    Default

    I'm using the zmlmtpinject method to release quarantined incoming messages successfully.

    Is there a method for using zmlmtpinject on outgoing messages that are quarantined?

    I try it and receive an error

    Code:
    Injecting 1 message(s) to 1 recipient(s).  Server localhost, port 7025, using 1 thread(s).
    [warn] Recipient `recipient@emaildomain.com' rejected
    [] WARN: Delivery failed for /opt/zimbra/data/amavisd/quarantine/banned-tumLvfjD0A4G:
    com.zimbra.cs.lmtpserver.LmtpProtocolException: 503 5.5.1 No recipients
            at com.zimbra.cs.lmtpserver.utils.LmtpClient.sendMessage(LmtpClient.java:195)
            at com.zimbra.cs.lmtpserver.utils.LmtpInject$LmtpInjectTask.run(LmtpInject.java:227)
            at java.lang.Thread.run(Thread.java:619)
    Seems to only work on inbound mail. Its only very occasionally that we send firmware updates out that trigger the attachment policy. At the moment I have to remove exe from the banned attachments get the user to send email, and reenable the exe as a banned attachment.

  8. #28
    ewilen's Avatar
    ewilen is offline Moderator
    Join Date
    Jun 2008
    Location
    Berkeley, CA
    Posts
    1,474
    Rep Power
    9

    Default

    I doubt that lmtpinject will work since LMTP is intended for local delivery.

    What you'd like to do, I suppose, is inject the message directly into the outbound mail queue, bypassing amavis. How to do this, I'm afraid I don't know.

  9. #29
    scohol is offline Active Member
    Join Date
    Sep 2009
    Location
    Canberra, Australia
    Posts
    25
    Rep Power
    5

    Default

    Quote Originally Posted by shorvath View Post
    That worked for me too.
    In addition I created a webmin custom command with variables for <virus-whatever> and <recipient> so my administrators can easily release messages in the future without having to drop to the command line.

    Surely this should be something available from the admin interface...???
    This sounds interesting. Would be good to have a admin zimlet for this stuff. Anyone have the time to make this happen?

  10. #30
    ski98033 is offline Junior Member
    Join Date
    Dec 2010
    Posts
    5
    Rep Power
    4

    Default Ok figured out how to do this for internal and external users

    Hi,

    For internal users do:

    /opt/zimbra/bin/zmlmtpinject -s "$from" /opt/zimbra/data/amavisd/quarantine/$file -r "$to"

    For external users do:

    /opt/zimbra/bin/zmlmtpinject -p 10025 -smtp -s "$from" /opt/zimbra/data/amavisd/quarantine/$file -r "$to"

    I have attached a simple perl script. Rename it to Sendbanned.pl, edit it and change $localdomain to be your domain, then put it in somewhere and then call it on the quarantined message files like:

    /$somewhere/SendBanned.pl banned-<whatever>

    It will send the message to all the mail addresses in the To: field. At this time it does not include the cc fields.

    cheers,

    ski
    Attached Files Attached Files

Page 3 of 3 FirstFirst 123

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Errors because of Deffered emails
    By mansuper in forum Administrators
    Replies: 0
    Last Post: 11-20-2006, 04:08 PM
  2. Deleting emails before a particular date
    By mansuper in forum Zimbra in Education
    Replies: 6
    Last Post: 11-16-2006, 02:57 PM
  3. Not receiving emails
    By koby in forum Installation
    Replies: 2
    Last Post: 08-28-2006, 03:29 AM
  4. how to manage quarantined emails.?
    By demanl in forum Administrators
    Replies: 5
    Last Post: 06-24-2006, 01:27 PM
  5. emails don't show up in inbox in browser
    By pstelzer in forum Installation
    Replies: 10
    Last Post: 12-13-2005, 10:21 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •