HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Developers' Forum (http://www.howtoforge.com/forums/forumdisplay.php?f=33)
-   -   ISPC3 SVN postfix mess? (http://www.howtoforge.com/forums/showthread.php?t=28313)

skeldof 31st October 2008 17:50

ISPC3 SVN postfix mess?
 
I'm not sure if I messed up something during the install of SVN ISPC3 (r490) but the mail delivery is not working correctly.

I admit I modified the config (in the web gui) to use /var/vmail instead of /home/vmail. I created a test Client, Email domain (test2.com) and Email Mailbox test2@test2.com. The folder structure /var/vmail/test2.com/test2/[cur,new,tmp] was created (no Maildir folder?)

When I send a mail locally postfix dumps it into /var/vmail/Maildir mbox file.

I logged in to IMAP using Thunderbird and was met with an empty Inbox. Deleted folder was displayed as a subfolder of Inbox.

Courier had created the folder courierimapkeywords and files courierimapsubscribed and courierimapuiddb, within /var/vmail/test2.com/test2/

I'm used to working with exim4 and dovecot, so have no idea where to start debugging why postfix (or maildrop, or however it all fits together) doesn't deliver to the correct place or why .Trash appears as a subfolder to Inbox.

till 31st October 2008 21:51

It is possible that /var/maildir is not working correctly. I recommend to iuninstall ISPConfig 3 and reinstall it withour modifying this setting.

skeldof 3rd November 2008 14:29

Sorry that's not really a solution. Something about the postfix settings is hardcoded, or not reading the database correctly when the mail folder is not in /home/vmail/...

I did the same change on the 3.0.0.7 vmware that's linked in downloads: Change /home/vmail/[domain]/[localpart]/ to /var/vmail/[domain]/[localpart]/. The folder structure is created correctly but all mails end up in a /var/vmail/Maildir file.

till 3rd November 2008 14:35

Changing the folder is not supporetd yet as it is hardcoded in some scripts, thats why I told you to not change it. I will remove it from the settings.

skeldof 4th November 2008 13:57

I finally got the delivery working correctly. The key problem was .mailfilter file I hadn't spotted in /home/vmail/.

To anyone else (daft enough) wishing to move the Maildir folders:
If you haven't installed yet:
  • Edit $ISPCONFIG/install/dist/conf/$YOURDISTRO.conf.php. Change $conf['postfix']['vmail_mailbox_base'] = '/home/vmail'; to point to where your mail will go.
  • Install ISPConfig3.
  • Edit the server's config to use the new mail path: System -> Server config -> $SERVER -> Mail. Update "Maildir Path" and "Homedir Path". (if till hasn't removed the option yet ;))

If you have installed ISPConfig it's all a little messier:
  • I highly recommend not doing this if you have any mail users active in ISPConfig. Otherwise it'll involve lots of manual SQL updating in the mail_user table.
  • Move (or copy with "cp -a") /home/vmail to the new location.
  • Update /etc/passwd and change vmail's home to the new location.
  • Edit /etc/postfix/main.cf and change "virtual_mailbox_base" option to new location.
  • Edit newlocation/.mailfilter file. Change any reference of /home/vmail to the new location.
  • Edit the server's config to use the new mail path: System -> Server config -> $SERVER -> Mail. Update "Maildir Path" and "Homedir Path". (if till hasn't removed the option yet ;))
  • Update any current virtual mail users if you're crazy enough to ignore the warning
  • Restart postfix

quentusrex 4th November 2008 15:05

Is this ready to be installed as a question during the install? "Where do you want the vmail folder?" Because having it in the var folder would really help with hosting. This way only the /var/ folder could be mounted to a different drive and would make backing up the servers much easier.

skeldof 4th November 2008 16:39

Almost. The problem is the static variable in the SQL. This is hard coded in install/tpl/server.ini.master which is simply inserted into the database (with safety quoting) during the install. This variable is what ISPConfig3 uses to generate the maildir location for a new mailbox.

quentusrex 4th November 2008 16:48

Then that isn't much of a problem. If we know where the static variable is, then it can be changed during install. It actually makes it easier if there is only one location with the variable. Because then it becomes a matter of setting that static variable during install.


All times are GMT +2. The time now is 01:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.