maildrop issues

Discussion in 'Installation/Configuration' started by warlock, Nov 5, 2009.

  1. warlock

    warlock Member

    Hi,

    I have update via the update script and mail fails I then reinstalled from scratch and am having the same issue.

    status=deferred (temporary failure. Command output: /usr/bin/maildrop: Unable to open mailbox. )

    I am running ubuntu 9.10 and ISPConfig 3.0.1.6

    Any ideas, all mailbox are in lower case.
     
  2. warlock

    warlock Member

    Ok so I did

    apt-get install maildrop

    it then removed courier-maildrop and installed just maildrop, is this going to be a problem, mail is being delivered now. ?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You have to check if the maildrop package you installed now supports mysql. If not, then things like quota will not work anymore.
     
  4. warlock

    warlock Member

    Cool,

    How and were can I check this and any idea why the couries-maildrop is failing ?

    I tried re-installing it but get the same error as above......
     
    Last edited: Nov 6, 2009
  5. lenthir

    lenthir New Member

    I think this is bug, because user folders are being owned by vmail, and in courier-maildrop manual is:

    "In all cases, the -d option is allowed if user is the same user who is running maildrop."

    And in log I have this:
    Nov 7 18:29:39 columbo authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/srv/poczta, address=admin[...], fullname=<null>, maildir=/srv/poczta/[domain]/admin, quota=0, options=disableimap=0,disablepop3=0
    Nov 7 18:29:39 columbo maildrop[19409]: Unable to open mailbox.

    I'm working on this problem.

    Other thing... I noticed that, you could have more problems if your default system umask are different from 022 (or even 002, eg. wrong WWW folder rights for new users).
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If it is working on several thousand servers and just not in yours, it is a configuration issue on your system and not a bug. Otherwise it would not work for anybody.

    Maildrop is invoked as user vmail by postfix. If thats not the case on your system, check the maildrop line in master.cf.
     
  7. lenthir

    lenthir New Member

    Thank You for your reply. I will check and write here the results :)
     
  8. lenthir

    lenthir New Member

    I've found something strange...

    This is line from master.cf:
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}

    I've added: `echo "$LOGNAME; $EXTENSION; $RECIPIENT; $USER; $HOST; $SENDER; $DEFAULT" >> /var/vmail/maildrop_tst` near the end of file: .mailfilter...

    In maildrop_tst I have:
    ; ; ; user; domain.com; [email protected]; /var/vmail///.

    I've noticed that in Debian Squeeze "tolower" doesn't work! :/

    mail.log says:
    /usr/bin/maildrop: Unable to open mailbox.

    --

    Workaround for Fedora (and for Debian Squeeze?) is shitful !! And you can't tell now, that this is not bug :)
    DEFAULT="/var/vmail/$HOST/$USER/." is defined before workaroud, and this shouldn't work! Moreover when recipient has uppercase, new mailbox is created!
     
    Last edited: Nov 8, 2009
  9. lenthir

    lenthir New Member

    This is better .mailfilter code:

    Code:
    #
    # Import variables
    #
    
    TEST=tolower("test")
    if($TEST)
    {
      LOGNAME=tolower("$LOGNAME")
      RECIPIENT=tolower("$2")
      USER=tolower("$3")
      HOST=tolower("$4")
    }
    else
    {
      # Workaround for broken tolower function in some current debian/fedora releases
      LOGNAME=`echo $LOGNAME | tr '[:upper:]' '[:lower:]'`
    
      RECIPIENT=$2
      RECIPIENT=`echo $RECIPIENT | tr '[:upper:]' '[:lower:]'`
    
      USER=$3
      USER=`echo $USER | tr '[:upper:]' '[:lower:]'`
    
      HOST=$4
      HOST=`echo $HOST | tr '[:upper:]' '[:lower:]'`
    }
    
    EXTENSION="$1"
    if ( "$EXTENSION" ne "" )
    {
      DELIMITER="+"
    }
    
    SENDER="$5"
    if (!$SENDER)
    {
      SENDER = "<>"
    }
    
    DEFAULT="/var/vmail/$HOST/$USER/."
    
    #
    # Autocreate maildir, if not exist
    #
    (...)
    
    Now everything works, but I've unnecessary SQL query in LOG!

    Code:
    Nov  8 13:12:43 columbo authdaemond: received userid lookup request: vmail
    Nov  8 13:12:43 columbo authdaemond: authmysql: trying this module
    Nov  8 13:12:43 columbo authdaemond: SQL query: SELECT email, password, "", uid, gid, homedir, maildir, quota, "", concat('disableimap=',disableimap,',disablepop3=',disablepop3) FROM mail_user WHERE email = 'vmail'
    Nov  8 13:12:43 columbo authdaemond: zero rows returned
    Nov  8 13:12:43 columbo authdaemond: authmysql: REJECT - try next module
    Nov  8 13:12:43 columbo authdaemond: FAIL, all modules rejected
    Nov  8 13:12:43 columbo postfix/pipe[3326]: 5AB1D2834: to=<[email protected]>, relay=maildrop, delay=15858, delays=15849/9.2/0/0.19, dsn=2.0.0, status=sent (delivered via maildrop service)
    Nov  8 13:12:43 columbo postfix/qmgr[27328]: 5AB1D2834: removed
    
    How to remove SQL query? Is it possible?
     
    Last edited: Nov 8, 2009

Share This Page