Results 1 to 12 of 12
  1. #1
    Joined
    Dec 2003
    Location
    Orlando, FL
    Age
    40
    Posts
    3,062

    Email Help Needed

    So I configured POSTFIX (MTA) on Centos5 to send mail to local mailboxes. Now that POSTFIX is minimally configured, I can send mail fine using the "mail <user>" command in command line only. I then use "mutt" to read the email and reply. So in a nut shell I am able to send and receive emails using POSTFIX fine. Now next in the config line is to set up Dovecot for IMAP / POP. I have never done this before so I tried my best to configure /etc/dovecot.conf. I then configured Thunderbird email client to IMAP / SMTP and I was able to connect to my mailbox and see my email listed in the mailbox but I was unable to send. When I tried to send I got a SMTP connection error to the email server.

    Who should be to blame? Is this a Dovecot config that I need to address or Postfix?
    ./

  2. #2
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Email Help Needed

    Can you please post your config files (or at least the relevent sections/what you changed) for postfix and dovecot.

  3. #3
    Joined
    Dec 2003
    Location
    Orlando, FL
    Age
    40
    Posts
    3,062

    Re: Email Help Needed

    I have the configs but they're too long for me to post here...

    Any suggestions?

    I tried posting them on my website but HTML messes up the format of the config...
    ./

  4. #4
    Joined
    Dec 2000
    Location
    Out there, just read my posts
    Posts
    5,473

    Re: Email Help Needed

    it has been my experience that dovecot can be rather pesky, all that is needed to be changed are the lines for the supported protocols, and the host address to listen on xxx.xxx.xxx.xxx, although for me just * seems to work best.

    make sure your iptables allow for traffic on 143 and 110.

    If you can telnet to the box on either port, then iptables and dovecot are not the problem.

    [root@thebeast etc]# telnet 192.168.1.5 110
    Trying 192.168.1.5...
    Connected to thebeast.comm-net.net (192.168.1.5).
    Escape character is '^]'.
    +OK Dovecot ready.
    ^]
    telnet> quit
    Connection closed.
    [root@thebeast etc]# telnet 192.168.1.5 143
    Trying 192.168.1.5...
    Connected to thebeast.comm-net.net (192.168.1.5).
    Escape character is '^]'.
    * OK Dovecot ready.

    should be what you get.

    -Jackal

  5. #5
    Joined
    Aug 2003
    Location
    Sequim, WA
    Posts
    1,430

    Re: Email Help Needed

    Biostar TA 770/ X2 7850 BE
    AC Freezer 64 Pro
    OCZ Gold 4x1024
    EVGA 9800GTX
    Coolermaster CM-690
    Coolermaster RPP RS-650
    Win7Pro

  6. #6
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Email Help Needed

    Yes, in dovecot you just need to make sure IMAP and/or POP are specified as the protocols you wish to use, and also configure for either mbox or Maildir style mailboxes. Which are you using? Also check your logs for errors at /var/log/maillog

    Here's how I have mine set up:

    Code:
    ## /etc/postfix/main.cf ##
    
    myhostname = hostname.example.com
    mydomain = example.com
    myorigin = $mydomain
    inet_interfaces = all
    mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
    mynetworks = 192.168.0.0/24, 127.0.0.0/8
    relay_domains = 
    home_mailbox = Maildir/
    Code:
    ## /etc/dovecot.conf ##
    
    protocols = pop3
    mail_location = maildir:~/Maildir
    pop3_uidl_format = %08Xu%08Xv
    
    # Uncomment the following line when running on x86_64 kernels
    # login_process_size = 64
    Then set up the mail directories for each user (note I'm using Maildir format):

    Code:
    mkdir /home/myuser/Maildir
    chmod -R 700 /home/myuser/Maildir
    Maildir format is probably recommended over mbox as you intend to use IMAP.

    Restart postfix and dovecot services and you should be good to go.

  7. #7
    Joined
    Dec 2003
    Location
    Orlando, FL
    Age
    40
    Posts
    3,062

    Re: Email Help Needed

    Thanks all. I am attempting to use Maildir style since I like having all their email in each users home directory however I don't know if this matters... I set the mailbox to be ~/mail rather than ~/Maildir. Does that make a difference? I would think not as long as it is specified in the config and I am able to send email and reply just fine using "MUTT"

    Also on the current email server I never had to mkdir ~/mail. When I created a new user which auto creates their /home/<user> directory, all I needed to do was compose that user an email and POSTFIX will then auto create /home/<user>/mail/ which to me means that the maildir style mailbox is working in POSTFIX.

    As for my dovecot info, here is the config file if anyone would like to tell me what I can possible fix.

    http://www.ideorlando.org/pub/
    ./

  8. #8
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Email Help Needed

    If it's set up correctly, you should have 3 dirs in the mail directory... /cur, /new and /tmp. I did manually set up the mail dir in the users /home and set the permissions on it, dovecot then created the 3 subdirectories.

    The only thing I can see is that the preceding white space on your mail_location line in dovecot.conf may be causing the problem??

    Code:
    # See doc/variables.txt for full list. Some examples:
    #
       mail_location = maildir:~/mail
    #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
    #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
    Try removing the white space so it starts at the beginning of the line, then restart services. Otherwise it all looks OK to me.

  9. #9
    Joined
    Dec 2003
    Location
    Orlando, FL
    Age
    40
    Posts
    3,062

    Re: Email Help Needed

    OK - I removed the whitespace and reloaded dovecot and postfix for the hell of it.

    I then looked at the following commented section on my dovecot config and was wondering if I need to specifiy any ports or what...

    Code:
    # Protocols we want to be serving: imap imaps pop3 pop3s
    # If you only want to use dovecot-auth, you can set this to "none".
    protocols = imap imaps pop3 pop3s
    
    # IP or host address where to listen in for connections. It's not currently
    # possible to specify multiple addresses. "*" listens in all IPv4 interfaces.
    # "[::]" listens in all IPv6 interfaces, but may also listen in all IPv4
    # interfaces depending on the operating system.
    #
    # If you want to specify ports for each service, you will need to configure
    # these settings inside the protocol imap/pop3 { ... } section, so you can
    # specify different ports for IMAP/POP3. For example:
    #   protocol imap {
    #     listen = *:10143
    #     ssl_listen = *:10943
    #     ..
    #   }
    #   protocol pop3 {
    #     listen = *:10100
    #     ..
    #   }
    #listen = [::]
    I was told somewhere that I should specific the ports each protocol should use something like the following below:

    protocols = imap imaps pop3 pop3s
    imap_listen = *
    pop3_listen = *
    imaps_listen = *
    pop3s_listen = *

    Above is my work company email server listing in dovecot which works just fine.
    ./

  10. #10
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Email Help Needed

    By default, dovecot should be listening on the standard ports. You can use netstat to confirm:

    Code:
    # netstat -a -n -p | grep dovecot
    tcp        0      0 :::110                      :::*                        LISTEN      2204/dovecot
    unix  2      [ ACC ]     STREAM     LISTENING     6107   2204/dovecot        /var/run/dovecot/dict-server
    unix  2      [ ACC ]     STREAM     LISTENING     6168   2204/dovecot        /var/run/dovecot/auth-worker.2215
    unix  2      [ ACC ]     STREAM     LISTENING     6163   2204/dovecot        /var/run/dovecot/login/default
    unix  3      [ ]         STREAM     CONNECTED     736898 2215/dovecot-auth   /var/run/dovecot/login/default
    unix  3      [ ]         STREAM     CONNECTED     736890 2204/dovecot
    unix  3      [ ]         STREAM     CONNECTED     735734 2215/dovecot-auth   /var/run/dovecot/login/default
    unix  3      [ ]         STREAM     CONNECTED     735726 2204/dovecot
    unix  3      [ ]         STREAM     CONNECTED     727772 2215/dovecot-auth   /var/run/dovecot/login/default
    unix  3      [ ]         STREAM     CONNECTED     727764 2204/dovecot
    unix  3      [ ]         STREAM     CONNECTED     6166   2215/dovecot-auth
    unix  3      [ ]         STREAM     CONNECTED     6165   2204/dovecot
    unix  2      [ ]         DGRAM                    6094   2204/dovecot
    The first line tells me dovecot is listening on port 110, as I only have pop3 running, for both IPv4 and IPv6 interfaces (you can ignore the unix sockets).

  11. #11
    Joined
    Dec 2003
    Location
    Orlando, FL
    Age
    40
    Posts
    3,062

    Re: Email Help Needed

    OK - it works fine now!

    Thanks so much!

    I get email at my fake domain carlos@poo.com!!!
    ./

  12. #12
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Email Help Needed

    Quote Originally Posted by Ned Slider View Post
    The only thing I can see is that the preceding white space on your mail_location line in dovecot.conf may be causing the problem??

    Code:
    # See doc/variables.txt for full list. Some examples:
    #
       mail_location = maildir:~/mail
    #   mail_location = mbox:~/mail:INBOX=/var/mail/%u
    #   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
    Try removing the white space so it starts at the beginning of the line, then restart services. Otherwise it all looks OK to me.
    Checking the postfix documentation, I think this was your problem (or part of it). White space at the beginning of a line causes that line to be treated as a continuation of the previous line which in your case is a commented line.

Posting Permissions

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