0

Pardon me for reposting on serverfault; I mistakenly posted it originally on stackoverflow before, and was kindly reminded to post here.....

Problem: I experience every now and then non-delivery messages being sent out when procmail fails. Any non-delivery notification should go out but not those due to procmail errors.

Attempts without the expected

  • main.cf: still bounces to external senders

    notify_classes = 2bounce, data, delay, resource, software, bounce
    bounce_notice_recipient = postmaster
    
  • master.cf: no bounce messages at all

    bounce     unix  -       -       y       -       0       discard
    
  • my procmailrc settings that seem to cause the error (but were working perfectly since the early 2000's until I upgraded to Debian 10 two months ago)

    VERBOSE=ON
    LOGABSTRACT=ALL
    PATH=/bin:/usr/bin:/usr/local/bin
    SERVER=`hostname`
    RECYEAR=`date +%Y`
    RECMONTH=`date +%Y%m`
    MAILDIR=$HOME/mail
    MAILDIRchk="`test -d $MAILDIR || mkdir -p $MAILDIR`"
    BACKUPDIR=$HOME/Backup
    BACKUPDIRchk="`test -d $BACKUPDIR || mkdir -p $BACKUPDIR`"
    BACKYEARDIR=$HOME/Backup/$RECYEAR
    BACKYEARDIRchk="`test -d $BACKYEARDIR || mkdir -p $BACKYEARDIR`"
    BACKUP=$BACKYEARDIR/$RECMONTH.backup
    LOGDIR=$HOME/MailLog/$RECYEAR
    LOGDIRchk="`test -d $LOGDIR || mkdir -p $LOGDIR`"
    LOGFILE=$LOGDIR/$RECMONTH.log.$SERVER
    
  • The error message reported back to the sender :(

    <lpr_cxa@mail.destination.tld> (expanded from <my.name@destination.tld>): Command
        time limit exceeded: "procmail -a "$EXTENSION"". Command output: procmail:
        [44927] Mon May 18 15:48:12 2020 procmail: Assigning "LOGABSTRACT=ALL"
        procmail: Assigning "PATH=/bin:/usr/bin:/usr/local/bin" procmail: Executing
        "hostname" procmail: Assigning "SERVER=mail-vm" procmail: Executing
        "date,+%Y" procmail: Assigning "RECYEAR=2020" procmail: Executing
        "date,+%Y%m" procmail: Assigning "RECMONTH=202005" procmail: Assigning
        "MAILDIR=/home/lpr_cxa/mail" procmail: Executing "test -d $MAILDIR || mkdir
        -p $MAILDIR" procmail: Assigning "MAILDIRchk=" procmail: Assigning
        "BACKUPDIR=/home/lpr_cxa/Backup" procmail: Executing "test -d $BACKUPDIR ||
        mkdir -p $BACKUPDIR" procmail: Assigning "BACKUPDIRchk=" procmail:
        Assigning "BACKYEARDIR=/home/lpr_cxa/Backup/2020" procmail: Executing "test
        -d $BACKYEARDIR || mkdir -p $BACKYEARDIR" procmail: Assigning
        "BACKYEARDIRchk=" procmail: Assigning
        "BACKUP=/home/lpr_cxa/Backup/2020/202005.backup" procmail: Assigning
        "LOGDIR=/home/lpr_cxa/MailLog/2020" procmail: Executing "test -d $LOGDIR ||
        mkdir -p $LOGDIR" procmail: Assigning "LOGDIRchk=" procmail: Assigning
        "LOGFILE=/home/lpr_cxa/MailLog/2020/202005.log.mail-vm" procmail: Opening
        "/home/lpr_cxa/MailLog/2020/202005.log.mail-vm"
    Reporting-MTA: dns; mail.destination.tld
    

Question: Is there any configuration setting in postfix such that errors due to procmail failures are not reported -- but still all others are?

[[added]]

It seems that bogofilter suffers from a timeout

procmail: Executing "bogofilter,-uep"
procmail: [44927] Mon May 18 16:04:13 2020
procmail: Timeout, terminating "bogofilter"
procmail: [44927] Mon May 18 16:04:13 2020
procmail: Rescue of unfiltered data succeeded
procmail: [44967] Mon May 18 16:04:15 2020
procmail: Timeout, terminating "bogofilter"
procmail: [44967] Mon May 18 16:04:15 2020
procmail: Rescue of unfiltered data succeeded
procmail: Assigning "SPAMASSASIN=spamc"
procmail: Assigning "JUNK=Junk"
procmail: Assigning "LASTFOLDER=/home/lpr_cxa/Backup/2020/202005.backup"
procmail: Opening "/home/lpr_cxa/Backup/2020/202005.backup"
procmail: Acquiring kernel-lock
luke
  • 33
  • 5
  • Your log output is incomplete; the actual error will be somewhere in the log file in the last line of the error message. Like I wrote in your original post, the sane solution is probably to fix your Procmail rules, but without seeing the logs around the failure, I can't say what's wrong. – tripleee May 18 '20 at 14:41
  • Thank you for insisting! – luke May 18 '20 at 16:04

0 Answers0