can't receive mail for user accounts

Discussion in 'Installation/Configuration' started by Elfchen, Feb 28, 2008.

  1. Elfchen

    Elfchen New Member

    I can't receive mails on users accounts.

    Running on SuSE with latest ISP Config release.

    I have created a mail account [email protected] with alias [email protected]

    Mail to [email protected]:

    Code:
    Connected to 1.2.3.4.
    Escape character is '^]'.
    220 webhosting125.mailserver.biz ESMTP Postfix
    helo test.test.com
    250 webhosting125.mailserver.biz
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table
    
    Code:
    Feb 28 09:15:04 webhosting125 postfix/smtpd[9321]: connect from unknown[1.2.3.4]
    Feb 28 09:15:14 webhosting125 postfix/trivial-rewrite[9325]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
    Feb 28 09:15:20 webhosting125 postfix/smtpd[9321]: NOQUEUE: reject: RCPT from unknown[1.2.3.4]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<mail.mail.com>
    
    Mail to alias [email protected]:

    Code:
    Escape character is '^]'.
    220 webhosting125.domain.biz ESMTP Postfix
    helo aliastest.domain.com
    250 webhosting125.domain.biz
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    testcontent
    last line
    .
    250 2.0.0 Ok: queued as 611C01A7353
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.
    
    Code:
    Feb 28 09:19:45 webhosting125 postfix/qmgr[8533]: 49A171A735E: from=<[email protected]>, size=553, nrcpt=1 (queue active)
    Feb 28 09:19:45 webhosting125 postfix/smtp[9409]: 49A171A735E: to=<[email protected]>, orig_to=<[email protected]>, relay=none, delay=0.06, delays=0.01/0.04/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=webhosting125.domain.biz type=AAAA: Host not found)
    Feb 28 09:19:45 webhosting125 postfix/cleanup[9403]: 614FC1A7364: message-id=<[email protected]>
    Feb 28 09:19:45 webhosting125 postfix/bounce[9410]: 49A171A735E: sender non-delivery notification: 614FC1A7364
    Feb 28 09:19:45 webhosting125 postfix/qmgr[8533]: 49A171A735E: removed
    Feb 28 09:19:45 webhosting125 postfix/qmgr[8533]: 614FC1A7364: from=<>, size=2789, nrcpt=1 (queue active)
    Feb 28 09:19:46 webhosting125 postfix/smtpd[9321]: disconnect from unknown[1.2.3.4]
    Feb 28 09:19:46 webhosting125 postfix/smtp[9411]: 614FC1A7364: to=<[email protected]>, relay=sentry.domainbank.com[64.85.73.28]:25, delay=1.3, delays=0.02/0.04/1.1/0.18, dsn=5.0.0, status=bounced (host sentry.domainbank.com[64.85.73.28] said: 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1) (in reply to RCPT TO command))
    Feb 28 09:19:46 webhosting125 postfix/qmgr[8533]: 614FC1A7364: removed
    
    Code:
    webhosting125:/etc/postfix # ls
    INFO               local-host-names      openssl_postfix.conf.in  sender_canonical.db
    LICENSE            local-host-names.db   post-install             ssl
    TLS_LICENSE        local-host-names~     postfix-files            transport
    WARN               main.cf               postfix-script           transport.db
    access             main.cf.2007-06-20    prng_exch                virtual
    access.db          main.cf.SuSEconfig    relay_ccerts             virtual.db
    bounce.cf.default  main.cf.default       relay_ccerts.db          virtusertable
    canonical          main.cf.orig          relocated                virtusertable-db.alt
    canonical.db       makedefs.out          relocated.db             virtusertable.db
    dynamicmaps.cf     master.cf             sasl_passwd              virtusertable~
    generic            master.cf.2007-06-20  sasl_passwd.db
    header_checks      master.cf.SuSEconfig  sender_canonical
    webhosting125:/etc/postfix #
    
    In virtusertable

    Code:
    [email protected]    web35_domain_tld
    [email protected]    web35_domain_tld
    [email protected]    web35_domain_tld
    [email protected]    web35_domain_tld
    [email protected]    web35_domain_tld
    [email protected]    web35_domain_tld
    
    In local-host-names

    Code:
    ###################################
    #
    # ISPConfig local-host-names Configuration File
    #         Version 1.0
    #
    ###################################
    localhost
    webhosting125.domain.com
    localhost.webhosting125.domain.com
    localhost.domain.com
    localhost.localdomain
    www.domain.tld
    domain.tld
    
    Inside main.cf

    Code:
    virtual_alias_maps = hash:/etc/postfix/virtusertable
    mydestination = /etc/postfix/local-host-names
    
    Code:
    webhosting125:/etc/postfix # postconf -d | grep mydomain
    append_dot_mydomain = yes
    mydestination = $myhostname, localhost.$mydomain, localhost
    mydomain = webhosting125
    
    and ...

    Code:
    webhosting125:/etc/postfix # postconf -d | grep mydomain
    append_dot_mydomain = yes
    mydestination = $myhostname, localhost.$mydomain, localhost
    mydomain = webhosting125
    webhosting125:/etc/postfix # grep -R webhosting125 *
    local-host-names:webhosting125.domain.com
    local-host-names:localhost.webhosting125.domain.com
    local-host-names~:webhosting125.domain.com
    local-host-names~:localhost.webhosting125.domain.com
    main.cf:myhostname = webhosting125.$mydomain
    main.cf.orig:myhostname = webhosting125.$mydomain
    
    A bit confused why it shows webhosting125 as mydomain and not webhosting125.domain.com ... all strange ...

    Code:
     postconf -n
    alias_maps = hash:/etc/aliases
    biff = no
    broken_sasl_auth_clients = yes
    canonical_maps = hash:/etc/postfix/canonical
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/lib/postfix
    debug_peer_level = 2
    defer_transports =
    disable_dns_lookups = no
    disable_mime_output_conversion = no
    html_directory = /usr/share/doc/packages/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mail_owner = postfix
    mail_spool_directory = /var/mail
    mailbox_command =
    mailbox_size_limit = 0
    mailbox_transport =
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    masquerade_classes = envelope_sender, header_sender, header_recipient
    masquerade_domains =
    masquerade_exceptions = root
    message_size_limit = 10240000
    mydestination = /etc/postfix/local-host-names
    mydomain = domain.com
    myhostname = webhosting125.$mydomain
    mynetworks = 127.0.0.0/8
    mynetworks_style = subnet
    newaliases_path = /usr/bin/newaliases
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/packages/postfix/README_FILES
    relayhost =
    relocated_maps = hash:/etc/postfix/relocated
    sample_directory = /usr/share/doc/packages/postfix/samples
    sender_canonical_maps = hash:/etc/postfix/sender_canonical
    sendmail_path = /usr/sbin/sendmail
    setgid_group = maildrop
    smtp_sasl_auth_enable = no
    smtp_tls_note_starttls_offer = yes
    smtp_use_tls = yes
    smtpd_client_restrictions =
    smtpd_helo_required = no
    smtpd_helo_restrictions =
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_sender_restrictions = hash:/etc/postfix/access
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    strict_8bitmime = no
    strict_rfc821_envelopes = no
    tls_random_source = dev:/dev/urandom
    transport_maps = hash:/etc/postfix/transport
    unknown_local_recipient_reject_code = 550
    virtual_alias_maps = hash:/etc/postfix/virtusertable
    
    Session:

    Code:
    Escape character is '^]'.
    220 webhosting125.domain.com ESMTP Postfix
    helo anothertest.google.com
    250 webhosting125.domain.com
    mail from:[email protected]
    250 2.1.0 Ok
    rcpt to:[email protected]
    550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table
    rcpt to:[email protected]
    250 2.1.5 Ok
    data
    354 End data with <CR><LF>.<CR><LF>
    test
    end
    .
    250 2.0.0 Ok: queued as 4E1791A7353
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.
    
    On ISP-config site:

    Code:
    Feb 28 10:17:16 webhosting125 postfix/smtpd[11171]: connect from unknown[1.2.3.4]
    Feb 28 10:17:31 webhosting125 postfix/trivial-rewrite[11178]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
    Feb 28 10:17:37 webhosting125 postfix/smtpd[11171]: NOQUEUE: reject: RCPT from unknown[1.2.3.4]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in local recipient table; from=<[email protected]> to=<[email protected]> proto=SMTP helo=<anothertest.google.com>
    Feb 28 10:17:49 webhosting125 postfix/cleanup[11183]: warning: database /etc/postfix/virtusertable.db is older than source file /etc/postfix/virtusertable
    Feb 28 10:17:49 webhosting125 postfix/smtpd[11171]: 4E1791A7353: client=unknown[1.2.3.4]
    Feb 28 10:17:54 webhosting125 postfix/cleanup[11183]: 4E1791A7353: message-id=<[email protected]>
    Feb 28 10:17:54 webhosting125 postfix/qmgr[10625]: 4E1791A7353: from=<[email protected]>, size=402, nrcpt=1 (queue active)
    Feb 28 10:17:54 webhosting125 postfix/pickup[10624]: A34571A7364: uid=10023 from=<web35_domain_tld>
    Feb 28 10:17:54 webhosting125 postfix/cleanup[11183]: A34571A7364: message-id=<[email protected]>
    Feb 28 10:17:54 webhosting125 postfix/local[11184]: 4E1791A7353: to=<[email protected]>, relay=local, delay=23, delays=23/0.03/0/0.1, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Feb 28 10:17:54 webhosting125 postfix/qmgr[10625]: 4E1791A7353: removed
    Feb 28 10:17:54 webhosting125 postfix/qmgr[10625]: A34571A7364: from=<[email protected]>, size=452, nrcpt=1 (queue active)
    Feb 28 10:17:54 webhosting125 postfix/local[11184]: A34571A7364: to=<[email protected]>, relay=local, delay=0.08, delays=0.03/0/0/0.05, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Feb 28 10:17:54 webhosting125 postfix/qmgr[10625]: A34571A7364: removed
    Feb 28 10:17:55 webhosting125 postfix/smtpd[11171]: disconnect from unknown[1.2.3.4]
    
    And what is this: to=<[email protected]> ???

    this mail was received by web35 info-account:

    Code:
    Return-Path: <[email protected]>
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: from anothertest.google.com (unknown [1.2.3.4])
    	by webhosting125.domain.com (Postfix) with SMTP id 4E1791A7353
    	for <[email protected]>; Thu, 28 Feb 2008 10:17:31 +0100 (CET)
    Message-Id: <[email protected]>
    Date: Thu, 28 Feb 2008 10:17:31 +0100 (CET)
    From: [email protected]
    To: undisclosed-recipients:;
    
    Don't understood what happens here.

    Code:
    Feb 28 10:35:41 webhosting125 postfix/postmap[11834]: fatal: open database /etc/postfix/virtusertable.db: No such file or directory
    Feb 28 10:35:50 webhosting125 postfix/trivial-rewrite[11576]: table hash:/etc/postfix/virtusertable(0,lock|fold_fix) has changed -- restarting
    
    Code:
    webhosting125:/etc/postfix # l virtusertable*
    -rw-r--r-- 1 root root  3552 Feb 28 10:35 virtusertable
    -rw-r--r-- 1 root root 12288 Jul 24  2007 virtusertable-db.alt
    -rw-r--r-- 1 root root 12288 Feb 28 10:35 virtusertable.db
    -rw-r--r-- 1 root root  3552 Feb 28 10:35 virtusertable~
    webhosting125:/etc/postfix #
    
    ???????


    Why I can't receive mails for the regular mail address [email protected]?
     
    Last edited: Feb 28, 2008
  2. Elfchen

    Elfchen New Member

  3. falko

    falko Super Moderator Howtoforge Staff

    Please run
    Code:
    postmap /etc/postfix/virtusertable
    /etc/init.d/postfix restart
    What's in /etc/resolv.conf?
    Please check that the MX record for your domain is pointing to your ISPConfig server. You can check that like this:
    Code:
    dig mx yourdomain.com
     
  4. Elfchen

    Elfchen New Member

    thanks for your feedback

    Code:
    webhosting125:~ # postmap /etc/postfix/virtusertable
    webhosting125:~ # /etc/init.d/postfix restart
    Shutting down mail service (Postfix)                                 done
    Starting mail service (Postfix)                                      done
    webhosting125:~ # dig mx domain.tld
    
    ; <<>> DiG 9.3.2 <<>> mx domain.tld
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25551
    ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
    
    ;; QUESTION SECTION:
    ;domain.tld.                      IN      MX
    
    ;; ANSWER SECTION:
    domain.tld.               86400   IN      MX      10 www.domain.biz.
    
    ;; AUTHORITY SECTION:
    domain.tld.               86400   IN      NS      www.domain.biz.
    
    ;; ADDITIONAL SECTION:
    www.domain.biz. 86400 IN     A       1.2.3.4 (IP of ISPConfig-Server)
    
    ;; Query time: 5 msec
    ;; SERVER: 127.0.0.1#53(127.0.0.1)
    ;; WHEN: Fri Feb 29 15:44:48 2008
    ;; MSG SIZE  rcvd: 97
    
    webhosting125:~ #
    Code:
    webhosting125:~ # cat /etc/resolv.conf
    nameserver 127.0.0.1
    nameserver 193.37.236.10
    nameserver 88.198.230.115
    nameserver 217.146.139.5
    nameserver 192.76.134.3
    nameserver 131.188.3.2
    nameserver 128.8.10.14
    domain domain.com
    
    Now it works :D

    Code:
    Feb 29 15:50:09 webhosting125 postfix/qmgr[1100]: 3D0D21A734B: from=<[email protected]>, size=1984, nrcpt=1 (queue active)
    Feb 29 15:50:09 webhosting125 postfix/pickup[1099]: 9BEAA1A7351: uid=10023 from=<web35_domain_tld>
    Feb 29 15:50:09 webhosting125 postfix/cleanup[1300]: 9BEAA1A7351: message-id=<[email protected]>
    Feb 29 15:50:09 webhosting125 postfix/local[1302]: 3D0D21A734B: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=0.44, delays=0.1/0.03/0/0.31, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Feb 29 15:50:09 webhosting125 postfix/qmgr[1100]: 3D0D21A734B: removed
    Feb 29 15:50:09 webhosting125 postfix/qmgr[1100]: 9BEAA1A7351: from=<[email protected]>, size=453, nrcpt=1 (queue active)
    Feb 29 15:50:09 webhosting125 postfix/local[1302]: 9BEAA1A7351: to=<[email protected]>, relay=local, delay=0.24, delays=0.04/0/0/0.19, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Feb 29 15:50:09 webhosting125 postfix/qmgr[1100]: 9BEAA1A7351: removed
    Feb 29 15:50:33 webhosting125 pop3d: Connection, ip=[::ffff:84.x.x.x]
    Feb 29 15:50:33 webhosting125 pop3d: LOGIN, user=web35_domain_tld, ip=[::ffff:84.x.x.x]
    Feb 29 15:50:33 webhosting125 pop3d: LOGOUT, user=web35_domain_tld, ip=[::ffff:84.x.x.x], top=0, retr=2048, rcvd=34, sent=2257, time=0
    
    Don't know what happend - have already postmaped the file in the past and restarted postfix. But main thing - it works!

    Thank you very much!
     
    Last edited: Feb 29, 2008

Share This Page