Sponsored Content
Top Forums Shell Programming and Scripting convert email headers' encoding? Post 302266111 by fearboy on Tuesday 9th of December 2008 12:43:33 PM
Old 12-09-2008
hi vbe -

i'll check that out. in the meantime, i tried changing the charset in the emails themselves from us-ascii to utf-8 (which i think would accomplish pretty much the same thing), with no effect.

i also realized that i could've provided a little more info - sorry, folks. the accounts all have .mdir mailboxes (as opposed to .mbox) - so each message is its own rfc 822-compliant textfile. that means the script is plowing through sometimes hundreds of files per account, and pulling only what it needs (in this case, from, subject, and a couple of other things that are irrelevant to this problem).

for each message, it takes that info and writes it all to one line in a temp file, then moves on to the next. when it's processed all the messages for that account, it reads back the file it just finished writing (which consists of the from & subject lines plus that other info, like a from name and its spam score), one line at a time, and clunks those bits of info into the body of the summary email.

i guess it's a little more complicated than i remembered - but again, the mechanics are working fine; it's just this charset thing that's broken.

thanks again to anyone with a tip,
-john.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

encoding

Hi, I'm using putty and when I try to write ü it writes | (or when I try to write é , it writes i) I tried to change settings/translation of putty but with no success I have KSH # locale LANG= LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C"... (3 Replies)
Discussion started by: palmer18
3 Replies

2. Shell Programming and Scripting

Remove text between headers while leaving headers intact

Hi, I'm trying to strip all lines between two headers in a file: ### BEGIN ### Text to remove, contains all kinds of characters ... Antispyware-Downloadserver.com (Germany)=http://www.antispyware-downloadserver.c om/updates/ Antispyware-Downloadserver.com #2... (3 Replies)
Discussion started by: Trones
3 Replies

3. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

4. Shell Programming and Scripting

UTF8 encoding

Hi experts, I have a gz file from other system(solaris), which is ftped to our system(solaris). After gunzip, the file is a xml file and we are using ORACLE built in xml transformiing tool ORAXSL to transform XML to TXT. Now the issue is we come accross issue regarding UTF8 as below:... (1 Reply)
Discussion started by: summer_cherry
1 Replies

5. Shell Programming and Scripting

How to find the file encoding and updating the file encoding?

Hi, I am beginner to Unix. My requirement is to validate the encoding used in the incoming file(csv,txt).If it is encoded with UTF-8 format,then the file should remain as such otherwise i need to chnage the encoding to UTF-8. Please advice me how to proceed on this. (7 Replies)
Discussion started by: cnraja
7 Replies

6. Shell Programming and Scripting

SQL query output convert to HTML & send as email body

Hi , I have a sql query in the unix script ,whose output is shown below.I want to convert this output to HTML table format & send email from unix with this table as email body. p_id src_system amount 1 A 100 2 B 200 3 C ... (3 Replies)
Discussion started by: jagadeeshn04
3 Replies

7. UNIX for Dummies Questions & Answers

Script output in Email is not showing Colored headers

Hi All I am working on AIX 7.1 and I am trying to show an output that I get from "cat" a log file to email. However in email I get the below output: In the script I have defined the colors as: #!/bin/sh echo "\033 Below is the script I have created to send this output: ... (9 Replies)
Discussion started by: Bubs
9 Replies

8. UNIX for Dummies Questions & Answers

Email Headers

I'm trying to pick up some Unix SysAdmin skills on my own outside of work through the use of the "Unix and Linux System Administrators Handbook." I've found the exercises to be very beneficial, until I came to this.... "What path did the email take? To Whom was it addressed, and to whom was it... (0 Replies)
Discussion started by: ksmarine1980
0 Replies

9. UNIX for Dummies Questions & Answers

Convert Txt file to HTML table and email

Hi all I need help converting a text file into a html table in bash and I need to email this table. The text file looks like the below. Two columns with multiple rows. Top row being header. Application Name Application Status Application 1 Open Application 2 ... (2 Replies)
Discussion started by: hitmanjd
2 Replies

10. Solaris

View file encoding then change encoding.

