"Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft)"

Discussion in 'HOWTO-Related Questions' started by 4integration, Jun 1, 2007.

  1. 4integration

    4integration New Member

    Hello,

    I have tested the howto "Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft)" @ http://www.howtoforge.com/virtual_postfix_mysql_quota_courier_ubuntu_edgy but on my Feisty Fawn.

    Adding domains/users to the mail system is it only necessary to add them to the tables? Does it require changes to the file system as well, in the /home/vmail/?? I think so since I get this in the logs:

    It's not covered in the howto...

    Should I create anything manually?
    What should I create?
    What permissions (group/user) should the files/directories have?
     
  2. falko

    falko Super Moderator ISPConfig Developer

    Yes.

    No.

    Please compare your setup again with the one from the tutorial. Maybe you've made a typo somewhere.
     
  3. fchevitarese

    fchevitarese New Member

    Netstat -tap

    Hello all ... i´m in the same tutorial... all things are getting work but now i have one problem!

    After amavisd instalation, the tutorial ask me to type netstat -tap and it should be show this :

    root@server1:/usr/local/sbin# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 16043/amavisd (mast
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 15794/master
    tcp 0 0 localhost.localdo:mysql *:* LISTEN 4783/mysqld
    tcp 0 0 *:smtp *:* LISTEN 15794/master
    tcp6 0 0 *:imaps *:* LISTEN 13452/couriertcpd
    tcp6 0 0 *:pop3s *:* LISTEN 13517/couriertcpd
    tcp6 0 0 *:pop3 *:* LISTEN 13480/couriertcpd
    tcp6 0 0 *:imap2 *:* LISTEN 13412/couriertcpd
    tcp6 0 0 *:www *:* LISTEN 4489/apache2
    tcp6 0 0 *:ssh *:* LISTEN 3193/sshd


    the thing that i have marked whit red is my problem... This sh.... is not showed when i type the command!

    I have already done all the things again... but the problem persists!

    Can anyone help me?
    What i have to do?!

    Thanks!!!

    :confused:
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Did you modify /etc/postfix/master.cf as shown in the tutorial? Did you restart Postfix?
     
  5. 4integration

    4integration New Member

    I have compared the installation with the tutorial but can not find anything strange.
    What configuration handles the creation of the mailbox directory?

    I created the directory /home/vmail/mydomain.com/testuser (owned by vmail user).

    Then when I connect the mail client it creates the .Trash folder:
    drwx------ 6 vmail vmail 4096 2007-06-22 11:15 .Trash
    and the client (Thunderbird) says:
    "The current command did not succeed: The mail server responded: Unable to open this mailbox"

    Any idea?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    ls -la /home/vmail/mydomain.com/testuser

    and

    ls -la /home/vmail/mydomain.com/
     
  7. 4integration

    4integration New Member

    sh-3.2$ ls -al /home/vmail/mydomain.com/
    total 12
    drwxr-xr-x 3 vmail vmail 4096 2007-06-22 11:15 .
    drwxr-xr-x 3 vmail vmail 4096 2007-06-22 11:14 ..
    drwxr-xr-x 3 vmail vmail 4096 2007-06-22 11:15 testuser

    sh-3.2$ ls -al /home/vmail/mydomain.com/testuser/
    total 12
    drwxr-xr-x 3 vmail vmail 4096 2007-06-22 11:15 .
    drwxr-xr-x 3 vmail vmail 4096 2007-06-22 11:15 ..
    drwx------ 6 vmail vmail 4096 2007-06-22 11:15 .Trash

    Also worth to mention is that this installation is running in a VMWare Workstation with KUbuntu Feisty Fawn (updated) with internal IP 192.168.1.10 for evaulation. The "production" mail server runs on 192.168.1.2 and mail ports are forwarded from the firewall to 192.168.1.2.

    The mail accounts for test are configured to use 192.168.1.10 and not mail.mydomain.com which the real accounts are using.
     
  8. falko

    falko Super Moderator ISPConfig Developer

    The permissions look ok... :confused:
     
  9. 4integration

    4integration New Member

    Shouldn't the file /etc/postfix/main.cf be one of the key files here?
    When are Postfix notitfied to create the mailbox, when the domain/user are inserted into the DB postfix are not aware so I assume that it should be created at the first login try, right?

    EDIT: Sorry it should of course be one of the Courier files such as /etc/courier/authmysqlrc
     
    Last edited: Jun 24, 2007
  10. 4integration

    4integration New Member

    Sorry, but I have to admit one thing. I have left out one step "3 Apply The Quota Patch To Postfix".
    Falko: Do you think that this could cause my problem?

    Which creates the mail dirs, Postfix or Courier?
     
  11. 4integration

    4integration New Member

    Hi,

    Some good news from my labs..
    I installed the quota patch according to http://www.howtoforge.com/virtual_users_and_domains_with_postfix_debian_etch (due to matching versions)

    Then I also compared the configuration and found some differences on Saslauthd so I updated the configuration and now things are happening.
    http://www.howtoforge.com/virtual_users_and_domains_with_postfix_debian_etch_p3

    I will test things out...

    One thing I noticed very quickly was the structure used in Thunderbird...
    Code:
    <account>
      + Inbox
        + Draft
        + Sent
        + Trash
    I would like it to be ...
    Code:
    <account>
      + Inbox
      + Draft
      + Sent
      + Trash
    How can I control that?
     
  12. jimflip

    jimflip New Member

    I am also getting a very similar problem.

    Basically it's not creating the user directory in /home/vmail/mydomain.com

    Should this be done by saslauthd?

    My /etc/default/saslauthd file was incorrect at first, I have now adjusted this but still the problem persists.

    Any help would be very useful.

    Thanks,
    Jim.
     
  13. jimflip

    jimflip New Member

    Actually my /etc/default/saslauthd file was correct.

    Don't help me though :(
     
  14. jimflip

    jimflip New Member

    Actually my /etc/default/saslauthd file was correct.

    Don't help me though :(
     
  15. jimflip

    jimflip New Member

    Found the solution:

    You need to send an email to the user before the user can login. The maildir isn't created until an email is sent to that user.

    Jim.
     
  16. 4integration

    4integration New Member

    Yes, I found that too ...after a lot of testing :)

    Maybe it's possible to have a script that insert the user (+ ev. domain) and then sends a welcome email...to overcome this.

    Falko: Any input on this?
     
  17. fowie

    fowie New Member

    Maildirs never created...

    This thread sounds like the same problem I'm having. First off my maildirs in /var/vmail are not being created? Which file would cause that? Second, you mentioned having to send an email to the user, do I need to do that locally on the server, or will any email directed to the [email protected] work?

    Third, and slightly more complex,
    I was originally using postfix and dovecot and had a user already set up on the server. I removed dovecot and installed courier & followed the tutorial step by step. When I send an email to myuser it gets sent to /var/mail/myuser instead of being put into the /home/vmail/mydomain.com/myuser folder where I believe it should go? When I connect via imap I still see the messages I received before I set up courier, but the new messages I send don't show up?

    Fourth, and again slightly more complex,
    I was using squirrelmail with dovecot and postfix, now after this install I get:
    ERROR: Connection dropped by IMAP server. when I log in (if I log in with an incorrect user I get the expected "Username/Password invalid" message, so I know it's authenticating with the DB.

    Any help would be appreciated. I enjoyed the tutorial though, good job.
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Any email will work.

    What's in /etc/postfix/main.cf?

    Any errors in your mail log and auth log? What's the output of
    Code:
    netstat -tap
    ?
     
  19. fowie

    fowie New Member

    All better now

    So a slight recommendation. On the first page you talk about applying the "quota" patch to postfix. Since I didn't want quotas I didn't originally install the patch, hence nothing worked correctly. My guess is that the patch does more than just patch quotas?

    That problem with sending to the old mail folders was because dovecot wasn't completely removed (got rid of dovecot, missed dovecot-common).

    The squirrelmail problem was also with the folders not being created (which are created automatically now, thank you), once the folders were created correctly squirrelmail works great. Thanks for the tutorial, works like a charm!
     
  20. fowie

    fowie New Member

    Maybe it's not all better...

    My system seems to be working, but it looks as if I'm only receiving emails that are sent locally, none from remote hosts. (I.e. only if I use the sendmail command from the command line). It would appear that my emails sent using any other system just disappear into the big void.

    Also, I've noticed that I used to get emails about the status of a few custom cron jobs I had running. Now I don't receive those. When I log in I still get a notification that I have new mail in /var/mail/fowie and when I less that file I see the new message, but that message never shows up in my inbox via my mail client or via squirrelmail. My /etc/aliases is pointing to my fowie@[I]domain.com[/I] account, so I'm not sure why mail is still getting stuck in there? Any why can't I receive mail from outside email sources?

    netstat -tap returns:
    Code:
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name   
    tcp        0      0 localhost:10024         *:*                     LISTEN     17987/amavisd (mast 
    tcp        0      0 localhost:10025         *:*                     LISTEN     18155/master        
    tcp        0      0 localhost:57417         *:*                     LISTEN     5200/hpiod          
    tcp        0      0 localhost:mysql         *:*                     LISTEN     5935/mysqld         
    tcp        0      0 localhost:ipp           *:*                     LISTEN     20813/cupsd         
    tcp        0      0 *:smtp                  *:*                     LISTEN     18155/master        
    tcp        0      0 localhost:40316         *:*                     LISTEN     5209/python         
    tcp        0      0 localhost:53586         localhost:57417         ESTABLISHED5209/python         
    tcp        0      0 localhost:57417         localhost:53586         ESTABLISHED5200/hpiod          
    tcp6       0      0 *:imaps                 *:*                     LISTEN     8838/couriertcpd    
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     8733/couriertcpd    
    tcp6       0      0 *:pop3                  *:*                     LISTEN     16831/couriertcpd   
    tcp6       0      0 *:imap2                 *:*                     LISTEN     16807/couriertcpd   
    tcp6       0      0 *:www                   *:*                     LISTEN     2895/apache2        
    tcp6       0      0 *:ssh                   *:*                     LISTEN     6075/sshd
    
     
    Last edited: Sep 13, 2007

Share This Page