Begin forwarded message:
From: "Ryan Summers" <[EMAIL PROTECTED]>
Date: Fri Jun 13, 2003 2:15:24 PM America/Phoenix
Subject: [qmailadmin] template .qmail file

Perhaps this is a strange request, but here goes...

It would be nice to have a template .qmail file that gets coppied into the vpopmail user's directory when creating a new user.  This would work sort of like how useradd takes /etc/skel and copies those files into the new user's home dir.

Reason for this?

I want to be able to use the .qmail file to call a script that filters spam (using the spamassassin spamc/spamd) 

Perhaps there's a better way to do this using qmail (filtering at the queue level perhaps)?  Any suggestions are more than welcome.

Anyways, the .qmail file will work for now.  I was able to hack the user.c addusernow() function so that it copies a .qmail file into the new user's directory.  If anybody is interested in how I did this let me know... its a pretty ugly hack though.

Ryan / Plastic Portal

M&M Recordings

This request is probably more appropriate for vpopmail development.

Could one of the vpopmail developers consider submitting a patch to make_user_dir that would copy a default .qmail file (perhaps from ~vpopmail/etc?) into the new user's directory?

You could insert the code here:

if ( chdir(username) != 0 ) {
chdir(tmpbuf); free(tmpbuf); free(tmpdir);
printf( "make_user_dir: error 2\n");
/* insert code to copy default .qmail file */
if (mkdir("Maildir",VPOPMAIL_DIR_MODE) == -1){
chdir(tmpbuf); free(tmpbuf); free(tmpdir);
printf("make_user_dir: error 3\n");


Tom Collins

Reply via email to