Hi there
Gentoo is up and running, I have networking and everything. Once I'd mananged to download all the packages I needed it all wen't quite smoothly. I've done emerge --usepkg kde and similarly for gnome ( I can't decide!) but it did not setup X. It built it but there is no XF86Config. So is there a setup script like SaX2 on Suse that I can get things going? Another question is what I do to download MSFonts?
Help appretiated
Charles
Charles Garcia-Tobin wrote:
Hi there
Gentoo is up and running, I have networking and everything. Once I'd mananged to download all the packages I needed it all wen't quite smoothly. I've done emerge --usepkg kde and similarly for gnome ( I can't decide!) but it did not setup X. It built it but there is no XF86Config. So is there a setup script like SaX2 on Suse that I can get things going? Another question is what I do to download MSFonts?
The answer to everything you ask in to be found by searching the G2 fora. It isn't a two line answer... There is no such thing as YAST or SaX2 on G2.
Cheers, Laurie.
On 26 May 2004, at 08:43, Charles Garcia-Tobin wrote:
Gentoo is up and running, I have networking and everything. Once I'd mananged to download all the packages I needed it all wen't quite smoothly. I've done emerge --usepkg kde and similarly for gnome ( I can't decide!) but it did not setup X. It built it but there is no XF86Config. So is there a setup script like SaX2 on Suse that I can get things going? Another question is what I do to download MSFonts?
From memory.. try something like 'Xconfigurator' or something similar. With luck, you should be able to get X running within ease.
As for MS fonts, I am sure that X installed that as well? Also, just refer to http://forums.gentoo.org for help or alternatively http://www.gentoo.org/doc/en/index.xml
Hope that helps
C
MS Corefonts can be obtained through emerge:
emerge sync emerge -up corefonts emerge -u corefonts
Nick
On Wed, 2004-05-26 at 08:10, Craig wrote:
On 26 May 2004, at 08:43, Charles Garcia-Tobin wrote:
Gentoo is up and running, I have networking and everything. Once I'd mananged to download all the packages I needed it all wen't quite smoothly. I've done emerge --usepkg kde and similarly for gnome ( I can't decide!) but it did not setup X. It built it but there is no XF86Config. So is there a setup script like SaX2 on Suse that I can get things going? Another question is what I do to download MSFonts?
From memory.. try something like 'Xconfigurator' or something similar. With luck, you should be able to get X running within ease.
As for MS fonts, I am sure that X installed that as well? Also, just refer to http://forums.gentoo.org for help or alternatively http://www.gentoo.org/doc/en/index.xml
Hope that helps
C
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!
Hi all you bash experts...
I'm trying to write a mail filter shell script to be used from KMail, whereby each incoming mail message will be piped through it. The filter needs to read each line of the message and then write it back suitably modified.
I'm having difficulty with the basics of shell scripting. From what I understand, "read x" will deal with each line as it's piped in, and "echo $x" will generate the output stream for the return pipe. (Are there better alternatives?) But how can I tell when the message has finished? I can't look for empty lines because these occur in the middle of messages.
Can anyone suggest a simple filter script that will take an arbitrary file, line by line, from standard input and pass it on to standard output?
-- GT
On Wed, 26 May 2004, Graham Trott wrote:
Date: Wed, 26 May 2004 09:11:59 +0100 From: Graham Trott gt@pobox.com To: main@lists.alug.org.uk Subject: [ALUG] Writing a bash filter
Hi all you bash experts...
I'm trying to write a mail filter shell script to be used from KMail, whereby each incoming mail message will be piped through it. The filter needs to read each line of the message and then write it back suitably modified.
I'm having difficulty with the basics of shell scripting. From what I understand, "read x" will deal with each line as it's piped in, and "echo $x" will generate the output stream for the return pipe. (Are there better alternatives?) But how can I tell when the message has finished? I can't look for empty lines because these occur in the middle of messages.
Can anyone suggest a simple filter script that will take an arbitrary file, line by line, from standard input and pass it on to standard output?
Are you mad? Messing with mailboxes in this way will make strong men weep! There's things such as file locking, and file permissions, to be considered and you may lose all your e-mails or make them all unreadable.
Take a long and careful look at procmail this may be able to do what you want directly or it can call an external program.
The end of a mail message is signalled by a blank line followed by "From" end of file, I think, but procmail will split them for you, write a log and do all other needful things.
Leon Stedman. (Not a bash expert!)
On 2004-05-29 23:10:06 +0100 Leon Stedman leon@RumahMas.fsnet.co.uk wrote:
Take a long and careful look at procmail this may be able to do what you want directly or it can call an external program.
mailfilter please! (Or, in your words: Are you mad? Messing with "human-readable" configs in this way will make strong men weep! ;-) )
The end of a mail message is signalled by a blank line followed by "From" end of file, I think, but procmail will split them for you, write a log and do all other needful things.
If you're getting it straight from the mailer via a pipe, getting EOF will probably signal end of a message.
On Saturday 29 May 2004 23:10, Leon Stedman wrote:
On Wed, 26 May 2004, Graham Trott wrote:
I'm trying to write a mail filter shell script to be used from KMail, whereby each incoming mail message will be piped through it. The filter needs to read each line of the message and then write it back suitably modified.
Are you mad? Messing with mailboxes in this way will make strong men weep! There's things such as file locking, and file permissions, to be considered and you may lose all your e-mails or make them all unreadable.
Take a long and careful look at procmail this may be able to do what you want directly or it can call an external program.
Leon Stedman. (Not a bash expert!)
I was hoping to avoid procmail as the syntax is so impenetrable. But I don't intend to go anywhere near the mailbox, merely attach a filter to KMail. My server is already catching a lot of spam, but even with 90% accuracy that still lets through ten or more a day so something more drastic is needed. I know bogofilter and spamassassin can be set up to take a stream from KMail and return it back again with suitable modifications to indicate spam or not. I'd like to do something similar but using different criteria based on a list of approved sender addresses.
-- GT
Quoting Graham Trott gt@pobox.com:
I'd like to do something similar but using different criteria based on a list of approved sender addresses.
Have you looked at ASK (Active Spam Killer) and TMDA (Tagged Message Delivery Agent)? I have used ASK in the past, and required my spam to about 1 a week. TDMA was a bit over the top for what I wanted at the time, so I went with ASK, which takes all of about 5 minutes to setup.
One downside is that some people think an email saying 'I WILL NOT GET YOUR MESSAGE UNLESS YOU REPLY TO THIS - yadda yadda explination yadda' doesn't apply to them, or they get confused. In my opinion though, this is a good thing, I don't want to talk to people who can't understand that.
Happy Bank Holiday!
Ian P. Christian
On Mon, 2004-05-31 at 12:25, Ian P. Christian wrote:
Quoting Graham Trott gt@pobox.com:
I'd like to do something similar but using different criteria based on a list of approved sender addresses.
Have you looked at ASK (Active Spam Killer) and TMDA (Tagged Message Delivery Agent)? I have used ASK in the past, and required my spam to about 1 a week. TDMA was a bit over the top for what I wanted at the time, so I went with ASK, which takes all of about 5 minutes to setup.
One downside is that some people think an email saying 'I WILL NOT GET YOUR MESSAGE UNLESS YOU REPLY TO THIS - yadda yadda explination yadda' doesn't apply to them, or they get confused. In my opinion though, this is a good thing, I don't want to talk to people who can't understand that.
Happy Bank Holiday!
Ian P. Christian
Aaaarrrrrgggghhhhhh! I tag all messages I receive from software like this as spam, and report it to SpamCop. So do many other mail-admins. The reason:-
1) Recent Windows viruses forge the from header. 2) My e-mail address may be the forged address. 3) ASK/TMDA/other similar crap will send ME an e-mail to confirm 4) I did NOT send you an e-mail 5) You have sent me an unsolicited e-mail - the definition of spam 6) Ergo, YOU are a spammer...welcome to /dev/null
Matt
On 2004-05-31 12:25:04 +0100 Ian P. Christian pookey@pookey.co.uk wrote:
One downside is that some people think an email saying 'I WILL NOT GET YOUR MESSAGE UNLESS YOU REPLY TO THIS - yadda yadda explination yadda' doesn't apply to them, or they get confused. In my opinion though, this is a good thing, I don't want to talk to people who can't understand that.
If you are using a auto-reply, be very very very careful. Most users become inadvertant spammers.
Personally, there are very few emails where I bother to reply to such an auto-response. The most common case I get them is when I am sending someone useful information, often that which has been requested outside email. They should damn well not send replies saying "now do more work to prove yourself" in that case.
I always reply to challenges sent to mailing lists in error, as a result of spam with a spoofed from. It makes challenge-response less effective and I think they should be discouraged.
On Sun, 30 May 2004, Graham Trott wrote:
I was hoping to avoid procmail as the syntax is so impenetrable. But I don't intend to go anywhere near the mailbox, merely attach a filter to KMail. My server is already catching a lot of spam, but even with 90% accuracy that still lets through ten or more a day so something more drastic is needed. I know bogofilter and spamassassin can be set up to take a stream from KMail and return it back again with suitable modifications to indicate spam or not. I'd like to do something similar but using different criteria based on a list of approved sender addresses.
-- GT
Spamassassin writes to standard out, so probably can be used in this way, docs are sparce on this point however.
You did say "as the mail arrives". So as soon as the mail comes into your system you need to process it, as it get moved into local mailboxes.
This is exactly what a local mail delivery agent does. I only mention Procmail as it is the default LMDA on my RedHat 9.0 system. I expect that you could use any LMDA to do similar things.
I would weed out all good e-mails and send them to one mail box and allow all other mail to fall through to the default mail-box, say IN-spam. Mail would thus be marked by being in a different box.
If you wanted to use the same box for both good and suspect mail you could pipe all suspect mail through a script to mark mail and send it to "in-box" or whatever, Procmail uses an action line:
| mark >> in-box
where mark is a program on the Procmail path, (which you can set). As mark is taking input on standard in and printing on standard out, the program can be very simple:
#! /bin/bash sed -e -s/Subject:/"Subject: <--Spam-->"/
This will change the "Subject line" to include both the <--Spam--> marker and the original subject line. The script terminates on EOF, no test required.
I hope that this helps a little, and that you can adapt this to your own needs.
Leon Stedman.
On Tuesday 01 June 2004 22:05, Leon Stedman wrote:
On Sun, 30 May 2004, Graham Trott wrote:
I know bogofilter and spamassassin can be set up to take a stream from KMail and return it back again with suitable modifications to indicate spam or not. I'd like to do something similar but using different criteria based on a list of approved sender addresses.
-- GT
(snip)
If you wanted to use the same box for both good and suspect mail you could pipe all suspect mail through a script to mark mail and send it to "in-box"
or whatever, Procmail uses an action line: | mark >> in-box
where mark is a program on the Procmail path, (which you can set). As mark is taking input on standard in and printing on standard out, the program can be very simple:
#! /bin/bash sed -e -s/Subject:/"Subject: <--Spam-->"/
This will change the "Subject line" to include both the <--Spam--> marker and the original subject line. The script terminates on EOF, no test required.
I hope that this helps a little, and that you can adapt this to your own needs.
Leon Stedman.
Thanks for the above; however from my understanding of Procmail it works as an accessory to the MTA, whereas I want the work to be done on my client as it's easier to maintain a whitelist there. The problem I was having was to write a filter using bash. I got a passable whitelist filter working after discovering that 'read' returns non-zero when it reaches the end of input stream, but still had problems when using it as a KMail filter as only part of each message was returning to the mail client.
As is the way of the world, I eventually typed the right search string into Google and came up with a solution already done by someone else, that uses the KAddressBook and recent sent lists as a whitelist. This is even better (for me) since it's now easy to reject mail from anyone unknown. I still use bogofilter at the MTA to get rid of the bulk of the rubbish, then anything left over goes through this final step. The link is
http://msquadrat.de/archive/04/03/22/01
-- GT