Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    1

    Unanswered: release many email and send them !!!

    hello i new in the forum.
    i use spamassassin at my work
    all the spam are quarantined to /var/lib/spamassassin/virusmail
    sometime people say that the server is qurantined a good e-mail
    i need to to send a copy all of the spam to an account like spam@mydomain.com
    and if i have to retrieve the spam i can from this account
    i try many possibilities but they don't work

    my little script :

    cd /var/lib/amavis/virusmail
    gzip -d spam-*
    ls spam-* > list.txt
    sendmail -bm spam@mydomain.com < `cat list.txt`
    or
    sendmail -bm spam@mydomain.com < `ls spam-*`
    or
    sendmail spam@mydomain.com < -exec ls spam-* {} \;

    have you an idea ???
    thank you
    Max

  2. #2
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Quote Originally Posted by maxk
    hello i new in the forum.
    i use spamassassin at my work
    all the spam are quarantined to /var/lib/spamassassin/virusmail
    sometime people say that the server is qurantined a good e-mail
    i need to to send a copy all of the spam to an account like spam@mydomain.com
    and if i have to retrieve the spam i can from this account
    i try many possibilities but they don't work

    my little script :

    cd /var/lib/amavis/virusmail
    gzip -d spam-*
    ls spam-* > list.txt
    sendmail -bm spam@mydomain.com < `cat list.txt`
    or
    sendmail -bm spam@mydomain.com < `ls spam-*`
    or
    sendmail spam@mydomain.com < -exec ls spam-* {} \;

    have you an idea ???
    thank you
    Max
    I would use the following:
    Code:
    mail spam@mydomain.com < list.txt
    Do not use backticks as you have in your example. They are only for binary execution and you do not want to execute a text file. Instead, simply direct the file into mail. That should work.

    Before you insert that into your shell script, try it from the command line first to make sure that you have the syntax correct first.

    In the future, you may want to post the OS you are working with as the syntax varies from OS to OS.

Posting Permissions

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