If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > release many email and send them !!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-04-07, 10:01
maxk maxk is offline
Registered User
 
Join Date: Nov 2005
Posts: 1
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
Reply With Quote
  #2 (permalink)  
Old 09-09-07, 07:47
Frunkie Frunkie is offline
Gives Bad Advice
 
Join Date: Mar 2007
Location: 010101010110100
Posts: 791
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On