Hi all!! I´m using command file -i myfile.xml to validate XML file encoding, but it is just saying regular file . I´m expecting / looking an output as UTF8 or ANSI / ASCII Is there command to display the files encoding? Thank you! (2 Replies)
Discussion started by: mrreds
2 Replies
PYZOR(1)						      General Commands Manual							  PYZOR(1)

NAME
pyzor - spam-catcher using a collaborative filtering network SYNOPSIS
pyzor [-d] [--homedir dir] command [command_options] OPTIONS
-d turn on debugging --homedir dir use dir as the home directory for Pyzor instead of the default ~/.pyzor. See the files section for more information on what files are inside of the homedir. COMMANDS
check[--mbox] Reads on standard input an RFC 822 (email) message. Exit code is zero (0) if and only if a match is found and the global whitelist count is zero. If --mbox is provided, then the input is assumed to be a unix mailbox, and all messages in it will be checked. If multiple servers are listed in the configuration file, the exit code will be zero (0) if and only if there is a match found on at least one server (without it being whitelisted anyplace). report [--mbox] Reads on standard input an RFC 822 (email) message. Reports to the server a digest of each message in the mailbox as spam. Writes to standard output a tuple of (error-code, message) from the server. If --mbox is provided, then the input is assumed to be a unix mailbox, and all messages in it will be sent to the server. whitelist [--mbox] Reads on standard input an RFC 822 (email) message. Sends to the server a digest of each message in the mailbox for whitelisting. Writes to standard output a tuple of (error-code, message) from the server. If --mbox is provided, then the input is assumed to be a unix mailbox, and all messages in it will be sent to the server. discover Finds Pyzor servers, and writes them to ~/.pyzor/servers. This may accomplished through querying already-known servers or an HTTP call to a hard-coded address. ping Merely requests a response from the servers. genkey Based upon a secret passphrase gathered from the user and salt gathered from /dev/random, prints to standard output a tuple of "salt,key". Used to put account information into the accounts file. See the section Using Accounts for more information. digest [--mbox] Reads on standard input an RFC 822 (email) message. Writes the digest of the message to standard output. If --mbox is provided, then the input is assumed to be a unix mailbox, each message's digest is written to standard output, separated by newlines. predigest Reads on standard input an RFC 822 (email) message. Writes to standard output the normalized lines of data that are digested, with the exception that the lines printed have newlines (all whitespace is removed before digesting). USING PYZOR WITH READYEXEC
ReadyExec is a system to eliminate the high startup-cost of executing scripts repeatedly. If you execute pyzor a lot, you might be inter- ested in installing ReadyExec and using it with pyzor. To use pyzor with ReadyExec, the readyexecd.py server needs to be started as: readyexecd.py socket_file pyzor socket_file can be any (non-existing) filename you wish ReadyExec to use, such as /tmp/pyzor: readyexecd.py /tmp/pyzor pyzor Individual clients are then executed as: readyexec socket_file options command cmd_options For example: readyexec /tmp/pyzor check readyexec /tmp/pyzor report readyexec /tmp/pyzor whitelist --mbox readyexec /tmp/pyzor -d ping ReadyExec can be found at: http://readyexec.sourceforge.net/ INTEGRATION WITH MUTT
Add the following line to mutt.conf: macro index S "|/usr/bin/pyzor report" Then press S on the spam message in mutt to report it with pyzor. FILES
~/.pyzor/config The format of this file is INI-style (name=value, divided into [sections]). Names are case insensitive. All values which are filenames can have shell-style tildes (~) in them. All values which are relative filenames are interpreted to be relative to the Pyzor homedir. Defaults [client] ServersFile = servers AccountsFile = accounts DiscoverServersURL = http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x Timeout = 5 SEE ALSO
pyzord(1) AUTHOR
This manpage was originally written by Bastian Kleineidam <calvin@debian.org> for the Debian distribution of pyzor but may be used by oth- ers. The main author of pyzor is Frank J. Tobin <ftobin@neverending.org>. The main project page for pyzor can be found at http://source- forge.net/projects/pyzor 10 Oct 2002 PYZOR(1)
All times are GMT -4. The time now is 10:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy