Description of problem: Hello, IMHO, the postfix documentation should provide a standard, FHS-compliant place on the filesystem to put the virtual user mailboxes (mbox *or* Maildir). Please see http://www.postfix.org/VIRTUAL_README.html#virtual_mailbox: I mean the value for the virtual_mailbox_base parameter (and subdirectories for it). This should be default option in the main.cf file provided in distro. The FHS standard v2.3, paragraph 5.11 states that /var/mail is the default place, but explicitly says that "user mailboxes files in this location must be stored in the standard UNIX mailbox format". IMHO, it is unclear if this excludes only proprietary mailbox formats or Maildir as well. Given the fact that the distro is now SELinux-enabled by default and dovecot is the default IMAP server, the proposed directory should meet other requirements too: - dovecot (or other imap servers) must be able to pick-up messages from there (permissions related matters); - it should not matter if the virtual mailboxes share the same UID/GID for all users or if these are different; - documentation should explictly say which preconfigured system user/group will own the virtual mailboxes, in case it's a common one; - spamassassin, amavisd-new, pyzor, clamav and other programs that eventually need to access that directory should be able to do it; - the configuration should work when SELinux is in enforcing mode, with an unmodified (default) SELinux policy. Regards, Razvan Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Postfix documentation only sugest a place for virtual user mailboxes. In a SELinux-enabled environment, there are often interoperability problems between the various components involved in an e-mail system, requiring various permissions hacks or disabling SELinux. Expected results: A FHS-compliant place for those mailboxes should be provided and suggested both in documentation and in Postfix's default main.cf. Postfix documentation should agree on this with POP3 server's documentation. SELinux default policy should take into account the proposed usage for this directory, allowing the various programs to acces it apropriately. A preconfigured system user/group should exist as a common owner for the virtual mailboxes, if administrator wants to use a common one. The docs should explicitly indicate this preconfigured system user in an RH-compliant distro. Additional info:
Reassigning to the postfix maintainer in the Fedora Core component. Postfix documentation comes from upstream with the rest of the source, so it is not anything Fedora Documentation has control over. I don't know anything about the technical feasibility of this proposal, but I do know that a patch accompanying the suggestion should help acceptance from the Postfix team.
Seems that reassigning to the component didn't reassign to that component owner; fixed by assigning to twoerner.
Hello, Are there any news about this ? Răzvan
Changing severity to 'medium', because this issue doesn't full-fill the 'high' definition, that is defined as: > Problem due to crashes, loss of data, severe memory, leak, etc. Cloning to RHEL-6.
RHEL-6 clone: Bug 734176
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux.
For postfix any directory under /var/mail works even with selinux in enforcing mode. Also there are more complex configurations possible - e.g. mapping of virtual users to more than one system user (in this case the preset user wouldn't help). I would like to follow upstream and I wouldn't like to enforce anything in default configuration (especially during the RHEL-5 lifecycle). Probably better to only provide example configuration in RH documentation, e.g. for postfix: General config: # groupadd -g 5000 vmail # useradd -u 5000 -g vmail -M vmail # mkdir -p /var/mail/virtual/example.com # chown -R vmail:vmail /var/mail/virtual Postfix config: # postconf -e virtual_mailbox_domains=example.com # postconf -e virtual_mailbox_base=/var/spool/mail/virtual # postconf -e virtual_mailbox_maps=hash:/etc/postfix/virtual_mailbox # postconf -e virtual_minimum_uid=100 # postconf -e virtual_uid_maps=static:5000 # postconf -e virtual_gid_maps=static:5000 # postconf -e virtual_alias_maps=hash:/etc/postfix/virtual # echo 'postmaster postmaster' > /etc/postfix/virtual # postmap hash:/etc/postfix/virtual Addition of users user1, user2: # echo 'user1 example.com/user1' > /etc/postfix/virtual_mailbox # echo 'user2 example.com/user2' >> /etc/postfix/virtual_mailbox # postmap hash:/etc/postfix/virtual_mailbox # service postfix reload For dovecot compatible example should be added.
According to review of current RHEL-5 deployment guide I would prefer documenting in Knowledge base.
Adding SMTP SASL config example (using Dovecot SASL) to have complete example. SMTP SASL config: # postconf -e smtpd_sasl_type=dovecot # postconf -e smtpd_sasl_path=private/auth # postconf -e smtpd_sasl_auth_enable=yes # postconf -e broken_sasl_auth_clients=yes # Enable broken clients # postconf -e smtpd_sasl_security_options=noanonymous # Disable anonymous # postcond -e smtpd_recipient_restrictions="permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated, reject_unauth_destination" # Enable relay for SASL authenticated TLS config (optional): # postconf -e smtpd_tls_security_level=may # postcond -e smtpd_tls_key_file=/etc/pki/tls/private/mail.example.com.key # postconf -e smtpd_tls_cert_file=/etc/pki/tls/certs/mail.example.com.crt # postconf -e smtpd_tls_CAfile=/etc/pki/tls/certs/ca-bundle.crt # postconf -e smtpd_tls_auth_only=yes # Enable SASL only over TLS (more secure)
(In reply to comment #14) s/postcond/postconf/
Dovecot's simple configuration for virtual users: # environment mkdir /home/virtual chown vmail:vmail /home/virtual # in /etc/dovecot.conf, set: mail_location = mbox:~/mail:INBOX=/var/mail/virtual/%d/%n auth_realms = "example.com" auth_default_realm = "example.com" # and change whole auth default { ... } section to: auth default { mechanisms = plain login passdb passwd-file { args = /etc/dovecot.passdb } userdb static { args = uid=vmail gid=vmail home=/home/virtual/%d/%n } user = root socket listen { client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } } # create user database touch /etc/dovecot.passdb chmod 0600 /etc/dovecot.passdb # Addition of users user1, user2: USR=user1; echo "${USR}:$(dovecotpw -u $USR )" >>/etc/dovecot.passdb USR=user2; echo "${USR}:$(dovecotpw -u $USR )" >>/etc/dovecot.passdb # restart dovecot service dovecot restart
As requested, a Knowledgebase page, on how to configure a system to manage multiple virtual mailboxes using Postfix and Dovecot, has been created. Page location: https://access.redhat.com/knowledge/articles/209683
Since this is no longer about the Deployment Guide, I am closing this bug as WONTFIX.