Re: [vchkpw] Re: Segfaulting in vadddomain

2006-06-15 Thread Bill Gradwohl
On Thu, 2006-06-15 at 12:54 +0300, Boris Pavlov wrote:
 can you post here some more info - it will not be fedora, but if this is 
 a kernel problem it can catch all of the distros.

My report :
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=191543
got rolled up into another existing error and a new kernel corrected the
problem. However, as you can see, some folks don't think it's really
Fixed.


-- 
Bill Gradwohl




Re: [vchkpw] Re: Segfaulting in vadddomain

2006-06-15 Thread Bill Gradwohl
On Thu, 2006-06-15 at 15:41 +0200, Manuzhai wrote:
 Bill Gradwohl wrote:
  I had this problem a few weeks ago on a Fedora Core 4 system, and it
  turned out to be a problem somewhere in the kernel or support libraries.
  I reported it and it was resolved when a new kernel build came out.
 
 It's not a kernel problem for me; it worked fine a few days/weeks ago, 
 using exactly the same kernel.

It may not have been the kernel directly, but clib or one of the other
O/S components.

Think about it, Something changed on your box and you're segfaulting.
That's exactly what happened to me and it was O/S related. Had nothing
to do with vpopmail.

-- 
Bill Gradwohl




Re: [vchkpw] Re: Segfaulting in vadddomain

2006-06-15 Thread Bill Gradwohl
On Thu, 2006-06-15 at 17:24 +0200, Manuzhai wrote:
 Well, it wasn't the kernel, and it also wasn't glibc. I upgraded to a 
 newer /bin/login, could that have anything to do with it?
It was something on your box, and you'll have to figure out what it was
that changed. 

You can follow the bugzilla report I submitted for clues as to what to
look for.  All I know is that I YUM updated my FC4 system and the
problem went away. I didn't care to look to see what component was
actually at fault. I don't really care. 

For me it must have been a kernel or related package because when I down
graded to an older kernel, the problem also went away. It was only with
the most recent kernel at the time and possibly whatever it drags in
that the problem manifested itself. After another kernel upgrade, the
problem disappeared.

 Regardless, it seems like no user-facing tools should ever segfault.
Agreed. But by the same logic, NOTHING should ever fail. If by user
facing tools, you mean a vpopmail component, you must remember that
vpopmail like most applications uses libraries of object modules for a
good portion of its functionality. Those libraries sometimes evolve to
contain a bug of some sort, and then vpopmail inherits the problem. 

-- 
Bill Gradwohl




Re: [vchkpw] Segmentation Fault with new Kernel

2006-05-12 Thread Bill Gradwohl
On Fri, 2006-05-12 at 08:11 -0700, Tom Collins wrote:
 What are you left with in private.ycc/1/qqq?  Has it created the 
 Maildir yet?  The subdirectories?  Can you provide some more lines from 
 the trace (maybe 30 or so) to help track down where it is in the code?
 
 Also, cdb or one of the database backends?

After some more digging, I believe I discovered a bug in glibc. The code
that uncovered it was code I added to vpopmail on my own setup, so it
probably has no impact on anyone else. 

I added 2 calls to ftw() and its been working for over a year. The
latest kernel upgrades cause the 2nd ftw to seg fault immediately
without ftw ever calling my support function. I bugzilla'd it.

Sorry for the false alarm.

-- 
Bill Gradwohl




[vchkpw] Segmentation Fault with new Kernel

2006-05-11 Thread Bill Gradwohl
I've got an older vpopmail (5.4.10) that now seg faults on vadduser.

This started after a kernel upgrade on Fedora Core 4. I recompiled the
application, thinking it was a library issue but that did not solve the
problem.

