Trouble with postfix

Discussion in 'Installation/Configuration' started by jimbauwens, Mar 28, 2011.

  1. jimbauwens

    jimbauwens New Member

    Hello all,
    I recently followed the "The Perfect Server - Ubuntu 10.04 [ISPConfig 3]" to set up a server.
    Everything went well, just for one thing : postscript doesn't read the mysql database of users, and just uses normal unix users.
    Courier does sees the database, and lets users login with it.

    To put it simple: the mail server works, but it just doesn't use the virtual users.

    Anyone have an idea what the problem could be?

    main.cf : http://pastebin.com/rP2ZrAjm

    Thanks!
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you got any error messages while you installed ispconfig?
    Which error messages do you get in the mail.log file?
     
  3. jimbauwens

    jimbauwens New Member

    Well, to be honest, I don't remember. :(
    I think I would have remembered if there was any, so probably not.

    But here is the thing: since I don't have much set up yet, I could try to reinstall ispconfig.
    Only I don't know how to do that.

    Thanks for taking your time to help me :)

    Edit: There are no errors in mail.log, it just doesn't seem to use the database

    Edit2: This is the content of /etc/postfix:
    Code:
    
    body_checks
    dynamicmaps.cf
    header_checks
    main.cf
    main.cf.bak
    master.cf
    mime_header_checks
    mysql-virtual_client.cf
    mysql-virtual_domains.cf
    mysql-virtual_email2email.cf
    mysql-virtual_forwardings.cf
    mysql-virtual_mailboxes.cf
    mysql-virtual_recipient.cf
    mysql-virtual_relaydomains.cf
    mysql-virtual_relayrecipientmaps.cf
    mysql-virtual_sender.cf
    mysql-virtual_transports.cf
    nested_header_checks
    postfix-files
    postfix-script
    post-install
    sasl
    smtpd.cert
    smtpd.key
    
     
    Last edited: Mar 28, 2011
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Your setup iuses the database according to the myin.cf configuration. Please login to webmail with an account on your server, then send yourself (to the same account that you used for webmail login) a email and post all messages that get added into the mail.log file.

    Additionally, please be aware that you can not use a domain for mailboxes as myhostname. So if your email account is sometjing like ...@bwns.be, it can not work. You have to use a subdomain for the hostname and mailname of a server as explained in the tutorial like server.bwns.be but not bwns.be
     
    Last edited: Mar 28, 2011
  5. jimbauwens

    jimbauwens New Member

    Do you mean that I can't use virtual users when I use bwns.be as my mail domain?
    I can perfectly receive mail (I can see them when I ssh into my server) using this.
    But thats with real users.

    Anyway, here is the stuff you asked:

    I cannot use a normal user account to login with Squirrel Mail.
    It seems to only see the virtual users, but not the real ones.

    Code:
    Mar 28 19:44:05 server imapd: Connection, ip=[::ffff:127.0.0.1]
    Mar 28 19:44:05 server imapd: LOGIN FAILED, user=administrator, ip=[::ffff:127.0.0.1]
    Mar 28 19:44:10 server imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=64, sent=332
    Mar 28 19:44:10 server imapd: Connection, ip=[::ffff:127.0.0.1]
    Mar 28 19:44:10 server imapd: LOGIN FAILED, user=administrator, ip=[::ffff:127.0.0.1]
    Mar 28 19:44:15 server imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=64, sent=332
    Mar 28 19:44:15 server imapd: Connection, ip=[::ffff:127.0.0.1]
    Mar 28 19:44:15 server imapd: LOGIN FAILED, user=administrator, ip=[::ffff:127.0.0.1]
    Mar 28 19:44:20 server imapd: LOGOUT, ip=[::ffff:127.0.0.1], rcvd=64, sent=332
    
    This is similar if I append @bwns.be or @localhost to it.

    If I send an email from my virtual user to a virtual user:
    Code:
    Mar 28 19:58:47 server postfix/smtpd[27492]: connect from localhost[127.0.0.1]
    Mar 28 19:58:47 server postfix/trivial-rewrite[27494]: warning: do not list domain bwns.be in BOTH mydestination and virtual_mailbox_domains
    Mar 28 19:58:47 server postfix/smtpd[27492]: DB3B4400D36: client=localhost[127.0.0.1]
    Mar 28 19:58:47 server postfix/cleanup[27495]: DB3B4400D36: message-id=<[email protected]>
    Mar 28 19:58:48 server postfix/qmgr[24790]: DB3B4400D36: from=<[email protected]>, size=705, nrcpt=1 (queue active)
    Mar 28 19:58:48 server postfix/smtpd[27492]: disconnect from localhost[127.0.0.1]
    Mar 28 19:58:48 server postfix/trivial-rewrite[27494]: warning: do not list domain bwns.be in BOTH mydestination and virtual_mailbox_domains
    Mar 28 19:58:48 server imapd: Connection, ip=[::ffff:127.0.0.1]
    Mar 28 19:58:48 server imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[56534], protocol=IMAP
    Mar 28 19:58:48 server postfix/local[27497]: DB3B4400D36: to=<[email protected]>, relay=local, delay=0.22, delays=0.15/0.01/0/0.07, dsn=5.1.1, status=bounced (unknown user: "jim")
    Mar 28 19:58:48 server postfix/cleanup[27495]: 1C391400D85: message-id=<[email protected]>
    Mar 28 19:58:48 server imapd: LOGOUT, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=628, sent=203, time=0
    Mar 28 19:58:48 server postfix/qmgr[24790]: 1C391400D85: from=<>, size=2410, nrcpt=1 (queue active)
    Mar 28 19:58:48 server postfix/bounce[27498]: DB3B4400D36: sender non-delivery notification: 1C391400D85
    Mar 28 19:58:48 server postfix/trivial-rewrite[27494]: warning: do not list domain bwns.be in BOTH mydestination and virtual_mailbox_domains
    Mar 28 19:58:48 server postfix/qmgr[24790]: DB3B4400D36: removed
    Mar 28 19:58:48 server imapd: Connection, ip=[::ffff:127.0.0.1]
    Mar 28 19:58:48 server imapd: LOGIN, [email protected], ip=[::ffff:127.0.0.1], port=[56535], protocol=IMAP
    Mar 28 19:58:48 server imapd: LOGOUT, [email protected], ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=119, sent=900, time=0
    Mar 28 19:58:48 server postfix/local[27497]: 1C391400D85: to=<[email protected]>, relay=local, delay=0.13, delays=0.06/0/0/0.07, dsn=5.1.1, status=bounced (unknown user: "jim")
    Mar 28 19:58:48 server postfix/qmgr[24790]: 1C391400D85: removed
    
    Thanks again!
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, thats the difference of a postfix Systemuser and virtualuser setup. Currently you defined bwns.be as domain for system user accounts only. To fix that, edit the postfix main.cf file, replace all occurrences of "bwns.be" with "server.bwns.be" and restart postfix. Then create a dns record for server.bwns.be that points to the Ip address of your server.
     
  7. jimbauwens

    jimbauwens New Member

  8. till

    till Super Moderator Staff Member ISPConfig Developer

  9. jimbauwens

    jimbauwens New Member

    It works!
    Thank you till! I promise that once I get a job, I'll donate you some money!

    Thanks,
    Jim Bauwens
     

Share This Page