Postfix + Courier with mailboxes on external NAS

Discussion in 'HOWTO-Related Questions' started by Sansone, Nov 10, 2010.

  1. Sansone

    Sansone New Member

    Hi everybody,
    I've succesfully installed on Ubuntu 10.10 both Postfix & Courier using virtual users to manage all my intranet emails through IMAP.
    All emails are recorded under my local folder /mnt/mail/....and I have no problem.
    But if I really mount my mail shared folder from my QNAP NAS in the same place then Postfix still works but Courier fails.
    See some lines from /var/log/mail.log:

    Nov 8 13:16:13 main authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/mnt/mail/virtual, [email protected], fullname=sansone, maildir=/mnt/mail/virtual/sansone$
    Nov 8 13:16:13 main imapd: LOGIN, [email protected], ip=[::ffff:], port=[54623], protocol=IMAP
    Nov 8 13:16:13 main imapd: rename(./new/1289056090.V16I90001ba0006M547961.main,./cur/1289056090.V16I90001ba0006M547961.main:2,) failed: No such file or directory

    As you can see the imapd fails the rename from folder New to Cur in spite it's correctly authenticated.

    Any hint ?

    Thanks & regards.
  2. falko

    falko Super Moderator ISPConfig Developer

    I guess this is a permissions problem. Do the folders have the correct permissions and owners?
  3. Sansone

    Sansone New Member

    [Solved] Postfix + Courier with mailboxes on external NAS

    Thanks falko for your interest but no, it wasn't a permission problem.
    I discovered that Maildir standard appends to the filename moved from new to cur folder a string similar to ":2,s"
    So the problem is in the colon used in the filename. In spite the mail server runs inside Ubuntu 10.10 and the share folder belongs to a Linux based NAS (QNAP) if you mount the cifs share without "mapchars" option it doesn't work due to the presence of the colon in the filename.
    With mapchars option enabled, Linux still see the colon in the filename while it's actually recorder inside the NAS with the colon replaced by a Unicode char.

    Now I have to document myself trying to understand if there is the possbility to tell to my mail server to do not use forbidden chars. If I cannot find it I will keep the solution with mapchars enabled


Share This Page