Results 1 to 15 of 15

Thread: user can send mail but receives none

  1. #1
    Join Date
    Mar 2009
    Posts
    9

    user can send mail but receives none

    Hi

    This is a fresh install of DA on a new server that I'm migrating accounts to from an old server. I encountered this problem on the first user that I've tried migrating.

    I've amended zone file for the domain to direct mail traffic to the new server. The output of dig mx indicates that the mail exchange instruction has updated to point to the new server.

    I've created users email accounts on the new server with the control panel.

    I can log into one of the newly created accounts through SquirrelMail and Roundcube on the new server, but cannot log into Uebimaiu.

    Mail sent from webmail to another domain produces a mail in the sent mail folder and a mail is delivered to the destination.

    Mail sent from webmail to another account at the same domain is not delivered but does not bounce.

    Mail sent to the new account is never delivered but does not bounce.

    I have checked through the FAQ and followed

    http://help.directadmin.com/?topic=5

    which all checks out, except that the virtual pop3 boxes do not exist in /var/spool/virtual, which contains no files at all

    I can telnet into the host server on ports 110 and 143, both of which indicate that Dovecot is running

    The Direct Admin control panel seems to indicate realistic looking email usage for the mail accounts, but I cannot see the actual mails.

    I'm guessing I've missed a step or switch somewhere, and would appreciate help getting mail in and out of accounts on the new server.

    Thanks

  2. #2
    Join Date
    Aug 2008
    Posts
    4,697
    You probably didnt convert to dovecot properly.

    Dovecot does not use /var/spool it uses /home/username/imap

    http://help.directadmin.com/item.php?id=143

  3. #3
    Join Date
    Mar 2009
    Posts
    9
    Thanks for the response.

    I've checked that dovecot is activated in options.conf

    Code:
    $ grep dovecot /usr/local/directadmin/custombuild/options.conf 
    dovecot=yes
    and ps aux tells me that it's running, showing both dovecot and dovecot-auth processes alongside plenty of imap-login and pop3-login processes.

    In /home/USERNAME/imap/mail I see

    INBOX.Drafts
    INBOX.Sent
    INBOX.spam
    INBOX.Trash

    That account's Maildir directory shows nothing in the cur or tmp subdirectories

    /home/USERNAME/imap/DOMAIN/MAILACCOUNT/Maildir/new contains about twenty emails owned by USERNAME:mail

    Not sure what best to check or do next to cure this.
    Last edited by england; 03-11-2009 at 07:58 AM. Reason: clarified path to new mails

  4. #4
    Join Date
    Mar 2009
    Posts
    9
    I set up Thunderbird with one of the accounts to convince myself that webmail was not a part of the problem. When Thunderbird tried to connect, it told me that it

    Code:
    Failed to connect to mail.DOMAIN
    so I tried again the IP address of the host, authenticating as MAILACCOUNT@DOMAIN with the password set in the control panel

    This time Thunderbird connected and the status bar informed me that 'There are no new messages on the server'.

  5. #5
    Join Date
    Aug 2008
    Posts
    4,697
    cd /usr/local/directadmin/custombuild
    ./build todovecot

  6. #6
    Join Date
    Mar 2009
    Posts
    9
    done

    Code:
    File already exists:	dovecot-1.1.11.tar.gz
    MD5 Checksum on dovecot-1.1.11.tar.gz passed.
    File already exists:	dovecot.boot
    File already exists:	dovecot.boot.freebsd
    File already exists:	dovecot.boot.debian
    File already exists:	dovecot.conf
    File already exists:	exim.conf.dovecot.patch
    MD5 Checksum on exim.conf.dovecot.patch passed.
    Shutting down exim: 
    spamd: no process killed
    Starting exim: 
    Stopping DirectAdmin: [ OK ]
    Starting DirectAdmin: [ OK ]
    
    <snip quota info>
    
    Quotas set
    Converting to dovecot: stop
    done queue
    Restarting dovecot.
    Shutting down dovecot: 
    Starting dovecot: 
    Restarting exim.
    Shutting down exim: 
    spamd: no process killed
    Starting exim: 
    Done.
    The only apparent problem reported was

    Code:
    ./build: line 5882: /etc/init.d/vm-pop3d: Permission denied
    Logging into RoundCube webmail as MAILACCOUNT@DOMAIN, I see no new messages yet

  7. #7
    Join Date
    Mar 2009
    Posts
    9
    In /etc/dovecot.conf, I see

    Code:
    mail_location = mbox:~/mail:INBOX=/var/mail/%u
    which doesn't look like the correct path to mail

    looking at other dovecot.conf files that are on the host shows similar

    Code:
    $ find | grep dovecot.conf
    
    ./usr/local/directadmin/custombuild/configure/dovecot/dovecot.conf
    ./usr/local/directadmin/custombuild/dovecot.conf
    ./etc/dovecot.conf
    
    $ grep mail_location /usr/local/directadmin/custombuild/dovecot.conf
    
    mail_location = maildir:~/Maildir
    
    $ grep mail_location /usr/local/directadmin/custombuild/configure/dovecot/dovecot.conf
    
    mail_location = maildir:~/Maildir
    
    $ grep mail_location /etc/dovecot.conf 
    
    #mail_location = maildir:~/Maildir
    mail_location = mbox:~/mail:INBOX=/var/mail/%u
    Last edited by england; 03-11-2009 at 09:23 AM. Reason: checked in all doveot.conf files rather than just the first

  8. #8
    Join Date
    Aug 2008
    Posts
    4,697
    What version dovecot do you have.

    Check:

    dovecot --version

    It should be 1.1.11

    This is my entire dovecot.conf

    Code:
    ## Dovecot 1.1 configuration file
    
    protocols = imap imaps pop3 pop3s
    
    #ssl_cert_file = /etc/exim.cert
    #ssl_key_file =  /etc/exim.key
    ssl_cert_file = /etc/httpd/conf/ssl.crt/server.crt
    ssl_key_file = /etc/httpd/conf/ssl.key/server.key
    
    
    disable_plaintext_auth = no
    
    ##
    ## Login processes
    ##
    
    #login_chroot = yes
    
    login_user = dovecot
    login_processes_count = 16
    
    login_greeting = Dovecot DA ready.
    
    ##
    ## Mail processes
    ##
    
    verbose_proctitle = yes
    
    first_valid_uid = 500
    last_valid_uid = 0
    
    
    mail_access_groups = mail
    
    #mail_debug = no
    
    #mail_location = maildir:~/Maildir
    mail_location = maildir:~/Maildir
    
    # Like mailbox_check_interval, but used for IDLE command.
    #mailbox_idle_check_interval = 30
    
    # Copy mail to another folders using hard links. This is much faster than
    # actually copying the file. This is problematic only if something modifies
    # the mail in one folder but doesn't want it modified in the others. I don't
    # know any MUA which would modify mail files directly. IMAP protocol also
    # requires that the mails don't change, so it would be problematic in any case.
    # If you care about performance, enable it.
    #maildir_copy_with_hardlinks = no
    
    # umask to use for mail files and directories
    umask = 0007
    
    # Set max. process size in megabytes. Most of the memory goes to mmap()ing
    # files, so it shouldn't harm much even if this limit is set pretty high.
    #mail_process_size = 256
    
    # Log prefix for mail processes. See doc/variables.txt for list of possible
    # variables you can use.
    #mail_log_prefix = "%Us(%u): "
    
    ##
    ## IMAP specific settings
    ##
    
    protocol imap {
    
      # Maximum IMAP command line length in bytes. Some clients generate very long
      # command lines with huge mailboxes, so you may need to raise this if you get
      # "Too long argument" or "IMAP command line too large" errors often.
      #imap_max_line_length = 65536
    
      # Send IMAP capabilities in greeting message. This makes it unnecessary for
      # clients to request it with CAPABILITY command, so it saves one round-trip.
      # Many clients however don't understand it and ask the CAPABILITY anyway.
      #login_greeting_capability = no
    
      # Workarounds for various client bugs:
      #   delay-newmail:
      #     Send EXISTS/RECENT new mail notifications only when replying to NOOP
      #     and CHECK commands. Some clients ignore them otherwise, for example
      #     OSX Mail. Outlook Express breaks more badly though, without this it
      #     may show user "Message no longer in server" errors. Note that OE6 still
      #     breaks even with this workaround if synchronization is set to
      #     "Headers Only".
      #   outlook-idle:
      #     Outlook and Outlook Express never abort IDLE command, so if no mail
      #     arrives in half a hour, Dovecot closes the connection. This is still
      #     fine, except Outlook doesn't connect back so you don't see if new mail
      #     arrives.
      #   netscape-eoh:
      #     Netscape 4.x breaks if message headers don't end with the empty "end of
      #     headers" line. Normally all messages have this, but setting this
      #     workaround makes sure that Netscape never breaks by adding the line if
      #     it doesn't exist. This is done only for FETCH BODY[HEADER.FIELDS..]
      #     commands. Note that RFC says this shouldn't be done.
      #   tb-extra-mailbox-sep:
      #     With mbox storage a mailbox can contain either mails or submailboxes,
      #     but not both. Thunderbird separates these two by forcing server to
      #     accept '/' suffix in mailbox names in subscriptions list.
      #imap_client_workarounds = outlook-idle
    }
    
    ##
    ## POP3 specific settings
    ##
    
    protocol pop3 {
    
      # Don't try to set mails non-recent or seen with POP3 sessions. This is
      # mostly intended to reduce disk I/O. With maildir it doesn't move files
      # from new/ to cur/, with mbox it doesn't write Status-header.
      #pop3_no_flag_updates = no
    
      # Support LAST command which exists in old POP3 specs, but has been removed
      # from new ones. Some clients still wish to use this though. Enabling this
      # makes RSET command clear all \Seen flags from messages.
      #pop3_enable_last = no
    
      # POP3 UIDL format to use. You can use following variables:
      #
      #  %v - Mailbox UIDVALIDITY
      #  %u - Mail UID
      #  %m - MD5 sum of the mailbox headers in hex (mbox only)
      #  %f - filename (maildir only)
      #
      # If you want UIDL compatibility with other POP3 servers, use:
      #  UW's ipop3d         : %08Xv%08Xu
      #  Courier version 0   : %f
      #  Courier version 1   : %u
      #  Courier version 2   : %v-%u
      #  Cyrus (<= 2.1.3)    : %u
      #  Cyrus (>= 2.1.4)    : %v.%u
      #
      # Note that Outlook 2003 seems to have problems with %v.%u format which is
      # Dovecot's default, so if you're building a new server it would be a good
      # idea to change this. %08Xu%08Xv should be pretty fail-safe.
    
      #pop3_uidl_format = %v.%u
      pop3_uidl_format = %08Xu%08Xv
    
      # POP3 logout format string:
      #  %t - number of TOP commands
      #  %T - number of bytes sent to client as a result of TOP command
      #  %r - number of RETR commands
      #  %R - number of bytes sent to client as a result of RETR command
      #  %d - number of deleted messages
      #  %m - number of messages (before deletion)
      #  %s - mailbox size in bytes (before deletion)
      #pop3_logout_format = top=%t/%T, retr=%r/%R, del=%d/%m, size=%s
    
      # Support for dynamically loadable modules.
      #mail_use_modules = no
      #mail_modules = /usr/lib/dovecot/pop3
    
      # Workarounds for various client bugs:
      #   outlook-no-nuls:
      #     Outlook and Outlook Express hang if mails contain NUL characters.
      #     This setting replaces them with 0x80 character.
      #   oe-ns-eoh:
      #     Outlook Express and Netscape Mail breaks if end of headers-line is
      #     missing. This option simply sends it if it's missing.
      #pop3_client_workarounds =
    }
    
    ##
    ## Authentication processes
    ##
    
    # Set max. process size in megabytes.
    #auth_process_size = 256
    
    # Authentication cache size in kilobytes.
    auth_cache_size = 0
    # Time to live in seconds for cached data. After this many seconds a cached
    # record is forced out of cache.
    #auth_cache_ttl = 3600
    
    # List of allowed characters in username. If the user-given username contains
    # a character not listed in here, the login automatically fails. This is just
    # an extra check to make sure user can't exploit any potential quote escaping
    # vulnerabilities with SQL/LDAP databases. If you want to allow all characters,
    # set this value to empty.
    auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@&
    
    # More verbose logging. Useful for figuring out why authentication isn't
    # working.
    auth_verbose = yes
    
    # Even more verbose logging for debugging purposes. Shows for example SQL
    # queries.
    #auth_debug = no
    
    # Maximum number of dovecot-auth worker processes. They're used to execute
    # blocking passdb and userdb queries (eg. MySQL and PAM). They're
    # automatically created and destroyed as needed.
    #auth_worker_max_count = 30
    
    auth default {
      mechanisms = plain
    
      #FreeBSD may require this instead of 'passdb passwd'
      #passdb passwd {
      #}
    
      passdb passwd {
      }
    
      passdb passwd-file {
            args = username_format=%n /etc/virtual/%d/passwd
      }
    
      userdb passwd {
      }
    
      userdb passwd-file {
            args = username_format=%n /etc/virtual/%d/passwd
      }
    
    
      # User to use for the process. This user needs access to only user and
      # password databases, nothing else. Only shadow and pam authentication
      # requires roots, so use something else if possible. Note that passwd
      # authentication with BSDs internally accesses shadow files, which also
      # requires roots. Note that this user is NOT used to access mails.
      # That user is specified by userdb above.
      user = root
    
      # Number of authentication processes to create
      #count = 1
    }

  9. #9
    Join Date
    Mar 2009
    Posts
    9
    Thanks scsi, you have the same mail_location line.

    I'll go through the rest of the conf line by line

    Incidentally, telnet says

    Code:
    telnet localhost 110
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    +OK Dovecot DA ready.
    user MAILACCOUNT@DOMAIN
    +OK
    pass PASSWORD
    +OK Logged in.
    stat
    +OK 0 0
    quit
    +OK Logging out.
    Connection closed by foreign host.

  10. #10
    Join Date
    Mar 2009
    Posts
    9
    diff tells me that the only visible difference between my /etc/dovecot.conf and yours is the mail_location :

    Code:
    $ diff dovecot.from-england.conf dovecot.from-scsi.conf 
    39c39
    < mail_location = mbox:~/mail:INBOX=/var/mail/%u
    ---
    > mail_location = maildir:~/Maildir
    104c104
    <   
    ---
    > 
    120c120
    <   
    ---
    > 
    164c164
    <   #pop3_client_workarounds = 
    ---
    >   #pop3_client_workarounds =
    203c203
    <   #FreeBSD may require this instead of 'passdb shadow'
    ---
    >   #FreeBSD may require this instead of 'passdb passwd'
    207c207
    <   passdb shadow {
    ---
    >   passdb passwd {
    211c211
    < 	args = username_format=%n /etc/virtual/%d/passwd
    ---
    >         args = username_format=%n /etc/virtual/%d/passwd
    218c218
    < 	args = username_format=%n /etc/virtual/%d/passwd
    ---
    >         args = username_format=%n /etc/virtual/%d/passwd
    and sure enough on lines 38 and 39 of mine :

    Code:
    #mail_location = maildir:~/Maildir
    mail_location = mbox:~/mail:INBOX=/var/mail/%u
    Looks like that comment should be on the next line down

  11. #11
    Join Date
    Aug 2008
    Posts
    4,697
    mbox is the old format it should be maildir.

  12. #12
    Join Date
    Mar 2009
    Posts
    9
    Well spotted.

    Do I need to amend

    Code:
    mail_location = mbox:~/mail:INBOX=/var/mail/%u
    to

    Code:
    mail_location = maildir:~/mail:INBOX=/var/mail/%u
    in /etc/dovecot.conf, then restart dovecot ?

    If so, what's the best syntax to restart dovecot ?

    Thanks for all the help, scsi. It's appreciated.

  13. #13
    Join Date
    Aug 2008
    Posts
    4,697
    Just put the line:

    mail_location = maildir:~/Maildir


    None of that inbox stuff.

  14. #14
    Join Date
    Mar 2009
    Posts
    9
    amend made and followed by

    Code:
    /etc/init.d/dovecot restart
    and I'm seeing mail in webmail and thunderbird.

    Big thanks.

  15. #15
    Join Date
    Aug 2008
    Posts
    4,697
    Cool glad to help out.

Similar Threads

  1. how can i send mail when user have over bandthwith
    By solcitoi in forum DirectAdmin General Discussion
    Replies: 4
    Last Post: 04-26-2010, 04:55 AM
  2. User cant send mail to eachother
    By linusanderas in forum E-Mail
    Replies: 2
    Last Post: 03-13-2009, 11:12 AM
  3. how to disable a user send mail?
    By seachen in forum System-Level Technical Discussion
    Replies: 1
    Last Post: 08-16-2008, 06:04 PM
  4. add news user, unable to send e-mail opened
    By miantiao in forum DirectAdmin General Discussion
    Replies: 2
    Last Post: 05-11-2008, 03:54 PM
  5. Send mail when creating new user
    By zabulus in forum E-Mail
    Replies: 2
    Last Post: 02-08-2006, 06:14 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •