LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-02-2004, 07:25 AM   #1
ctbeal
LQ Newbie
 
Registered: Sep 2003
Posts: 3

Rep: Reputation: 0
Corrupted User Mailboxes


I have a problem with users' mailboxes being corrupted. I am running RH8, with sendmail/procmail using McAfee command line virus scanner through the emailscan script (emailscan.sourceforge.net/) and SpamAssassin 2.61.

My /etc/procmailrc is listed below. Occassionally, when the mail client attempts to fetch the mail, an error message is returned stating:

ERROR : Could not complete request.
Query: SELECT "INBOX"
Reason Given: SELECT failed: Can't open INBOX (file /var/spool/mail/username): not in valid mailbox format

Generally an otherwise empty mailbox will have a strand of SpamAssassin output at the top, similar to this:

X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on server
X-Spam-Level: *
X-Spam-Status: No, hits=1.2 required=4.0 tests=BANG_MONEY,HTML_MESSAGE,
NO_REAL_NAME autolearn=no, version=2.61

Comments on the /etc/procmailrc file:

1. The DROPPRIVS is commented out because I get errors about permissions on rm, mkdir, and find. Error messages generated are:
/bin/mkdir: cannot open current directory: Permission denied
/usr/bin/find: cannot get current directory: Permission denied
No errors were generated when running without privileges dropped.

2. The virus scanning is locked so that only once instance of emailscan can run at once. I had problems locking with $LOGNAME.lock lockfiles. When two users received an attachment at the same time (i.e., email with attachment addressed to two users), an endless loop of attempting to lock was created:

procmail: Locking "/var/spool/mail/username1.lock"
procmail: [21171] Wed Jan 28 14:19:16 2004
procmail: Locking "/var/spool/mail/username2.lock"
procmail: [21175] Wed Jan 28 14:19:16 2004
procmail: Locking "/var/spool/mail/username1.lock"
procmail: [21171] Wed Jan 28 14:19:24 2004
procmail: Locking "/var/spool/mail/username2.lock"
procmail: [21175] Wed Jan 28 14:19:24 2004
procmail: Locking "/var/spool/mail/username1.lock"
procmail: [21171] Wed Jan 28 14:19:32 2004
procmail: Locking "/var/spool/mail/username2.lock"
procmail: [21175] Wed Jan 28 14:19:32 2004
procmail: Locking "/var/spool/mail/username1.lock"
procmail: [21171] Wed Jan 28 14:19:40 2004
procmail: Locking "/var/spool/mail/username2.lock"
procmail: [21175] Wed Jan 28 14:19:40 2004

3. The recipe deleting anything with Bad RFC2822 headers is to delete errors generated by SpamAssassin when the dates on spam generate these errors.

Q1: Why are users' mailboxes being corrupted with apparently spurious SpamAssassin results?

Q2: I have a small mail server (8 users) with a 1.7 Gig processor and 512M of RAM. I think that I do not need to limit myself to one instance of emailscan and SpamAssassin at a time. Ideally, I would like for each user to be able to have an instance of emailscan or SpamAssassin at any one time. Any comments on recipes to help me accomplish this are appreciated.

Thanks,
Travis Beal

My /etc/procmailrc file:
==================
#DROPPRIVS=yes
LOGFILE=/var/log/proclog/procmail.masterlog
VERBOSE = off
TMP=/var/tmp

# Scan for viruses
#:0fw:/var/spool/mail/$LOGNAME.lock
:0fw:virus.lock
* !^X-Virus-Scan:
* multipart
| /etc/mail/emailscan/emailscan

#SpamAssassin
:0fw:/var/spool/mail/$LOGNAME.lock
* < 256000
| /usr/bin/spamc -u nobody

# Work around procmail bug: any output on stderr will cause the "F" in "From"
# to be dropped. This will re-add it.
:0
* ^^rom[ ]
{
LOG="*** Dropped F off From_ header! Fixing up. "
:0 fhw
| sed -e '1s/^/F/'
}

:0
* ^X-Mail-Format-Warning: *Bad RFC2822 header*
/dev/null
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[Fetchmail] Getting same mails on user mailboxes tchewb Linux - Networking 2 09-23-2005 04:08 AM
Getting same mails on user mailboxes tchewb Linux - Wireless Networking 1 09-22-2005 01:17 PM
9.3 finally OK (inc user access to USB drives) had corrupted / bad CD's 1kyle SUSE / openSUSE 0 08-30-2005 03:09 AM
Mailboxes rumrat Linux - Distributions 6 05-02-2003 04:56 AM
mailboxes magyartoth Linux - General 1 05-31-2002 01:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration