PDA

View Full Version : spam with illegal headers crashing my email...



Pema
07-12-2004, 12:08 PM
Hi. I've found in the last few months that every once in awhile, my email client (MS Entourage on Mac OS X) will crash while downloading mail. So I have to go through my email on my server, delete all the spam, and then my email program can handle it.

Then our tech guy at work (the company I do web design for) was mentioning that they were having the same problem, caused by spam with illegal headers, crashing their email programs.

Can I detect and delete email with illegal headers as it arrives on the server, before I download it? I was thinking of using SpamAssassin to move all the spam email to a different folder on the server, checking it at another time etc, but it's easier to check and delete spam from the email program, and I don't want to have to train our office staff in the use of SSH, pine, basically unix :D

FZ
07-12-2004, 12:13 PM
Can I detect and delete email with illegal headers as it arrives on the server

Not sure how you would do that - I think there would be too many combinations of illegal headers for you to manually filter this kind of mail. You could try looking for a program that specifically looks for malformed headers (not sure if one even exists, but SpamAssassin might help).

As for using SpamAsssassin (and Procmail) to filter, this would probably be your best bet... And, you could move mail to a folder with the same name as an e-mail account (e.g. spamaccount@yourdomain.com) so that filtered mail would appear in the accout "spamaccount" just like normal e-mail - and then you could use Webmail (instead of SSH/Pine) to view that e-mail.

Just to clarify, for the example above, you'd move mail to: /var/spool/mail/spamaccount

Pema
07-12-2004, 12:29 PM
This is so weird. Now I can't even find my SpamAssassin user settings file, or user prefs file or whatever. I found and edited it befor... where should it be on my server?

jalal
07-12-2004, 01:24 PM
Entourage is infamous for crashing from mal-formed mail headers. Or even the body of the email. I usually suggest that my clients change over to a somewhat more robust email client.
So far Thunderbird (or Mail) seem to be the most popular under Mac OSX.

Pema
07-12-2004, 02:39 PM
Yeah, I'd be into using Mail, but I have such a good organizational system going on with Entourage, I'd rather stick with that.

Can anybody tell me where the user prefs file for spamassassin is on our servers? I can't find it... i found it before ok...

FZ
07-12-2004, 04:19 PM
It should be in the home directory for the account in question, under a directory called .spamassassin - for the root account, the user_prefs would be in /.spamassassin and (as an example) for any other mail account /ftp/pub/username/.spamassassin

Pema
07-12-2004, 05:51 PM
oh yeah... i found it with an ftp client... couldn't find it through SSH though, that's weird.

so, do you have any ideas on how i can set up spamassassin to redirect spam to a different folder on my server, so i don't have to download it?

FZ
07-12-2004, 06:21 PM
You were probably not seeing it via SSH because you are not using the correct command:


ls -Al --color

is what you should use: the -A bit specifies that you want to see all contents in the present directory (specifically, it will include files and folders with a . as the first character - by default, they are hidden). The -l just makes the listing a little more detailed, and the --color adds a bit of colour to the output.

As for your second question, take a look at this: http://forums.westhost.com/phpBB2/viewtopic.php?t=1204

There would be only one modification you'd need to make there to move mail to a folder (instead of deleting it permanently):


:0:
* ^X-Spam-Flag: YES
/dev/null

Needs to be changed to:


:0:
* ^X-Spam-Flag: YES
/var/spool/mail/spamaccount

i.e. I replaced the occurrence of /dev/null with the location of the mailbox for the e-mail account "spamaccount". /dev/null occurs in one or two other places in that post, but DO NOT modify those.

You should have been able to find tons of related topics on this forum by doing a search for "procmail", but the darn thing seems broken (doesn't return any results). Oh well - if you (manually) have a peek at the E-mail related topics you should find useful posts.

Pema
07-12-2004, 07:47 PM
i'll try these things, thanks so much!

i've seen your posts on a lot of other topics... you've been really helpful :D

FZ
07-12-2004, 07:56 PM
No problem.