New install - Dovecot deliver -> Amavis (permission denied)

Discussion in 'Installation/Configuration' started by jbd123, Jul 2, 2012.

  1. jbd123

    jbd123 New Member

    Hi there

    I've just installed ISPConfig 3 on a system that had a mail service without a control panel managing mail (bunch of scripts that handled that, history etc).

    Everything with install has gone very well, there was an issue with the uid:gid for vmail but I fixed that easily. Mail is being delivered & sent OK.

    It's an Ubuntu 10.04 LTS setup. Postfix / Dovecot / SA and ClamAV. I followed the instructions for the perfect server setup but prefer Dovecot over Courier.

    One problem, in the mail.err log I can see errors appearing relating to Amavis. I understand that Amavis sits between Postfix /Dovecot and various mail filters.

    The error:
    Jul 1 11:00:02 servername dovecot: deliver(amavis): mkdir(/var/vmail//amavis/Maildir/cur) failed: Permission denied (euid=113(amavis) egid=115(amavis) missing +w perm: /var/vmail/)

    I can see why the permission errors are happening as /var/vmail is owned by vmail and it looks like the user trying to mkdir is amavis. From the look of the logs, the errors happen in multiples of 5 minute blocks to the second but not every 5 minutes.

    My questions are:
    1. Why is the user amavis trying to mkdir within /var/vmail
    2. What's missing in the "/var/vmail//amavis" path - I'm assuming this should be /var/vmail/domain.name/mailbox/amavis/Maildir/cur ? - somewhere along the line the domain and mailbox is being lost.


    Any help would be much appreciated. I'm not in the habit of creating +w permissions so I'd rather find a fix further upstream, espec since part of the path is missing.


    Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if dovecot deliver is running under a wrong username on your setup. Deliver ahs to be run under user vmail and not under user amavis.

    Most likely your master.cf file is wrong and still contains some settings from your old setup. The dovecot deliver line has to be:

    Code:
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
     
  3. jbd123

    jbd123 New Member

    Hi Till

    Thanks, I think the problem was a /etc/spamassassin/local.cf was only readable by root. When I changed this, amavis started behaving better.

    Thanks again.

    James
     

Share This Page