Mail delivery failed... No Such User Here?!?

Discussion in 'HOWTO-Related Questions' started by klonos, Nov 18, 2008.

  1. klonos

    klonos New Member

    This mail server is working fine (sends & receives mail ok) other than the following issue with some domains:

    -----Original Message-----
    From: Mail Delivery System [[EMAIL="[email protected]"]mailto:[email protected][/EMAIL]] 
    Sent: Monday, November 17, 2008 1:03 PM
    To: [EMAIL="[email protected]"][email protected][/EMAIL]
    Subject: Mail delivery failed: returning message to sender
    This message was created automatically by mail delivery software.
    A message that you sent could not be delivered to one or more of its
    recipients. This is a permanent error. The following address(es) failed:
      [EMAIL="[email protected]"][email protected][/EMAIL]
        [B]No Such User Here[/B]
    ------ This is a copy of the message, including all the headers. ------
    Return-path: <[EMAIL="[email protected]"][email protected][/EMAIL]>
    Received: from ([] helo=username)
        by with esmtp (Exim 4.69)
        (envelope-from <[EMAIL="[email protected]"][email protected][/EMAIL]>)
        id 1L21sl-0003VV-ML
        for [EMAIL="[email protected]"][email protected][/EMAIL]; Mon, 17 Nov 2008 05:03:14 -0600
    From: =?iso-8859-7?B?yu/96uHyIMPp/vHj7/I=?= <[EMAIL="[email protected]"][email protected][/EMAIL]>
    To: <[EMAIL="[email protected]"][email protected][/EMAIL]>
    Subject: test
    Date: Mon, 17 Nov 2008 13:01:36 +0200
    Message-ID: <[email protected]>
    MIME-Version: 1.0
    Content-Type: multipart/related;
    X-Mailer: Microsoft Office Outlook 11
    X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579
    Thread-Index: AclIoNYLeOPYb0M/SQe4/3g04l+lCQ==
    X-ACL-Warn: {
    This is a multi-part message in MIME format...
    What could be wrong? How should I troubleshoot this further??
  2. falko

    falko Super Moderator ISPConfig Developer

    Please check if that user is existing in your Postfix configuration. I'd check /etc/postfix/ and all included files.

    Also, check your mail log for errors.
  3. klonos

    klonos New Member

    Files seem to be ok.

    Hey Falko,

    The users are stored on a mysql db. And the user in question is in the db (actually, the issue is with all the users and they are all in the db).

    Here is the file:

    # See /usr/share/postfix/ for a commented, more complete version
    # Debian specific:  Specifying a file name will cause the first
    # line of that file to be used as the name.  The Debian default
    # is /etc/mailname.
    #myorigin = /etc/mailname
    smtpd_banner = $myhostname - Welcome to
    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
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    myhostname =
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    #mydestination =, localhost,
    mydestination =, localhost, localhost.localdomain
    relayhost = 
    mynetworks = [URL=""][/URL] [URL=""][/URL]
    #mynetworks = [URL=""][/URL]
    mailbox_size_limit = 0
    message_size_limit = 35840000
    recipient_delimiter = +
    inet_interfaces = all
    virtual_alias_domains = 
    virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
    virtual_mailbox_domains =
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    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_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
    transport_maps = proxy:mysql:/etc/postfix/
    virtual_create_maildirsize = yes
    virtual_maildir_extended = yes
    virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/
    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:[]:10024
    receive_override_options = no_address_mappings
    readme_directory = /usr/share/doc/postfix
    html_directory = /usr/share/doc/postfix/html
    In the above text I have replaced the real domain with (security reasons). Also, there are 3 things that differ from the in your HowTo:

    1. filenames mysql-virtual*.cf have been replaced with mysql-v*.cf, but here is a listing of them under /etc/postfix:

    ls -l mysql-v*
    -rw-r----- 1 root postfix 140 2007-08-02 01:43
    -rw-r----- 1 root postfix 125 2007-08-02 01:44
    -rw-r----- 1 root postfix 138 2007-08-02 01:43
    -rw-r----- 1 root postfix 194 2007-08-02 01:44
    -rw-r----- 1 root postfix 125 2007-08-02 01:45
    -rw-r----- 1 root postfix 134 2007-08-02 01:45
    I think I've been extra careful and haven't misspelled anything. Do the file rights seem ok to you?

    Using the info I have in these files, I can successfully connect to the mysql server and the db that contains the user info:

    mysql -u mail_admin -p
    Enter password:
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 8930
    Server version: 5.0.67-0ubuntu6 (Ubuntu)
    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
    mysql> use mail
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    Database changed
    2. I do not use a file, but have a 'virtual_mailbox_domains =' setting in the file, since this server serves only one domain.

    3. I have added the local network ( in the 'mynetworks =' setting, because I get the 'Relay access denied' error otherwise. (That is another issue I might resolve some other time)

    Do you see anything I might be missing???
  4. klonos

    klonos New Member

    Here's another thought...

    In the /var/log/ log I see entries like:

    Nov 19 07:54:03 mail postfix/smtp[15361]: D86431476AD: to=<[EMAIL="[email protected]"][email protected][/EMAIL]>, relay=[]:10024, delay=47, delays=37/0/0.01/9.9, dsn=2.5.0, status=sent (250 2.5.0 Ok, id=15351-01, DISCARD(bounce.suppressed))
    Nov 19 07:54:03 mail postfix/qmgr[15340]: D86431476AD: removed

    Nov 19 07:37:45 mail amavis[13845]: (13845-19) Passed CLEAN, [some.IP] [another.IP] <[EMAIL="[email protected]"][email protected][/EMAIL]> -> <[EMAIL="[email protected]"][email protected][/EMAIL]>, Message-ID: <[email protected]>, mail_id: mR25E01XiPDS, Hits: -, size: 468027, queued_as: 5DE191476B0, 283 ms
    Nov 19 07:37:45 mail postfix/smtp[15300]: D2C6B147693: to=<[EMAIL="[email protected]"][email protected][/EMAIL]>, relay=[]:10024, delay=2.6, delays=2.3/0/0/0.28, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=13845-19, from MTA([]:10025): 250 2.0.0 Ok: queued as 5DE191476B0)
    Nov 19 07:37:45 mail postfix/qmgr[15340]: D2C6B147693: removed
    for the certain user. This user receives mail from other domains. That means that there is no mysql db lookup issue. Right?

    It is only from certain domains that when I try to send mail to this user I get the 'No such user here' error.

    Also, I've googled it up and found that there might be a known issue with MS Outlook and Outlook Express that causes this issue. Both clients need the setting 'Server requires authentication' enabled to resolve this. Tried that with no luck.

    Will try to tail the log when I send mail to this user from a domain that has this issue and let you people know.

    In the meantime, any ideas are welcomed.
  5. klonos

    klonos New Member

    Also found out that these domains use exim 4.69. Don't know if that helps at all?!?
  6. falko

    falko Super Moderator ISPConfig Developer

    What's the output of
    netstat -tap

    Do the users exist in the database?
  7. klonos

    klonos New Member

    netstat shows:

    netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 localhost.localdo:10024 *:*                     LISTEN      7329/amavisd (maste
    tcp        0      0 localhost.localdo:10025 *:*                     LISTEN      13138/master
    tcp        0      0 localhost.localdo:mysql *:*                     LISTEN      4591/mysqld
    tcp        0      0 localhost.localdo:spamd *:*                     LISTEN      4686/
    tcp        0      0 *:www                   *:*                     LISTEN      4227/apache2
    tcp        0      0 *:ftp                   *:*                     LISTEN      5441/pure-ftpd (SER
    tcp        0      0 *:3128                  *:*                     LISTEN      5506/(squid)
    tcp        0      0 *:2200                  *:*                     LISTEN      4502/sshd
    tcp        0      0 *:smtp                  *:*                     LISTEN      13138/master
    tcp        0      0 *:https                 *:*                     LISTEN      5565/apache-ssl
    tcp        0      0 localhost.localdo:55683 localhost.localdo:mysql TIME_WAIT   -
    tcp        0      0 localhost.localdo:mysql localhost.localdo:55651 TIME_WAIT   -
    tcp        0     16     some.other.IP:24312 FIN_WAIT1   -
    tcp        0      0     IP.of.Their.ISP:3442 ESTABLISHED 5527/sshd: [email protected]
    tcp        0    820     IP.of.Their.ISP:2756 ESTABLISHED 22974/0
    tcp6       0      0 [::]:imaps              [::]:*                  LISTEN      5773/couriertcpd
    tcp6       0      0 [::]:pop3s              [::]:*                  LISTEN      5841/couriertcpd
    tcp6       0      0 [::]:pop3               [::]:*                  LISTEN      5804/couriertcpd
    tcp6       0      0 [::]:imap2              [::]:*                  LISTEN      5736/couriertcpd
    tcp6       0      0 [::]:ftp                [::]:*                  LISTEN      5441/pure-ftpd (SER
    tcp6       0      0 [::]:2200               [::]:*                  LISTEN      4502/sshd
    tcp6       0      0     IP.of.Their.ISP:4685 TIME_WAIT   -
    And yes, the users are in the db. They receive from and send mail to other domains just fine. Its just these about one dozen domains that give the 'No Such User Here' when they send mail to this server and to existing mail accounts.
  8. klonos

    klonos New Member

    Here's (yet) another thought...

    I have Logwatch installed and among the daily reports I receive through mail is this:

    sasl auth daemon Begin ------------------------ 
     SASL Authentications failed 19 Time(s)
     Service smtp (pam) - 19 Time(s):
        Realm  - 19 Time(s):
           User: inna - PAM auth error - 19 Time(s):
     **Unmatched Entries**
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     do_request      : NULL password received
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     pam_mysql - SELECT returned no result.
     ---------------------- sasl auth daemon End ------------------------- 
    anything to do with our issue???
  9. falko

    falko Super Moderator ISPConfig Developer

    Do the MX records of the not-working domains point to your server? You can check with
    dig mx
  10. klonos

    klonos New Member

    Will need to check with the host...

    These domains are all hosted remotely and also share the same IP. I do not have access to remote shell on the server that hosts these domains, but will ask the sysadmins to run the command and mail me the output.

    Will let you know as soon as I get an answer.

    In the meantime this is what puzzles me:

    I have setup 3 accounts:
    [email protected] (my domain & my own account, everything been working fine for some years now)
    [email protected] (the server that I have set up about one year ago, works fine with all other domains, but not with domain2)
    [email protected] (remote host with virtual domains (3rd party company), works fine with other domains, but not with domain1)

    Troubleshooting Step1
    Mail from reaches both and ok.
    Mail from reaches me ok (or gmail, or hotmail, or other domains as well).
    Mail from also reaches me ok (or gmail, or hotmail, or other domains).

    Troubleshooting Step2
    Mail from [email protected] to [email protected] also cc'ed to [email protected]

    Reaches [email protected] ok, but fails to reach and returns:

    This is the mail system at host
    I'm sorry to have to inform you that your message could not
    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 mail system
    <[EMAIL="[email protected]"][email protected][/EMAIL]>: host[] said: 550-Verification
        failed for <[EMAIL="[email protected]"][email protected][/EMAIL]> 550-No Such User Here 550 Sender verify failed
        (in reply to RCPT TO command)
    What is this?? does the server try to verify the sender by trying to send an email back before it receives the original mail sent to it? And if so, why does the server reply 'No Such User Here'?

    Troubleshooting Step3
    And finally, mail from [email protected] sent to [email protected] and also cc'ed to my account [email protected] received ok by both domains!?!.

    See what I mean? If user [email protected] is able to receive mail from [email protected] , then what is this 'Verification failed for <[email protected]> 550-No Such User Here' error that the domain2 server spits and drives me crazy? What server gives this reply? Domain1 or domain2?
  11. klonos

    klonos New Member

    and here's another weird thing...

    mail from do not reach
    mail from reaches
    mail is displayed in client
    mail return receipts that the mail was displayed in reach

    So normal mail fails, but mail receipt do not! Go figure...:confused:
  12. klonos

    klonos New Member

    Ok. Issue solved!

    The problem was with the remote server that is hosting those few domains that return the 'No Such User Here' (and I knew it all along). The reason for the error was due to the presence of a local domain entry for the on the server The sys admins removed it and all is fine now.

    Thank you for your time once again Falko.

Share This Page