Virtual Users And Domains With Postfix, Courier And MySQL

Discussion in 'HOWTO-Related Questions' started by Tr!n!Ty, Sep 22, 2006.

  1. Tr!n!Ty

    Tr!n!Ty New Member

    Hello,

    I follow this tuto at the letter but it's don't work, i don't understand why
    I'm using Ubuntu 6.06 Dapper, Mysql 5.0.22. The install was doing fine, the test too. but when i send me an email, i get this message in the log :
    My Postfix config
    thanks for your help
     
  2. falko

    falko Super Moderator ISPConfig Developer

  3. Anne_Kleyheeg

    Anne_Kleyheeg New Member

    Maildir

    I've compleet the configuration and it works.
    But is get 1 error:
    chdir ansmeijlink.nl/root/: No such file or directory
    This is because the Maildir map doesn't excist.
    Must i create it or have i done something wrong.
    And where must i create the Maildir
     
  4. wmrwl

    wmrwl Member

    The Maildirs should be automatically created when the first email for the respective users arrive.
    ________
    Vapir N02 Review
    ________
    Lovely_Girl
     
    Last edited: Apr 22, 2011
  5. Anne_Kleyheeg

    Anne_Kleyheeg New Member

    Maildir

    Thanks for the message.
    But when i do that is say

    ----------------------------------------------------------------------

    This is the Postfix program at host ansmeijlink.nl.

    I'm sorry to have to inform you that your message could not be
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to <postmaster>

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The Postfix program

    <[email protected]>: mail for localhost loops back to myself
     
  6. Tr!n!Ty

    Tr!n!Ty New Member

    Falko i change the request sql same at the howtos but same probleme
     
  7. falko

    falko Super Moderator ISPConfig Developer

    Please make sure you restarted everything. What's in your mail log now?
     
  8. Tr!n!Ty

    Tr!n!Ty New Member

    same error "User unknown in virtual alias table"
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Does the email address exist in the users table?
     
  10. falko

    falko Super Moderator ISPConfig Developer

    Did you out ansmeijlink.nl into the domains table?
     
  11. Anne_Kleyheeg

    Anne_Kleyheeg New Member

    /etc/postfix/main.cf

    # See /usr/share/postfix/main.cf.dist for a commented, more complete version

    smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
    biff = no

    # appending .domain is the MUA's job.
    append_dot_mydomain = no

    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h

    myhostname = ansmeijlink.nl
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = ansmeijlink.nl, localhost
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /home/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_create_maildirsize = yes
    virtual_mailbox_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
    virtual_mailbox_limit_override = yes
    virtual_maildir_limit_message = "The user you are trying to reach is over quota."
    virtual_overquota_bounce = yes
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings



    Database = Mail
    Table = Domains
    Record = ansmeijlink.nl
     
  12. falko

    falko Super Moderator ISPConfig Developer

    You have ansmeijlink.nl in the domains table AND in the mydestination line! This doesn't work. You can list it either in the domains table or in mydestination, but not in both.
     
  13. Anne_Kleyheeg

    Anne_Kleyheeg New Member

    I have still 2 errors in my mail.log

    Sep 25 14:32:57 localhost imaplogin: chdir ansmeijlink.nl/root/: No such file or directory
    and
    Sep 25 14:24:27 localhost postfix/qmgr[8977]: 079332F80DD: to=<[email protected]>, relay=none, delay=1421, status=deferred (delivery temporarily suspended: connect to mail.ansmeijlink.nl[80.100.230.149]: Connection refused)
     
  14. Tr!n!Ty

    Tr!n!Ty New Member

    yes falko the user exist in the users table
     
  15. Tr!n!Ty

    Tr!n!Ty New Member

    falko i find the probleme i forget the postconf -e 'virtual_alias_domains ='
    Now all work fine =)
     
  16. Tr!n!Ty

    Tr!n!Ty New Member

    oh noo i have a probleme with smtp SASL

    I test to copy smtp.conf to /usr/lib/sasl2/
    but in the smtp.conf there a files directory i havent it (/var/spool/authdaemon/socket)

    thanks f or help
     
  17. falko

    falko Super Moderator ISPConfig Developer

    What's in /etc/default/saslauthd, /etc/pam.d/smtp, and /etc/postfix/sasl/smtpd.conf? Please compare those files with the ones from the tutorial.
     
  18. falko

    falko Super Moderator ISPConfig Developer

    Please open a new thread for this, otherwise this one will become too confusing.
     
  19. Tr!n!Ty

    Tr!n!Ty New Member

    In /etc/default/saslauthd

    In /etc/pam.d/smtp

    in /etc/postfix/sasl/smtpd.conf

    Code:
    pweck_method: saslauthd
    mech_list: plain login
    allow_plaintext: true
    auxprop_plugin: mysql
    sql_hostnames: 127.0.0.1
    sql_user: mail_admin
    sql_passwd: mysql_password
    sql_database: mail
    sql_select: select password from users where email = '%u'
     
    Last edited: Sep 26, 2006
  20. falko

    falko Super Moderator ISPConfig Developer

    Looks ok. Are you sure you use the correct username (must be an email address) and password?
     

Share This Page