Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail -Ubuntu 8.04

Discussion in 'HOWTO-Related Questions' started by c4rdinal, May 27, 2008.

  1. lombardo

    lombardo New Member

    I've run /etc/init.d/courier-imap restart

    and the service restarted successfully.

    But I still get the connection dropped error.
     
    Last edited: Jun 3, 2008
  2. HostV

    HostV New Member

    Very helpful thread, thanks everyone!
     
  3. falko

    falko Super Moderator Howtoforge Staff

    Please try this:
    Code:
    /etc/init.d/courier-authdaemon restart
    /etc/init.d/courier-imap restart
    /etc/init.d/courier-imap-ssl restart
    /etc/init.d/courier-pop restart
    /etc/init.d/courier-pop-ssl restart
     
  4. tonkyman

    tonkyman New Member

    No Mailbox

    **** Sorry!! this was for the error with squirrelmail mentioned earlier. ******
    **** I jumped in a bit late. ******


    You will receive that message if the mail box you are trying to check does not exsist. The mailbox is not created until it receives its first mail message.

    I send a short welcome message to every new user I setup to avoid this issue.

    Good luck,
    Tony
     
    Last edited: Jun 6, 2008
  5. c4rdinal

    c4rdinal New Member

    Hi falko,

    Until now, I was not able to successfully finish this HOWTO. I slowly and carefully redo it for two times but was unsuccessful. I thought by redoing the howto (because I refrain not to ask so much, I know most of you are busy) I can solve the problem. Apparently, I failed.

    I don't understand when you said: "there's something fundamentally wrong with your system". What do you mean by this?

    This is the case on my machine. What should I do to fix it?

    I need my mail server running by next week, yet I'm stuck...

    Please help me.

    Thank you so much.
     
  6. c4rdinal

    c4rdinal New Member

    Hi,

    Since I always find in my /var/log/mail.log

    I tried to manually create the directory.

    #mkdir /home/vmail/domain.com/joseph
    #chown vmail.vmail /home/vmail/domain.com/joseph

    Then login to squirrelmail and finally I was able to get in. However, there's this error after logging in.

    I think it's because of the permission on the directory. Mailbox are not being created automatically.

    I know there's a way i can make this manually? I just don't know how.

    I read a post having the same problem here and it was answered by falko. It was suggested to send an email first before logging into squirrelmail. But it doesn't fix my problem. I tried it using different account, yet I failed.

    Hope you can point me to the right track.
     
    Last edited: Jun 14, 2008
  7. falko

    falko Super Moderator Howtoforge Staff

    You can use the maildirmake command instead. See
    Code:
    man maildirmake
    Did you tell Squirrelmail that you're using Courier?
     
  8. c4rdinal

    c4rdinal New Member

    I used the command to create directories:

    mkdir /home/vmail/domain.com
    chmod g-r,o-r /home/vmail/domain.com/user1
    chown -R vmail.vmail /home/vmail/domain.com/user1
    maildirmake /home/vmail/domain.com/user1

    All went fine. Then I log in to Squirrelmail. I send a test message.
    the logs shows

    #tail -f /var/log/mail.log

    Jun 24 16:55:01 mx-1 postfix/smtp[4848]: 260BB343DF: to=<[email protected]>, relay=none, delay=0.02, delays=0.02/0/0/0, dsn=5.4.6, status=bounced (mail for mx-1.domain.com loops back to myself)
    Jun 24 16:55:01 mx-1 postfix/qmgr[4643]: 260BB343DF: removed
    Jun 24 16:55:17 mx-1 postfix/qmgr[4643]: ECD22343E2: from=<[email protected]>, size=1109, nrcpt=2 (queue active)
    Jun 24 16:55:17 mx-1 postfix/smtp[4849]: ECD22343E2: to=<[email protected]>, re lay=c.mx.mail.yahoo.com[216.39.53.3]:25, delay=414, delays=414/0.02/0.02/0.02, d sn=2.0.0, status=sent (250 2.0.0 Ok: queued as D1BD91D4020)
    Jun 24 16:55:17 mx-1 postfix/qmgr[4643]: ECD22343E2: removed
    Jun 24 16:55:56 mx-1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Jun 24 16:55:57 mx-1 imapd: LOGIN, [email protected], ip=[::ffff:127.0. 0.1], port=[41405], protocol=IMAP
    Jun 24 16:55:57 mx-1 imapd: LOGOUT, [email protected], ip=[::ffff:127.0 .0.1], headers=0, body=0, rcvd=119, sent=900, time=0
    Jun 24 16:55:57 mx-1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Jun 24 16:55:57 mx-1 imapd: LOGIN, [email protected], ip=[::ffff:127.0. 0.1], port=[41406], protocol=IMAP
    Jun 24 16:55:57 mx-1 imapd: LOGOUT, [email protected], ip=[::ffff:127.0 .0.1], headers=0, body=0, rcvd=119, sent=900, time=0

    I noticed the error message
    How can I fix it? Also, there's no message in the Inbox of any bounced message. I think the mail is getting somewhere else.

    Yes, I did this.

    ~# ls -la /home/vmail/domain.com/
    total 16
    drwx--x--x 4 vmail vmail 4096 2008-06-24 16:40 .
    drwxr-xr-x 3 vmail vmail 4096 2008-06-24 16:39 ..
    drwx------ 9 vmail vmail 4096 2008-06-24 16:41 user1
    drwx------ 9 vmail vmail 4096 2008-06-24 16:42 user2

    # ls -la /home/vmail/domain.com/user1/
    total 44
    drwx------ 9 vmail vmail 4096 2008-06-24 16:41 .
    drwx--x--x 4 vmail vmail 4096 2008-06-24 16:40 ..
    drwx------ 2 vmail vmail 4096 2008-06-24 16:41 courierimapkeywords
    -rw-r--r-- 1 vmail vmail 36 2008-06-24 16:41 courierimapsubscribed
    -rw-r--r-- 1 vmail vmail 15 2008-06-24 16:41 courierimapuiddb
    drwx------ 2 vmail vmail 4096 2008-06-24 16:40 cur
    drwx------ 6 vmail vmail 4096 2008-06-24 16:41 .Drafts
    drwx------ 2 vmail vmail 4096 2008-06-24 16:40 new
    drwx------ 6 vmail vmail 4096 2008-06-24 16:41 .Sent
    drwx------ 2 vmail vmail 4096 2008-06-24 17:08 tmp
    drwx------ 6 vmail vmail 4096 2008-06-24 16:41 .Trash


    Hope you can help me.

    TIA
     
    Last edited: Jun 23, 2008
  9. wurzel

    wurzel New Member

    I too am having the same problem. I have followed the tutorial step-by-step, but when I try to login to squirrelmail I get a "Connection dropped by IMAP server" error. I'm not quite sure where I've gone wrong.
     
  10. wurzel

    wurzel New Member

    Scratch my last post. Now when I'm logging into Squirrelmail, I get the can't find inbox error.

    Squirrelmail isn't that important to me right now, as long as I can set up access through Microsoft Outlook. I have entered all of the information and clicked Test Account Settings in Outlook. It completes everything except for the test email.
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Please add mx-1.domain.com to mydestination in /etc/postifx/main.cf and restart Postfix.
     
  12. falko

    falko Super Moderator Howtoforge Staff

    Are there any errors in your mail log?
     
  13. c4rdinal

    c4rdinal New Member

    postifx complain that virtual domain and mydestinatination should not be placed all at the same time.
     
  14. falko

    falko Super Moderator Howtoforge Staff

    Are you using mx-1.domain.com in the domains table already? What's in your main.cf?
     
  15. blackjack

    blackjack New Member

    Hi. I have too problem with mailboxes. I not found maildirs in /home/vmail
    log
    Code:
    Jun 27 13:17:57 mail imapd: Connection, ip=[::ffff:127.0.0.1]
    Jun 27 13:17:57 mail imapd: chdir cn.km.ua/blackjack/: No such file or directory
    help me please
     
  16. blackjack

    blackjack New Member

    I am sorry. It was my error. I edit /etc/hosts.
     
  17. metal1633

    metal1633 New Member

    Back again

    And with a similar problem but believe a different cause. I am currently going through the configs to try to see whats up. Problem I can not send and receive.

    After getting the system to work On a test server I install on another. The new server will be used in a production environment. I need it working by Wednesday of this week. Below is the error from the mail log when I tried to send a mail from gmail to a local user.

    Jun 28 13:12:15 hostname postfix/qmgr[20369]: D2AEE1C24E: from=<[email protected]>, size=325, nrcpt=1 (queue active)
    Jun 28 13:12:15 hostname postfix/qmgr[20369]: warning: connect to transport amavis: No such file or directory
    Jun 28 13:12:15 hostname postfix/error[20413]: D2AEE1C24E: to=<[email protected]>, relay=none, delay=2368, delays=2368/0.01/0/0.07, dsn=4.3.0, status=deferred (mail transport unavailable)
    Jun 28 13:27:15 hostname postfix/qmgr[20369]: 1731C1C37D: from=<[email protected]>, size=2050, nrcpt=1 (queue active)
    Jun 28 13:27:15 hostname postfix/qmgr[20369]: warning: connect to transport amavis: No such file or directory
    Jun 28 13:27:15 hostname postfix/qmgr[20369]: 9CEF41C382: from=<[email protected]>, size=323, nrcpt=1 (queue active)
    Jun 28 13:27:15 hostname postfix/error[20420]: 1731C1C37D: to=<[email protected]>, relay=none, delay=50750, delays=50749/0.01/0/0.08, dsn=4.3.0, status=deferred (mail transport unavailable)
    Jun 28 13:27:15 hostname postfix/error[20421]: 9CEF41C382: to=<[email protected]>, relay=none, delay=50861, delays=50861/0.02/0/0.08, dsn=4.3.0, status=deferred (mail transport unavailable)
     
  18. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/main.cf and /etc/postfix/master.cf?
     
  19. metal1633

    metal1633 New Member

    It was the master.cf

    This was missing

    amavis unix - - - - 2 smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes

    Thats what I get for staying up so late doing this stuff. Get tired and sloppy.

    It works fine now. Thanx.
     
  20. Morons

    Morons Member

    me also

    I have installed 3 x systems with this howto and in the depoy process i have deployed 2 and have the same issues.

    lets start with creating the maildrop diectories:
    root@geekscraft:/home# groupadd -g 5000 vmail
    root@geekscraft:/home# useradd -g vmail -u 5000 vmail -d /home/vmail -m
    root@geekscraft:/home# cd vmail/
    root@geekscraft:/home/vmail# tree
    .

    Then you need either this line, with the domain table or you will need
    mydestination = geekscraft,domain,tld in the etc/postfix/main.cf.file
    postconf -e 'virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf'

    To Test:
    Enter username and password in SquirrelMail and this happens!

    Aug 11 15:09:14 geekscraft authdaemond: Authenticated: clearpasswd=SquirrelMail Login=....snuffed...., passwd=....snuffed....
    Aug 11 15:09:14 geekscraft imapd: [email protected]: chdir(/home/vmail) failed!!
    Aug 11 15:09:14 geekscraft imapd: error: Permission denied
    Aug 11 15:09:14 geekscraft imapd: LOGIN FAILED, [email protected], ip=[::ffff:127.0.0.1]
    Aug 11 15:09:14 geekscraft imapd: authentication error: Permission denied
     

Share This Page