Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail

Discussion in 'HOWTO-Related Questions' started by garther, Jul 24, 2008.

  1. garther

    garther New Member

    Hi, I've been setting a mail server with this tutorial.

    I've had some problems but overall it started to work :)

    I've got one small advice:

    when doing :
    postconf -e 'mydestination = server1.example.com, localhost, localhost.localdomain'

    you shouldn't place here the domain because it will be stored indatabase as virtual one.


    But still I have one problem with squirrelmail. Everything installed and after logging in from website i get: "ERROR: Connection dropped by IMAP server."
    But in log i get:

    Jul 24 10:27:29 best authdaemond: received auth request, service=imap, authtype=login
    Jul 24 10:27:29 best authdaemond: authmysql: trying this module
    Jul 24 10:27:29 best authdaemond: authmysqllib: connected. Versions: header 50051, client 50051, server 50051
    Jul 24 10:27:29 best authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = "[email protected]"
    Jul 24 10:27:29 best authdaemond: password matches successfully
    Jul 24 10:27:29 best authdaemond: authmysql: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, address=[email protected], fullname=<null>, maildir=best.media.pl/marcinp/, quota=209715200, options=<null>
    Jul 24 10:27:29 best authdaemond: Authenticated: sysusername=<null>, sysuserid=5000, sysgroupid=5000, homedir=/home/vmail, address=[email protected], fullname=<null>, maildir=best.media.pl/marcinp/, quota=209715200, options=<null>

    So the communication i thionk is ok... what can be the problem?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Did you configure Squirrelmail as shown in the tutorial? Did you configure it to use Courier?
     
  3. garther

    garther New Member

    Ok, i've just solved it now.

    I had wrong permissions to vmail directory... now everything worsk great!

    Thanks for great tutorial :)
     
  4. adrianl

    adrianl New Member

    maildir error

    Hello guys! I'm pretty new to the linux world and I've tried falko's howto:
    http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04
    Everything went smoothly untill logging on to squirrelmail when I get the message:
    ERROR: Connection dropped by IMAP server.

    The mail.log states that there is no such file or directory, I've tried Falko's advice on sending the initial email, but that did not help. One user mentioned editing the permissions on the /home/vmail folder, however he did not state exactly what rights and to whom, so I tried giving everybody read and write rights however to no result.


    If anyone has any ideas please be so kind and a share it. Thanks
     
  5. garther

    garther New Member

  6. adrianl

    adrianl New Member

    Hello Garther

    Thx a lot for the additional info on the permissions, it eventually worked for that specific user([email protected]). However I'm a little bit puzzled, do you have to manually create the maildir folder for every user manually? I've tried creating a new user using phpmyadmin site as stated in the howto however that did not create the folder in /home/vmail/mydomain/.. . I tried sending an initial email however that did not help either. There has to be a method for this folders to be created automatically once u create the user. I mean that would be the elegant way or am I absurd?:)
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Are there any errors in the mail log when you send an email to that account?
     
  8. MrTeaM

    MrTeaM New Member

    Hello guys! I'm having problems in sending the messages, as they do not reach their addressees.

    Can anyone help to indicate the error? this is my mail.log


    Aug 3 08:15:10 mrteam postfix/smtpd[2347]: connect from localhost[127.0.0.1]
    Aug 3 08:15:10 mrteam postfix/smtpd[2347]: CD27372DDA: client=localhost[127.0.0.1]
    Aug 3 08:15:10 mrteam postfix/cleanup[2263]: CD27372DDA: message-id=<[email protected]>
    Aug 3 08:15:10 mrteam postfix/qmgr[2060]: CD27372DDA: from=<[email protected]>, size=1096, nrcpt=1 (queue active)
    Aug 3 08:15:10 mrteam postfix/smtpd[2347]: disconnect from localhost[127.0.0.1]
    Aug 3 08:15:11 mrteam amavis[17348]: (17348-10) Passed CLEAN, LOCAL [192.168.93.1] [192.168.93.1] <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 5GzRYlRUGlvD, Hits: 1.045, size: 614, queued_as: CD27372DDA, 24153 ms
    Aug 3 08:15:11 mrteam postfix/smtp[2264]: B143772DD9: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=25, delays=0.14/0.01/1.2/23, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as CD27372DDA)
    Aug 3 08:15:11 mrteam postfix/qmgr[2060]: B143772DD9: removed

    Aug 3 08:21:18 mrteam postfix/qmgr[2060]: CD27372DDA: from=<[email protected]>, size=1096, nrcpt=1 (queue active)
    Aug 3 08:21:18 mrteam postfix/smtp[2410]: CD27372DDA: to=<[email protected]>, relay=none, delay=368, delays=368/0.12/0.07/0, dsn=5.4.6, status=bounced (mail for mrteam.osxbrazil.com loops back to myself)
    Aug 3 08:21:18 mrteam postfix/cleanup[2412]: E05CE72DDC: message-id=<[email protected]>
    Aug 3 08:21:18 mrteam postfix/qmgr[2060]: E05CE72DDC: from=<>, size=3043, nrcpt=1 (queue active)
    Aug 3 08:21:18 mrteam postfix/bounce[2411]: CD27372DDA: sender non-delivery notification: E05CE72DDC
    Aug 3 08:21:18 mrteam postfix/qmgr[2060]: CD27372DDA: removed
    Aug 3 08:21:18 mrteam postfix/smtp[2410]: E05CE72DDC: to=<[email protected]>, relay=none, delay=0.07, delays=0.07/0/0.01/0, dsn=5.4.6, status=bounced (mail for mrteam.osxbrazil.com loops back to myself)
    Aug 3 08:21:18 mrteam postfix/qmgr[2060]: E05CE72DDC: removed
    Aug 3 08:26:05 mrteam imapd: Connection, ip=[::ffff:127.0.0.1]
     
    Last edited: Aug 3, 2008
  9. falko

    falko Super Moderator ISPConfig Developer

    Please add mrteam.osxbrazil.com to the mydestination line in /etc/postfix/main.cf and restart Postfix.
     
  10. MrTeaM

    MrTeaM New Member


    Hello!
    I did what you asked me.
    still the same problem, the messages did not arrive to their recipients.



    Aug 4 19:07:32 server amavis[4915]: (04915-04) Passed CLEAN, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: 9gKSPrwPdWKq, Hits: 1.449, size: 329, queued_as: 9ACB8E119, 13150 ms
    Aug 4 19:07:32 server postfix/smtp[7191]: 6B2E9E125: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=13, delays=0.1/0.01/0.02/13, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 9ACB8E119)
    Aug 4 19:07:32 server postfix/trivial-rewrite[7203]: warning: do not list domain mrteam.osxbrazil.com in BOTH mydestination and virtual_mailbox_domains
    Aug 4 19:07:32 server postfix/qmgr[7167]: 6B2E9E125: removed
     
  11. yelles

    yelles New Member

    I have the same problem as this user had. But i do not know what you does mean when u say "chown all forlders to vmail user." What should i write in the terminal as example.com as exapmle.

    Best regards.
     
  12. falko

    falko Super Moderator ISPConfig Developer

  13. falko

    falko Super Moderator ISPConfig Developer

    Try this:
    Code:
    chown -R vmail /home/vmail
     
  14. yelles

    yelles New Member

    Hmm still got:

    ERROR: Connection dropped by IMAP server.

    Do I need to restart something before it works?
    Perhaps i do need open some ports in my router?

    Else, someone know where i can find my logfile?

    Best regards :D
     
  15. nickc

    nickc New Member

    Cant login to Squirrel mail

    Hi Guys

    I really hope someone out there can help me see the wood for the trees. I have not followed these instructions to a t, mainly as im not interested in quotas. the rest is pretty much the same. Either way, hopefully i can provide you with enough info to fix this headache.

    This has been getting to me all night, i have reinstalled, -purge removed, removed, installed and eveything else i can imagine and still it never lets me login.

    It just wont let me log in via squirell mail. Mail is being dumped in the right directories. I just cant access it. I have full loggin on and what you see below is all I get in my mail log when trying to log in.

    I ave read through the entire thread and many other websites and none have a fix, hence my asking on here.

    Many thanks in advance.

    My mail.log out put when i try and login

    Aug 5 23:20:51 xxxxxx imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 5 23:20:51 xxxxxx imapd: LOGIN FAILED, user=[email protected], ip=[::ffff:127.0.0.1]
    Aug 5 23:20:56 xxxxxx imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=57, sent=332
     
    Last edited: Aug 6, 2008
  16. falko

    falko Super Moderator ISPConfig Developer

    Did you configure Squirrelmail for the right IMAP/POP3 server?
    The logs are in the /var/log directory.
     
  17. BrendanP

    BrendanP New Member

    I'm having this problem too.

    As well as squirrelmail giving that message, when I try to use pop3 I get this message:
    Code:
    -ERR chdir mydomain.com/username failed
    Connection closed by foreign host
    And this in my logs:
    Code:
    Aug  7 00:28:55 mydomain pop3d: chdir mydomain/username: No such file or directory
    The directories are there and has the appropriate permissions.
     
  18. yelles

    yelles New Member


    Hmm i think so... Else where can I change this?
     
  19. BrendanP

    BrendanP New Member

    I seemed to have fixed it, by telling it to use /home/vmail/domain.com/user (I was trying to use a different location).

    Don't see how it matters if the permissions were right, but hey if it works I'm happy!
     
  20. yelles

    yelles New Member

    I have now checked the log and it says:

    Aug 7 18:09:45 Inleed-S1 imapd: Connection, ip=[::ffff:127.0.0.1]
    Aug 7 18:09:45 Inleed-S1 imapd: authdaemon: s_connect() failed: Connection refused
    Aug 7 18:09:45 Inleed-S1 imapd: [Hint: perhaps authdaemond is not running?]
    Aug 7 18:09:45 Inleed-S1 imapd: LOGIN FAILED, user=[email protected], ip=[::ffff:127.0.0.1]
    Aug 7 18:09:45 Inleed-S1 imapd: authentication error: Connection refused
    Aug 7 18:09:49 Inleed-S1 postfix/local[31345]: fatal: open /etc/postfix/mysql-aliases.cf: No such file or directory

    What should mysql-aliases.cf contain?
     

Share This Page