I've followed the instructions of Virtual Mailhosting System with Postfix Guide to set up a postfix mail server. I can send e-mails to my local users (and to other users on the internet as well) but the received e-mails are getting a different permission and in order to view the files on Squirrel I must change the permissions from 0644 to 0664, which means the new mails always are written with the 0644 permission. I'm using this script to add a user to my mailserver:

I second the aforementioned guide, but them I'm a touch biased (actually, I may need to do an updated ebuild for cyrus-2.4.16, but dont have time at the moment)

specific to this:

webbruno wrote:

in order to view the files on Squirrel I must change the permissions from 0644 to 0664, which means the new mails always are written with the 0644 permission.

squirrelmail should be asking your IMAP server to read the mail file, and give it the contents
it should not be trying to read files from the filesystem directly, so unless something is amiss, squirrelmail *should* be permissions-agnostic - if the IMAP/POP server can read the emails, then so too, should squirrelmail be able to read them.

so that's the spot to troubleshoot - first see if you can read the emails just via IMAP. Use telnet to test (list) if necessary, but make sure the IMAP piece is taken care of. Again, the variable here, squirrelmail should be asking IMAP, it should not be querying the filesystem directly.

It may even be as simple as changing the user under which the IMAP/POP daemon runs, to be the same user under which Postfix runs.

This is part of why I found the "official" guide to be a bit cumbersome, and why cyrus with its internal account/mailbox structure ends up being easier to manage long-term._________________Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash

As I use to say: 90% of the problems in the computing world comes from somewhere between the chair (in this case, my own chair)[/b] and the keyboard, this one wasn't different. The error was obvious, I configured postfix to accept only connections from a specific uid: the vmail uid. The solution was the simplest:

Instead of creating system users I should create users using the mysql database linked with postfix as described in the tutorial