Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10)

Discussion in 'HOWTO-Related Questions' started by flying_horse, Dec 20, 2009.

Thread Status:
Not open for further replies.
  1. flying_horse

    flying_horse New Member

    Hi there,

    i'm still trying to get the system to work, but it still failed.

    If i sent an email from e.g. root to sales:

    mailx sales

    i get this inside the logs: status=bounced (unknown user: "sales")

    Dec 20 17:42:07 horse amavis[1054]: (01054-03) Passed CLEAN, <[email protected]> -> <[email protected]>, Message-ID: <[email protected]>, mail_id: dLpP7Cllx1MA, Hits: 1.545, size: 336, queued_as: 0432C24F5E, 1611 ms
    Dec 20 17:42:07 horse postfix/smtp[2067]: 6281E25496: to=<[email protected]>, relay=[]:10024, delay=1.8, delays=0.11/0.01/0.01/1.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=01054-03, from MTA([]:10025): 250 2.0.0 Ok: queued as 0432C24F5E)
    Dec 20 17:42:07 horse postfix/qmgr[1682]: 6281E25496: removed
    Dec 20 17:42:07 horse postfix/local[2071]: 0432C24F5E: to=<[email protected]>, relay=local, delay=0.11, delays=0.04/0.03/0/0.04, dsn=5.1.1, status=bounced (unknown user: "sales")

    telnet 25
    Works fine.

    If i sent an mail to a local user:

    mailx flying

    all mails for the local user went into /var/spool/mail/

    Do i need to configure something for them in mysql ?
    What do i need to do if i add new users in mysql mail user table ?
    Do i need to change the aliases file ?

    Thanks for your help
    Flying Horse
  2. falko

    falko Super Moderator ISPConfig Developer

  3. flying_horse

    flying_horse New Member

    Thanks falko for your post,but i still got the same error.

    I redid the whole procedure and reinstalled everything and it looks ok right now.

    But i still have some question about the local users and the users inside MYSQL.

    1.) Do i need to create for each local user an entry inside MYSQL so that they receive mails as well ?

    2.) would it be possible to get the BIND9 configuration for your TUTORIAL, because i guess that the will be defined in BIND, so an example config would be nice.Is it maybe required to configure BIND for mail for this scenario ?

    3.) How can i add an other domain, like i've got


    I've added these two domains into

    mydestination =,,,, localhost, localhost.localdomain'

    and into domains tbl. The users tbl contain

    a) [email protected]
    b) [email protected]

    The transport table is empty,but i get the following error if i sent an email to [email protected]:

    a) warning: do not list domain in BOTH mydestination and virtual_mailbox_domains
    b) status=bounced (unknown user: "sales")

    If i sent an email to [email protected] it is successful.

    If i add into transport tbl --> domain: transport: i get this error:

    a) status=bounced (mail for loops back to myself)

    Thanks a lot for all answers, btw i do not use QUOTA and not ISPconfig.

    I wish everyone some nice christmas days and good start into 2010

    Flying Horse ;)
    Last edited: Dec 22, 2009
  4. falko

    falko Super Moderator ISPConfig Developer

    No, don't add local users and their domains to the MySQL database. The database must contain only virtual users and only the domains that the virtual users use. The domains that are used by local users must be in mydestination, not in the database.

    You must configure the DNS records on the authoritative DNS servers for your domain (most likely they are run by your domain registrar). You can find them out by running
    dig ns
    If you use and for virtual users, then you must remove them from mydestination. They must be in the database.
  5. flying_horse

    flying_horse New Member

    Thanks for your answers.

    There is still one problem left, if i want to access the mail via SQUIRRELMAIL. I'm only able to get into SM for the virtual users.

    Any idea ?

  6. flying_horse

    flying_horse New Member

    Found the solution:

    Need to change in /etc/courier/authdaemonrc the following line:
    authmodulelist="authpam authmysql"
    You need to add into vi /etc/postfix/
    home_mailbox = Maildir/
    Thread can be closed :D
Thread Status:
Not open for further replies.

Share This Page