Problem with email and CHROOT

Discussion in 'General' started by marchost, Feb 21, 2008.

  1. marchost

    marchost New Member HowtoForge Supporter

    Ok here is the problem. I found solutions to all my problems in howtoforge except this one :

    I installed IPSConfig and I made some mod to make users CHROOT

    When the administrator of a website ssh to his domain his root is
    /var/www/webxxx/

    When users (for this example user123) of that domain ssh to the domain they go to
    /var/www/webxxx/user/webxxx_user123/

    My problem is that for administrator, they receive emails in /var/www/webxxx/user/Maildir/
    which is fine...

    BUT users that are not admin (again with user123 example) receive their mail in
    /var/www/webxxx/user/webxxx_user123/user/webxxx123/Maildir

    Realized that after few hours :(

    I found a workaround by doing
    ln -s /var/www/webxxx/user/webxxx_user123/user/webxxx123/Maildir /var/www/webxxx/user/webxxx_user123/Maildir

    It works but I have to do it each time...

    How can I make it automatic so when a user that is not administrator is created, the link is automatically done? Maybe there is a easier solution?

    Before I get asked, I use dovecot, maildir and postfix. ;)

    Marc
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    1) Did you modify one of the ISPConfig procmail recipes?
    2) Please post the content of the postfix main.cf file, comments stripped.
     
  3. marchost

    marchost New Member HowtoForge Supporter

    1) I dont think I modified that...
    2) here is my main.cf

    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    mail_owner = postfix
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost
    unknown_local_recipient_reject_code = 550
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    debug_peer_level = 2
    debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5

    sendmail_path = /usr/sbin/sendmail.postfix
    newaliases_path = /usr/bin/newaliases.postfix
    mailq_path = /usr/bin/mailq.postfix
    setgid_group = postdrop
    html_directory = no
    manpage_directory = /usr/share/man
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    mynetworks = 127.0.0.0/8
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtpd_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    myhostname = localhost

    #virtual_alias_domains = marchost.net


    virtual_maps = hash:/etc/postfix/virtusertable

    mydestination = /etc/postfix/local-host-names

    transport_maps = hash:/etc/postfix/transport

    relay_domains = hash:/etc/postfix/relay-host-names

    mailman_destination_recipient_limit = 1
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please run these commands:

    postconf -e 'home_mailbox = Maildir/'
    postconf -e 'mailbox_command ='
    /etc/init.d/postfix restart

    and try again.
     

Share This Page