Michael McCallister wrote the following on 04/07/2008 11:11 PM:
I ran across a minor, but highly annoying issue in a recent toaster migration and was wondering if anyone here had advice as to a workaround. On both installs (old and the new), I have vpopmail compiled with --enable-qmail-ext. I also used the qmailadmin to --enable-modify-spam and set --enable-spam-command=|/var/qmail/bin/preline /usr/local/bin/maildrop /home/vpopmail/etc/mailfilter . This worked great on the old system and also worked when someone used a "qmail-ext" - in other words, emails addressed to [EMAIL PROTECTED] and [EMAIL PROTECTED] both got run through the corresponding mailfilter - because the .qmail file right outside of Maildir (the one placed there by qmailadmin) was read in either scenario.

With the latest toaster that I migrated to - only emails without "-ext" (i.e. [EMAIL PROTECTED]) run through mailfilter as normal. The rest (i.e. emails addressed to [EMAIL PROTECTED]) just get dropped in the inbox and so maildrop never has a chance to run. For people who get a lot of spam sent to their "-ext" addresses, this can be annoying because all that spam that used to get deleted or dropped into a Spam folder is now going to the Inbox. On the old server, I was running vpopmail-5.4.1 / toaster-scripts-0.6 / qmailadmin-1.2.1 / maildrop-1.6.3 and on the new server I am running the most recent toaster: vpopmail-5.4.18 / toaster-scripts-0.9.0 / qmailadmin-1.2.11 / maildrop-2.0.4

Tried to Google for the answer for a while, but found nothing - also searched the list archives. I apologize if this issue is obvious / already covered. I am hoping there is some workaround that I can use to bypass this issue. Any help is appreciated.

Michael

Tom Collins posted this email on the vpopmail mailing list concerning this issue: http://www.mail-archive.com/[EMAIL PROTECTED]/msg25622.html At least I think it may be concerning this issue - I am not familiar with the code and can only read C to the extent that I can program in Perl. Basically, when address extensions are delivered, vdelivermail (with the current toaster version) completely ignores .qmail files and just delivers to Maildir. So the the .qmail file created by qmailadmin is overlooked. Using the current toaster code it looks like this:
#ifdef QMAIL_EXT
    /* format the file name */
    if (strlen(TheExt)) {
        strcpy(tmpbuf,".qmail-");
        strcat(tmpbuf,TheExt);
        if ( (fs = fopen(tmpbuf,"r")) == NULL ) {
            for (i=strlen(TheExt);i>=0;--i) {
                if (!i || TheExt[i-1]=='-') {
                    strcpy(tmpbuf,".qmail-");
                    strncat(tmpbuf,TheExt,i);
                    strcat(tmpbuf,"default");
                    if ( (fs = fopen(tmpbuf,"r")) != NULL) {
                        break;
                    }
                }
            }
        }
    } else {
        fs = fopen(".qmail","r");
    }
#else
    fs = fopen(".qmail","r");
#endif

    /* no .qmail file at all */
    if (fs == NULL ) {
        /* no file, so just return */
        return(-1);
    }
But according to Tom it should look like this (I think):
fs = NULL;
#ifdef QMAIL_EXT
    /* format the file name */
    if (strlen(TheExt)) {
        strcpy(tmpbuf,".qmail-");
        strcat(tmpbuf,TheExt);
        if ( (fs = fopen(tmpbuf,"r")) == NULL ) {
            for (i=strlen(TheExt);i>=0;--i) {
                if (!i || TheExt[i-1]=='-') {
                    strcpy(tmpbuf,".qmail-");
                    strncat(tmpbuf,TheExt,i);
                    strcat(tmpbuf,"default");
                    if ( (fs = fopen(tmpbuf,"r")) != NULL) {
                        break;
                    }
                }
            }
        }
    }
#endif
if (fs == NULL) fs = fopen (".qmail", "r");

    /* no .qmail file at all */
    if (fs == NULL ) {
        /* no file, so just return */
        return(-1);
    }
Am I heading in the right direction here? I don't completely feel familiar/comfortable doing this, so thought I would ask the list. Can I just update the vdelivermail.c, run a make clean, run make again, and then just overwrite the existing vdelivermail with the new version (after backing it up of course)?

Reply via email to