Maildrop problem

Discussion in 'Installation/Configuration' started by gring, Jun 16, 2009.

  1. gring

    gring Member

    Hi,

    I tried to reinstall ispconfig with courier, and now I can't receive mails. Imap authentification works, but when I check in /var/log/mail.log, I get this:

    Code:
    Jun 16 19:33:42 hostname postfix/pipe[1807]: 9EC7169CC: to=<[email protected]>, relay=maildrop, delay=2398, delays=2398/0.04/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/bin/maildrop: Unable to change to home directory. )
    
    What am I missing? The Maildir directories exist and have the good owner (vmail:vmail) and rights.
    Thx
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please install your server exactly as described in the ispconfig 3 perfect setup guide for your linux distribution.
     
  3. gring

    gring Member

    I Did.

    I reinstalled again, it seems the bug occurs when using ispconfig's system->serverconfig->mail panel to change directories (changed /var/vmail to /home/vmail, as it is on a different partition).
    The imap server reads the files from the new location, but it seems maildrop still wants to put them in /var/vmail

    I tried to change vmail user's home directory, but it doesn't work...
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The setting for the mail directory can not be changed, this is not supported. You will have to change it back.
     
  5. gring

    gring Member

    I don't have room on the system partition, what should I do then? And why is the mail folder editable in ispconfig's interface if you can't change it?

    edit: It seems to work now, but when I send mail to mailboxes that doesn't exit, the Maildir folders are created.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Repartition your system.

    No, it will not work properly.
     
  7. gring

    gring Member

    I'd love to, but webservers are not often computers you own and keep in your room :D

    I read maildrop's documentation here, and it is told in the delivery mode section that maildrop will look into vmail user's home directory.

    Now, I'm reading the .mailfilter file created by ispconfig, and it seems it simply creates the maildir if it doesn't exist.

    Which program checks if the user exists? It is Postfix, before giving it to maildrop (but why would Postfix be affected by vmail's directory location ?), or is there an authentification mechanism in maildrop that connects to the database?

    ( also changed /etc/postfix/main.cf virtual_mailbox_base to /home/vmail )
     
    Last edited: Jun 18, 2009
  8. fhawk

    fhawk New Member

    Do you chown the file??

    # chown -R vmail:vmail /home/vmail
     
  9. vikmur

    vikmur New Member

    wouldn't it be simplier to create symlink? like writing
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Postfix will not accept emails for any non existing users in a default ispconfig setup, maybe you changed something there or you configured postfix before you installed ispconfig for a different setup.
     
  11. gring

    gring Member

    I reinstalled all from scratch with the install guide (ubuntu 9.04), and tried it with all the default directories.

    I still have the same problem, it seems postfix doesn't check if a user exists when receiving mail and creates all the maildirs.

    Could it be that postfix doesn't connect to the mysql database? all the /etc/postfix/mysql_virtual_*.cf generated by ispconfig seem correct. How could I see if postfix correctly gets the virtual user data?

    Any ideas?

    thanks
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the content of your main.cf file and also an excerpt of the mail log that shows the receiving process for an existing email account and also for a non existing account that goes trough.
     
  13. gring

    gring Member

    here is the main.cf file:

    Code:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version                                                  
    
    
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.                                            
    #myorigin = /etc/mailname                                      
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no                                           
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no             
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h                                     
    
    readme_directory = /usr/share/doc/postfix
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key  
    smtpd_use_tls = yes                          
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache  
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.                        
    
    myhostname = <hostname>
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = <hostname>, localhost, localhost.localdomain
    relayhost =
    mynetworks = 127.0.0.0/8 [::1]/128
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    html_directory = /usr/share/doc/postfix/html
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = maildrop
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings
    message_size_limit = 0
    
    
    and here is the mail.log :

    Code:
    Jun 18 17:26:31 hostname postfix/smtpd[4143]: connect from localhost.localdomain[127.0.0.1]
    Jun 18 17:26:31 hostname postfix/smtpd[4143]: 188B279D0: client=localhost.localdomain[127.0.0.1]
    Jun 18 17:26:31 hostname postfix/cleanup[4128]: 188B279D0: message-id=<5f0474d6d020080d98142df7ab94b60e@localhost>
    Jun 18 17:26:31 hostname postfix/qmgr[3790]: 188B279D0: from=<[email protected]>, size=892, nrcpt=2 (queue active)
    Jun 18 17:26:31 hostname amavis[4022]: (04022-01) Passed CLEAN, <[email protected]> -> <[email protected]>,<[email protected]>, Message-ID: <5f0474d6d020080d98142df7ab94b60e@localhost>, mail_id: g72-nsxUIF3L, Hits: 0.671, size: 487, queued_as: 188B279D0, 1965 ms
    Jun 18 17:26:31 hostname postfix/smtp[4132]: 13C3E79C9: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=0.08/0.06/0.01/2, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04022-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 188B279D0)
    Jun 18 17:26:31 hostname postfix/smtp[4132]: 13C3E79C9: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=0.08/0.06/0.01/2, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04022-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 188B279D0)
    Jun 18 17:26:31 hostname postfix/qmgr[3790]: 13C3E79C9: removed
    Jun 18 17:26:31 hostname postfix/pipe[3802]: 188B279D0: to=<[email protected]>, relay=maildrop, delay=0.04, delays=0.01/0/0/0.03, dsn=2.0.0, status=sent (delivered via maildrop service)
    Jun 18 17:26:31 hostname postfix/pipe[3835]: 188B279D0: to=<[email protected]>, relay=maildrop, delay=0.04, delays=0.01/0/0/0.03, dsn=2.0.0, status=sent (delivered via maildrop service)
    Jun 18 17:26:31 hostname postfix/qmgr[3790]: 188B279D0: removed
    
    
    The mailbox "alexandre" exists, the the mailbox "test" doesn't
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Is "domain.tld" the same that you masked as <hostname> in the main.cf file or is domain.tld in the /etc/mailname file?
     
  15. gring

    gring Member

    <hostname> is the same than in /etc/hostname and /etc/mailname (it's the main name given to the server by the provider)

    domain.tld is one of the domains hosted on the server with ispconfig.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    And domain.tld is setup in ispconfig only as mailbox domain and not as relay domain?
     
  17. gring

    gring Member

    It's only set as an email domain.
     
  18. Amorphous

    Amorphous New Member

    till: And domain.tld is setup in ispconfig only as mailbox domain and not as relay domain?



    can someone plzz explain the 2 comments ??? relay domain and mailbox domain ??
    i have 2 domains of my own, and the server is named server1.domain1.com

    for this domain -> domain1.com is it possible for not being able to create mail accounts and working ???

    the zone and the subdomains for this domain i have it on ispconfig , and on the same server i got from a friend a subdomain, games.anotherdomain.com ... if i m creating mail accounts for this subdomain, everything works fine, i get the mail , wellcome to your new mail account bla bla bla, the maill account looks like this, [email protected]

    when i m trying to make mail accounts for the domain1.com
    mail accounts like [email protected] are created but not allways, and when they are created i can t receive e mails, i only can send .... the reply on the mail that i am sending from is name account not registered as e-mail account




    and right now i m getting same problem for all of the e-mail accounts allready created

    connection dropped by imap server
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Amorphus. Please make a new thread for your questions.
     
  20. gring

    gring Member

    I've set mysql to logging mode, and it does receive the requests from postfix.
     

Share This Page