[postfix]550 ..: Recipient address rejected: User unknown in virtual mailbox table

Discussion in 'Installation/Configuration' started by RdeWilde, May 31, 2008.

  1. RdeWilde

    RdeWilde New Member

    I've been trying for hours and hours getting my postfix to work, but it just won't work.

    Of the three scenario's, i can't get one to work:
    - external mailserver (isp) to local mailserver (mine) WORKS
    - local mailserver (mine) to local mailserver (mine) WORKS
    - local mailserver (mine to external mailserver (isp) PROBLEM!

    I get this error:
    Code:
    .. postfix/smtpd[16293]: NOQUEUE: reject: RCPT from *host*[*ip*]: 550 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<dev>
    
    It just doesn't seem to get that external.isp isn't my server, but it has to go external :confused:. The external.isp could be anything from hotmail, gmail to some little mailprovider.

    My configs for as far as they'll be needed, i added to the bottom.


    Hopefully someone can help me getting this up, becuase i've been spending much more hours than I would:eek:. Thanks in advance!! :)


    Code:
    [B]MAIN.CF[/B]   POSTCONF -N:
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    disable_vrfy_command = yes
    html_directory = no
    inet_interfaces = all
    local_recipient_maps = $virtual_mailbox_maps
    mail_owner = postfix
    mailbox_command =
    mailbox_transport = virtual
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    mydestination =
    myhostname = mail.sove.nl
    mynetworks = host 87.249.107.0/24 127.0.0.0/8
    mynetworks_style = host
    myorigin = $myhostname
    newaliases_path = /usr/bin/newaliases.postfix
    proxy_interfaces = 87.249.107.11
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    relayhost =
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtpd_banner = $myhostname ESMTP $mail_name
    smtpd_delay_reject = yes
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_path = /var/run/dovecot/auth-client
    smtpd_sasl_security_options = nonanonymous
    smtpd_sasl_type = dovecot
    unknown_local_recipient_reject_code = 550
    virtual_gid_maps = static:12
    virtual_mailbox_base = /var/www/client/
    virtual_mailbox_domains = mysql:/etc/postfix/mysql_mailbox_domains.cf
    virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox_maps.cf
    virtual_minimum_uid = 8
    virtual_transport = dovecot
    virtual_uid_maps = static:8
    

    MASTER.CF:
    Code:
    #
    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    #
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       n       -       -       smtpd
    submission inet n       -       n       -       -       smtpd
    #  -o smtpd_enforce_tls=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps     inet  n       -       n       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #628      inet  n       -       n       -       -       qmqpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       n       1000?   1       tlsmgr
    rewrite   unix  -       -       n       -       -       trivial-rewrite
    bounce    unix  -       -       n       -       0       bounce
    defer     unix  -       -       n       -       0       bounce
    trace     unix  -       -       n       -       0       bounce
    verify    unix  -       -       n       -       1       verify
    flush     unix  n       -       n       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       n       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       n       -       -       smtp
    #       -o fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    
    .. a lot more ..
    
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=mail:mail argv=/usr/libexec/dovecot/deliver -d ${recipient}
    
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. RdeWilde

    RdeWilde New Member

    All okay. Except for some timeouts, but that won't be the problem i guess:
     
  4. falko

    falko Super Moderator Howtoforge Staff

    I see that mydestination is empty in your main.cf. That could be the problem. Please change it and restart Postfix.
     
  5. RdeWilde

    RdeWilde New Member

    What should I change it to? I'm using multiple domain names, which are saved in a mysql database table (used to virtual_mailbox_domain).

    Do I have to use a single domain for my host? Or use a SQL statement? It hasn't been empty all the time, i've tried different things. But in working configs I found it was mostly empty.

    Please suggest what I could put in there (for example).
     
  6. falko

    falko Super Moderator Howtoforge Staff

    You must use a different hostname from what you've stored in the MySQL DB. What's the output of
    Code:
    hostname -f
    ? Is this hostname stored in the MySQL DB?
     
  7. RdeWilde

    RdeWilde New Member

    This outputs dewildevds2.jronline.nl which is not hosted as a maildomain. But I'm connecting to the mailserver through the hosted domains itself. For example:
    Works for incoming at least. Outgoing can connect, but not sending as mentioned. Previous settings I've tried are:

    None of them did work. Neither did this change (dewil...) :( Thanks for helping this far anyway..
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Are the host and IP address your own ones or the ones of the remote host?
     
  9. RdeWilde

    RdeWilde New Member

    My client IP running the mailclient.
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Huh? :confused: So you're running a mail server on the client?
     
  11. RdeWilde

    RdeWilde New Member

    No, I'm running it on the external server. Is there any documentation about where this message come from? It checks my outgoing recipents on the local MySQL table, but it should just send it away (as that is why it's there :S). Hope it's possible to solve.
     
  12. falko

    falko Super Moderator Howtoforge Staff

    I'm not sure what the problem is, but you should compare all your configuration files with the ones from the tutorial again to rule out typos, etc.
     
  13. RdeWilde

    RdeWilde New Member

    I didn't do a tutorial, just installed it by 'yum' and configured it by hand.

    Looks like it's looking in the table for incoming e-mail, when sending e-mail. What settings could influence this? Is there any way that auth could fail and cause this problem?
     
  14. falko

    falko Super Moderator Howtoforge Staff

    What's in /etc/postfix/mysql_mailbox_domains.cf and
    /etc/postfix/mysql_mailbox_maps.cf?
     
  15. RdeWilde

    RdeWilde New Member

    mysql_mailbox_domains.cf:
    users contains a column called domain which holds the domain.tld for the email.

    mysql_mailbox_maps.cf
    Correct path (when prepending the base path)
     
  16. RdeWilde

    RdeWilde New Member

    Anyone who has an asnwer?
     
  17. RdeWilde

    RdeWilde New Member

    I think i've found a part of the problem. The outgoing port is 587 (submission) and I think that has to be routed somewhere to port 25? But it isn't anywhere? Shouldn't it be in master.cf?
     
  18. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    netstat -tap
    ?
     
  19. RdeWilde

    RdeWilde New Member

    Here's the output:
     
  20. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. I don't think that port 587 is a problem for outgoing emails...
     

Share This Page