Virtual Users And Domains With Postfix, Courier And MySQL

Discussion in 'HOWTO-Related Questions' started by Torsson, Mar 18, 2006.

  1. Torsson

    Torsson New Member

    Hi, the howto guide is great, but i have a little problem.

    First when i had done everything in the howto i had problem with

    -ERR Maildir: No such file or directory

    but when i changed from

    MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
    to
    MYSQL_MAILDIR_FIELD Maildir

    i stoped get those messages.

    but then i get

    -ERR Login failed

    And i have tryed to send a mail to the user

    And i get another strange thing, but this time with imap.
    when i do telnet localhost 143 and write login [email protected] mypassword
    i get this

    login NO Error in IMAP command received by server.


    What have i done wrong?.
     
  2. falko

    falko Super Moderator ISPConfig Developer

    You must send an email to that user first. The Maildir gets created when the first email arrives.
     
  3. Torsson

    Torsson New Member

  4. falko

    falko Super Moderator ISPConfig Developer

  5. Torsson

    Torsson New Member

    Now when i open port 25 110 i dont get a falied but it still says
    -ERR Maildir: No such file or directory when i try with telnet

    And with opera pop3 mail
     
  6. falko

    falko Super Moderator ISPConfig Developer

    What's in the mail log?
     
  7. Torsson

    Torsson New Member

    Maby this is the problem:

    telnet localhost 25
    Trying 127.0.0.1...
    telnet: Unable to connect to remote host: Connection refused

    Mail log dosent say anything about why he didnt receve the mail. postfix and everything is started.

    things from mail.log that seems strange:
    Mar 19 08:55:08 localhost postfix/master[880]: fatal: /etc/postfix/master.cf: li

    ne 127: bad transport type: smtp_data_done_timeout=1200

    Mar 19 08:54:19 localhost dccifd[660]: 1.2.74 listening to /var/lib/dcc/dccifd <-- shuld it be 1.2.74 ?

    Mar 19 14:14:14 localhost dccproc[934]: socket(UDP): Address family not supported by protocol
     
    Last edited: Mar 19, 2006
  8. falko

    falko Super Moderator ISPConfig Developer

    Please post the output of
    Code:
    netstat -tap
    and the content of /etc/postfix/master.cf.
     
  9. Torsson

    Torsson New Member

    Netstat:
    Code:
    
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:imaps                 *:*                     LISTEN     629/couriertcpd
    tcp        0      0 *:pop3s                 *:*                     LISTEN     652/couriertcpd
    tcp        0      0 localhost.localdo:10024 *:*                     LISTEN     548/amavisd (master
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN     733/mysqld
    tcp        0      0 *:pop3                  *:*                     LISTEN     638/couriertcpd
    tcp        0      0 *:imap2                 *:*                     LISTEN     615/couriertcpd
    tcp        0      0 *:sunrpc                *:*                     LISTEN     379/portmap
    tcp        0      0 *:www                   *:*                     LISTEN     916/apache2
    tcp        0      0 *:auth                  *:*                     LISTEN     668/inetd
    tcp        0      0 *:659                   *:*                     LISTEN     901/rpc.statd
    tcp        0      0 *:ssh                   *:*                     LISTEN     896/sshd
    tcp        0      0 192.168.0.2:ssh         192.168.0.110:4219      ESTABLISHED940/0
    tcp        0      0 localhost.localdom:pop3 localhost.localdom:1038 TIME_WAIT  -
    

    Master.cf
    Code:
    smtp      inet  n       -       -       -       -       smtpd
    #submission inet n      -       -       -       -       smtpd
    #       -o smtpd_etrn_restrictions=reject
    #628      inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       -       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  -       -       -       -       0       bounce
    defer     unix  -       -       -       -       0       bounce
    trace     unix  -       -       -       -       0       bounce
    verify    unix  -       -       -       -       1       verify
    flush     unix  n       -       -       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       -       -       -       smtp
    relay     unix  -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    #
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    #
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    
    # only used by postfix-tls
    #tlsmgr   fifo  -       -       n       300     1       tlsmgr
    #smtps    inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #587      inet  n       -       n       -       -       smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    
    amavis unix - - - - 2 smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    127.0.0.1:10025 inet n - - - - smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    -o smtpd_bind_address=127.0.0.1
    
     
  10. Torsson

    Torsson New Member

    I can have found the problem, my domain holder havent changed the MX record on a proper way. but i still need to solve the telnet localhost 25 problem
     
  11. falko

    falko Super Moderator ISPConfig Developer

    Please remove
    Code:
    -o smtp_data_done_timeout=1200
    from /etc/postfix/master.cf and restart Postfix.
     
  12. Torsson

    Torsson New Member

    I want to thank you falko for your time you took to help me. i bought a new server pc and did your guide and it works great!. you are then man!!! :)
     
  13. szizso

    szizso New Member

    error proxymap

    Hi

    i dont understand, why :confused: ???

    May 23 18:00:28 localhost postfix/master[15854]: daemon started -- version 2.1.5
    May 23 18:00:28 localhost postfix/proxymap[15859]: warning: request for unapproved table: "mysql:/etc/postfix/mysql-virtual_forwardings.cf"
    May 23 18:00:28 localhost postfix/proxymap[15859]: warning: to approve this table for proxymap access, list proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf in main.cf:proxy_read_maps
    May 23 18:00:28 localhost postfix/cleanup[15858]: fatal: proxymap service is not configured for table "mysql:/etc/postfix/mysql-virtual_forwardings.cf"
    May 23 18:00:29 localhost postfix/master[15854]: warning: process /usr/lib/postfix/cleanup pid 15858 exit status 1
    May 23 18:00:29 localhost postfix/master[15854]: warning: /usr/lib/postfix/cleanup: bad command startup -- throttling
     
  14. falko

    falko Super Moderator ISPConfig Developer

    What's the value of proxy_read_maps in /etc/postfix/main.cf?
     
  15. szizso

    szizso New Member

    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf

    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$recipint_canonical_maps$relocated_maps$transport_maps$mynetworks$virtual_mailbox_limit_maps
     
  16. falko

    falko Super Moderator ISPConfig Developer

    You need spaces between the variables...
    Restart Postfix afterwards.
     
  17. szizso

    szizso New Member

    yesssssss, thx
     
  18. szizso

    szizso New Member

    May 29 13:43:41 localhost postfix/smtpd[27010]: fatal: unknown receive_override_options value "no_unknown_recepient_checks" in "no_unknown_recepient_checks,no_header_body_checks"
    May 29 13:43:42 localhost postfix/master[26223]: warning: process /usr/lib/postfix/smtpd pid 27010 exit status 1
    May 29 13:43:42 localhost postfix/master[26223]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

    why ???

    master.cf
    amavis unix - - - - 2 smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    127.0.0.1:10025 inet n - - - - smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recepient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o receive_override_options=no_unknown_recepient_checks,no_header_body_checks
    -o smtpd_bind_address=127.0.0.1
     
  19. falko

    falko Super Moderator ISPConfig Developer

    You have a typo there:

    Code:
    -o receive_override_options=no_unknown_rec[B][COLOR="Red"]e[/COLOR][/B]pient_checks,no_header_body_checks
    
    should be

    Code:
    -o receive_override_options=no_unknown_rec[I][COLOR="Red"]i[/COLOR][/I]pient_checks,no_header_body_checks
     
  20. szizso

    szizso New Member

    :eek: sorry I dont behold, thxxxxxxxx
     

Share This Page