Need help with a script
Hi,
I’ve been following the Virtual Users and Domains with Postfix, Courier and MySQL (Debian Etch) tutorial by Falko Timme and I’m very happy with the results. Our system performs very well but we have a problem related to
a script we use.
Mail considered as spam in our system is sent to a quarantine directory. Then a script processes all the mail in the quarantine and send those under a certain score to the users maildirs at /home/vmail/domain/maildirs for user’s examination. The problem is that the script we use strips the original separation or line feeds between header and body (and the rest of the lines too) and so the mail is counted as only header and has zero bytes. Consequently mail messages are not readable and you only get pieces of them by cliking for example in “View full header” in a mail client.
Here are the lines:
#Process by recipient
IFS=','
# When there are a lot of recipients, the line X-Envelope-To: has one or several CRs.
# To prevent this, we cut until the next tag X-…type X-Quarantain…etc appears.
# We give the possibility of a maximum of 2048 additional lines in case of extensive list of To:
Envelope_To=`grep -A 2048 -m 1 ^X-Envelope-To: $tmpfile | xargs echo 2>/dev/null | cut -f2 -d:|sed -e 's/X-.*//g'`
deb "Mail recipients (X-Envelope-To): $Envelope_To"
Where are we doing wrong? Come somebody tell?
Thanks in advance
Manuel
Last edited by Manuel; 24th October 2009 at 01:43.
|
Recent comments
5 hours 24 min ago
10 hours 17 min ago
19 hours 9 min ago
20 hours 9 min ago
23 hours 56 min ago
1 day 1 hour ago
1 day 4 hours ago
1 day 12 hours ago
1 day 20 hours ago
1 day 22 hours ago