strace shows :
stat64(/home/vpopmail/domains/private.ycc/1/qqq, {st_mode=S_IFDIR|
0750, st_size=4096, ...}) = 0
open(/home/vpopmail/domains/private.ycc/1/qqq, O_RDONLY|O_NONBLOCK|
O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0750, st_size=4096, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Anyone know what changed?

The archives mention this problem, but I could see no resolution or
reasons given for the failure.

-- 
Bill Gradwohl




RE: [vchkpw] VPOPMAIL Backup

2006-01-04 Thread Bill Gradwohl
On Wed, 2006-01-04 at 18:40 +0100, Michele Virgilio wrote:
 Thanks for our replies, so can anyone give me a script to automate this
 process?

Here's a script to look at your current vpopmail area and write the
commands needed to recreate that area. Just redirect the output from the
script to a file and that file now contains the commands needed to
recreate your environment.

#!/bin/bash 

cd /home/vpopmail/domains
find . -maxdepth 1 -mindepth 1 -type d | sed 's#\./##'|while read x; do 
   password=$(grep postmaster $x/vpasswd  | sed 's/^.*://') 
   echo '/home/vpopmail/bin/vadddomain ' \'$x\' \'$password\'
   sed s/:.*:/:/;s#^#/home/vpopmail/bin/vadduser #;s/:/@$x '/;s/$/'/
$x/vpasswd|grep -v postmaster
done


Grabbing the users .qmail files, and any existing mail can be done as
follows:

#!/bin/bash

cd /home/vpopmail/domains
find . -name .qmail* | tar -c -T - /root/q.tar
find . -type d -name 'Maildir'|sed 's#$#/new#'|tar -c -T - /root/M.tar


If you want to grab the /var/qmail/control area, just tar it as in :

tar -c /var/qmail/control /root/c.tar


I find that taking real backups of things via tape backup, rsync, etc
although useful at times, isn't exactly that useful when I want to
create a new server. 

When I want a new box, its got a newer O/S, newer versions of vpopmail,
newer qmail (patches), newer clamav, etc, and trying to tar dump an old
environment into a new one isn't trivial.

Therefore, I prefer to create the commands needed to recreate the
environment from scratch which assumes I've had a catastrophic failure,
and was forced to create a new box up to the point where I want to add
domains and users. Then the info from the scripts above comes into play.

We rsync the entire box to a spare drive in a different box every night.
From that spare drive, we can extract whatever info we want even after
the real box has died, got stolen (it happened), whatever.

This isn't everything you need to do, but its a start to get you
thinking.

-- 
Bill Gradwohl




Re: [vchkpw] Copy/Monitor account per domain?

2005-12-13 Thread Bill Gradwohl
On Tue, 2005-12-13 at 17:15 -0700, Jeff at NorrisTechs wrote:
 
 Is there a way that I can have an email account per domain?  So all
 email in or out of that domain is copied to an account that can be
 checked via pop3, imap etc?   I know that are options to recompile
 qmail, which I really do not want to do.  I just need a catchall
 account per domain that every email is copied to, as apposed to the
 entire server.
 
Why not just put an extra recipient in the .qmail file for each user.
That's what we do.
i.e.

|/home/vpopmail/bin/vdelivermail '' /home/vpopmail/domains/ycc.com/bill
[EMAIL PROTECTED]

Where allmail is just another account.
-- 
Bill Gradwohl




Re: [vchkpw] Copy/Monitor account per domain?

2005-12-13 Thread Bill Gradwohl
On Tue, 2005-12-13 at 17:29 -0700, Jeff at NorrisTechs wrote:
 Will this work with vqadmin, mysql etc?  Im using Mail:Toaster on BSD.
I have no idea, as I don't use those tools. I use the standard .qmail
files as was originally intended.
-- 
Bill Gradwohl




Re: [vchkpw] Qmail queue

2004-11-03 Thread Bill Gradwohl
Andrew Averin wrote:
Hi all,
How could I clean qmail queue manually
 

Here's a script I use. I call it nukequeueitem. It shuts down send, 
waits for that to happen, and then nukes the specified items and 
restarts send.

Call it like this:
   ./nukequeueitem 123456 2342454 123123
where the numbers after it are the numbers of the queue items you want 
to nuke.

#!/bin/bash
[ $# -eq 0 ]  exit 1
svc -d /service/qmail-send
echo 'Working ...'
sleep 2s
while ! svstat /service/qmail-send | grep ': down'; do
  echo Still up.
  sleep 2s
done
for x in $@; do
  echo nuking $x
  find /var/qmail/queue -name ${x} -exec rm {} ';'
done
echo
svc -u /service/qmail-send
sleep 3s
svstat /service/*
--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
spamSTOMPER Protected email


Re: [vchkpw] Archiving mail

2004-10-26 Thread Bill Gradwohl
Ken Jones wrote:
We create a qmail queue tap patch to:
1) Set the archival email address in a control file
2) Specify the list of emails to archive in a regex style control file.
They forwarded all the tapped emails to a remote machine that
burned all the emails to CD.
If anyone is interested in this queue tap patch I can put together
a patch file together for public distribution.
 

If it can provide an archive per virtual domain for both mail sent to 
and mail sent from a given virtual domain on the box, then it sounds 
like its what I need. We're using qmail-1.03, the spamcontrol patch from 
fehcom.de, vpopmail, qmail-scanner 1.24 which relies on the QMAILQUEUE 
mechanism, and clamav 8.0.

BTW - For those offering qmail-scanner as the solution, I can't find 
enough documentation on how it might work, and haven't wanted to spend 
the time to read the code. If someone is using its archive facilities, 
I'd like more info on how to get archives per virtual domain.

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
spamSTOMPER Protected email


[vchkpw] Archiving mail

2004-10-25 Thread Bill Gradwohl
I know this subject has been touched on several times on this and the 
qmail list, but I have yet to see a comprehensive resolution, so please 
bear with me.

Texas courts are now moving legal documents via email between the 
respective attorney's offices, and attorneys are asking for a way to 
archive everything in and out of a virtual domain as a permanent record. 
The Subject: contains a case number.

SEC regulations as well as Sarbanes-Oxley (SOX) require those affected 
by these rules to archive all inbound and outbound mail. qmail has a 
rudimentary facility to do this with a patch to the extra.h file.  It 
doesn't archive a duplicate of the mail, but simply ads an artificial CC 
to it to force the rest of the system to send a modified copy of the 
email to a specific location. That may or may not satisfy SEC or SOX 
requirements - I don't know. One can argue that what the archive holds 
was never sent to the server due to the CC modification.

When vpopmail is added to the mix, the promise of the extra.h patch 
looses its usefulness as what most sites want/need is an archive per 
virtual domain or even per user, not for the box as a whole. Its been 
mentioned that maildrop can archive mail, but I believe it can only do 
this for mail that eventually gets analyzed via a .qmail file. There is 
no mechanism for mail sent out to be archived via maildrop. Please 
correct me if I'm wrong.

Is there a comprehensive way to archive mail EXACTLY AS IT WAS SENT, 
either in to the domain or out from the domain, IN A VPOPMAIL 
ENVIRONMENT, on at least a virtual domain level? If so, how? Note - 
recordio is not a solution.

Adding extra delivery instructions in the .qmail file for a user is less 
than satisfactory especially since it will only archive a facsimile of 
the mail and then only for mail send to the domain, completely missing 
any mail originating on the domain destined for the outside world.

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com



Re: [vchkpw] reporting on my vpopmail system

2004-10-22 Thread Bill Gradwohl
Rick Root wrote:
Bill, thanks for that script!
One problem is that I have more htan 100 domains, and in several 
cases, more than 100 users per domain...

so I was inspired to write a script in perl that parses the output of 
vdominfo to retrieve the directory of each domain... and then parses 
each vpasswd file for user account directory information.

It generates a CSV for me.
http://www.webworksllc.com/vpopmailReport.txt
 - Rick

You're welcome.
We are all creatures of habit. I wrote batch file scripts for the 
DOS/Windows world for so long that moving to bash was the natural thing 
to do. As Maslow once said, When the only tool you have is a hammer, 
everything starts looking like a nail.

I've written some perl scripts, but I have to crack the book every time 
for the syntax. When you requested a script and I knew I wanted 
something similar, I just started coding in bash. Your solutions is more 
specific to vpopmail and hence a better solution. Even if you have non 
standard directory locations, yours will work whereas mine won't.

I suggest you post yours to the list as its a better base for people to 
use to expand on it for their own unique requirements. That's what I'm 
going to do, now that you've done most of the hard work. :-)  Thanks!

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
spamSTOMPER Protected email


Re: [vchkpw] reporting on my vpopmail system

2004-10-21 Thread Bill Gradwohl
Rick Root wrote:
Hello. (echo, echo!)  is anyone out there?
Rick Root wrote:
Does anyone have a script or application or something that will view 
my vpopmail directory structure and give me a report?

I would like to know.
accounts in each domain
# of messages per account
amount of disk space per account
amount of disk space per domain
Thanks.
 - Rick

Here's a start to what you might want.
Your criteria is open to interpretation.
I didn't bother prettying it up, and you can add any code you might want.
#!/bin/bash
VIRTUALROOT='/home/vpopmail/domains'
cd ${VIRTUALROOT}
find . -type d -maxdepth 1 | sed 's#^\./##' | while read domain; do
  if [ -e ${VIRTUALROOT}/${domain}/vpasswd ]; then
 echo
 echo Domain - ${domain} - occupies $(du -hs ${domain})
 cd ${VIRTUALROOT}/${domain}
 find . -type d -maxdepth 1 | sed 's#^\./##' | while read user; do
if [ -d ${VIRTUALROOT}/${domain}/${user}/Maildir ]; then
   echo ${user}
   echoMaildir/new contains $(ls -1 ${user}/Maildir/new|wc 
-l) messages.
   echoAccount occupies $(du -hs ${user})
fi
 done
 cd -
  fi
done

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
SPAMstomper Protected email


[vchkpw] email groups

2004-10-18 Thread Bill Gradwohl
I need the reciprocal of an alias (one user with many email ID's) in the 
form of a group (many users reachable individually via one email ID).

How does one go about setting up an email group via vpopmail? Can valias 
do this? I can't locate any valias documentation, and don't want to 
experiment on a live system.

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
SPAMstomper Protected email


[vchkpw] Where are your .qmail files

2004-10-11 Thread Bill Gradwohl
In a recent qmail list posting, as supplemental information for his real 
problem, a vpopmail user offered his observation that all his .qmail 
files were located under his userid directories.
i.e. /home/vpopmail/domains/xyz.com/moe/.qmail, .../larry/.qmail, 
.../curly/.qmail.

As this was on a qmail list, it was inappropriate for me to investigate 
this further there.

My .qmail files are called .qmail-moe, .qmail-larry, and .qmail-curly 
and reside at the domain level (xyz.com in my example) - not below the 
individual user directories. I tried to put them under those user 
directories, but they appeared to be ignored.

Where are your .qmail files located and what are they called?
Did I miss an option to put the .qmail files where I'd like them to be - 
inside the users directory?
Am I missing something?

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
SPAMstomper Protected email


Re: [vchkpw] Log all email per domain antivirus that notifies recipients

2004-09-23 Thread Bill Gradwohl
Thank you to all that replied. I'll take a look at qmail-scanner, 
simscan and QMVC as suggested.

In case someone follows this thread in the future, I want to mention 
that I used the technique referenced via  
http://cr.yp.to/qmail/faq/admin.html#copies successfully for years. Then 
I decided to implement virtual domains via vpopmail, and couldn't make 
it work in the virtual environment, even to a single log for all 
domains. I don't recall all the tests I ran, but I eventually gave up 
trying to make it work. There's no logic that I can find to make it 
support a log per virtual domain in any case.

Because the sender of the infected mails is the Texas Court system, 
normal logic rules don't apply. If the courts have a record of sending a 
particular email, they record it as successfully contacting the 
attorneys for the case. If the receiving MTA trashes that email due to a 
virus, and some court date is missed or document isn't filed as a 
result, the courts are blameless. Therefore, only something that warns 
the recipient (clerk @ attorney's office) is of any value, and that 
warning MUST at a minimum contain the Subject: line as that's the only 
identifier for what case is involved.

If there were a way of eliminating only that portion of the email 
payload that was infected, and allowing the remainder to hit the 
recipients inbox, that would be the best solution. Rebuilding an email 
of only the clean portions isn't something that exists as far as I'm aware.

As an aside, how would you like being on the receiving end of this set 
up? Your case is before the courts, and a virus or anything else 
disrupts the flow of email. You are, in effect, guilty because 
something didn't happen as it should have because the courts have 
declared that email is a guaranteed delivery mechanism. This system is 
coming to your state, as Texas was used as the test site. This idea is 
so bad that foreign governments are also likely to pick it up.

--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com
SPAMstomper Protected email


[vchkpw] Log all email per domain antivirus that notifies recipients

2004-09-22 Thread Bill Gradwohl
Two issues:
1) Using qmail  vpopmail, what methods are available to log all inbound 
and outbound email PER VIRTUAL DOMAIN?
2) We also need a way to notify the recipient of an email that contained 
a virus that the infected email was destroyed, and that it came from 
[EMAIL PROTECTED] with a subject line of whatever it was.

We have a law firm that wants to record all their communications in both 
directions. We are capturing inbound emails by appending 
[EMAIL PROTECTED] to the end of everyones .qmail file. 
What's missing is a way to capture the outbound emails.

Texas courts are currently in the process of requiring attorneys to use 
email to file and update their cases. They are using email as though it 
was a guaranteed delivery mechanism even though we all know it isn't. 
This pilot project is expected to go nationwide soon.

When the courts send out an email containing a virus (they use Windows 
boxes), the normal thing for a receiving MTA's virus checker to do is 
silently throw that email away and not notify anyone. In this case 
however, that email has legal ramifications so that either we have to 
let the infected email pass thru the server, extract only the infected 
portion of the email leaving the rest intact (no idea how to do that), 
or throw it away but notify the recipient of what was done. The subject 
line of these emails contains a case number that could be used as follow 
up by the receiving clerk at the law firm.

We currently use qscanq to call clamav for the heavy lifting, but that 
approach doesn't offer a way to notify anyone of what happened to an 
infected email - at least not any way I know of.

We'd like solutions that have per virtual domain granularity so other 
domains on the box don't have to do things the same way.

Suggestions?
--
Bill Gradwohl
[EMAIL PROTECTED]
http://www.ycc.com



[vchkpw] Archive all emails

2004-06-24 Thread Bill Gradwohl
I've checked the archives, but searching on archive or log is fruitless.

Generic qmail offers a way to archive all emails to a specific user via a
fix to the extra.h file prior to compiling. For years, I've patched it to
route mail to user qmaillog and its worked well.

Every time I try to implement this along with vpopmail, I get hundreds of
vdelivermail processes launched and nothing ends up in
domains/whatever.com/qmaillog's Maildir. When I recompile qmail with a
default extra.h everything works as expected, but there's no archiving.

What I'm really after is an archive per virtual domain, not an archive for
qmail as a whole. At this point however, since I can't get any form of
archiving to work, I'd implement whatever I can get to function.

Is there a known technique for archiving per virtual domain? 
Any help would be appreciated. Thank You.

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




RE: [vchkpw] Archive all emails

2004-06-24 Thread Bill Gradwohl
Nick:

Thanks for the suggestion, but I need a copy of all mails - in and out. 
Solutions involving .qmail will only capture inbound messages.

--
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com
 



[vchkpw] Unable_to_run_/bin/sh

2004-06-02 Thread Bill Gradwohl
I've installed qmail and vpopmail on 2 different test boxes. One is working
just fine and the other is giving me the Unable_to_run_/bin/sh message in
/var/log/qmail-send/current. I believe its vdelivermail that's doing it, but
I don't know why it works on one box and not the other.

I'm running vpopmail V 5.4.0, on Fedora Core 2 on both boxes. 

I've checked the archives and I can su vpopmail -c '/bin/sh' so the archive
suggestions don't seem to apply.

What am I missing?

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




[vchkpw] Looking for patches

2004-05-30 Thread Bill Gradwohl
I noticed that vdeluser doesn't get rid of the .qmail files for a user if
there are any. Has anyone developed a patch to do this?

Does anyone have a patch to run a script or other executable when vadddomain
or vadduser successfully completes? What I'm after is to perform some post
processing every time a domain or user is created. 

Wrapping scripts around the native commands is of course easy enough to do,
but then the WEB based tools provided by vqadmin don't benefit. I'm assuming
that the web tools call the native executables to do the heavy lifting, but
I don't know that for certain as I haven't read the sources yet.

Is there a general place to check for patches? I checked the archives before
posting, but didn't see anything relevant. 

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




RE: [vchkpw] Looking for patches

2004-05-30 Thread Bill Gradwohl
What files were left behind, and where did they come from?

I created a testuser for testdomain.com and noted that the user ended up in
/home/vpopmail/domains/testdomain.com/testuser as expected. 

I then manually created a .qmail-testuser file at the domain level
/home/vpopmail/domains/mydomain.com, and ran some tests and that .qmail file
did get used. I put it at the domain location instead of inside the users
directory because that's what a script I saw did.

Then I vdeluser deleted the testuser and the .qmail-testuser file was still
there. Maybe I've got the .qmail file in the wrong place. ??? 

Should a user specific .qmail file be inside the domain directory or inside
the users directory? 

If it's inside the users directory, then vdeluser will nuke it. If it has to
be at the domain level, then it would be nice for vdeluser to nuke it since
there isn't any other possible use for that file.

-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com 




RE: [vchkpw] Looking for patches

2004-05-30 Thread Bill Gradwohl
Thanks for the information about where to put the .qmail files.


-- 
Bill Gradwohl
YCC
(817) 224-9400 x211
www.ycc.com