1

Topic: Sender address rejected: User unknown in virtual mailbox table

==== Required information ====
- iRedMail version: latest
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: centos 6.x
- Related log if you're reporting an issue: -
====

I have a strange error using iredmail.

The facts
- I created the user
- GMail can send to this user (I receive the message, its inside the webmail)
- 2 other external SMTP servers can't send to the user.
The error they give:
<info@xxxxxxx.xxxx>: host xxxx.xxxxx.xx[164.138.31.130] said: 550
    5.1.0 <xxxx@xxxxxx.xxx>: Sender address rejected: User unknown in
    virtual mailbox table (in reply to RCPT TO command)

So I thought, lets search with google what to do, I found several questions about this topic.
And see that you (iRedMail webmaster) ask for this:

"Does the user exist ?"
[root@imap1a log]# cd /etc/postfix/mysql/
[root@imap1a mysql]# for cf in $(ls *.cf); do echo ${cf}; postmap -q xxx@xxxx.xx mysql:./${cf}; done
catchall_maps.cf
domain_alias_catchall_maps.cf
domain_alias_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
info@autozoeker.nl
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
info@autozoeker.nl
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf
vmail1/xxxx.xx/i/n/f/info-2013.11.13.16.23.29//Maildir/

Yes It exists, (and I can receive messages sended from gmail).

What about the logfiles (after sending a message to my user, not using gmail):
- /var/log/maillog > no new lines added
- /var/log/iredapd.log > no new lines added

What about the logfiles (after sending a message to my user, using gmail):
- /var/log/maillog > no new lines added
Nov 27 10:50:12 imap1a postfix/smtpd[17620]: connect from unknown[209.85.215.177]
Nov 27 10:50:12 imap1a policyd: connection from: 127.0.0.1 port: 54207 slots: 0 of 2044 used
Nov 27 10:50:12 imap1a policyd: rcpt=25, module=bypass, host=209.85.215.177 (unknown), from=xxxx@xxxx.xxx, to=xxxx@xxxx.xxx, size=0
Nov 27 10:50:12 imap1a postfix/smtpd[17620]: 1EC2B21B72: client=unknown[209.85.215.177]
Nov 27 10:50:12 imap1a postfix/cleanup[17627]: 1EC2B21B72: message-id=<000c01ceeb56$0fe5db40$2fb191c0$@gmail.com>
Nov 27 10:50:12 imap1a postfix/qmgr[14346]: 1EC2B21B72: from=<xxxx@xxxx.xxx>, size=3986, nrcpt=1 (queue active)
Nov 27 10:50:12 imap1a postfix/smtpd[17620]: disconnect from unknown[209.85.215.177]
Nov 27 10:50:13 imap1a postfix/smtpd[17636]: connect from localhost[127.0.0.1]
Nov 27 10:50:13 imap1a postfix/smtpd[17636]: D2A2D21B7B: client=localhost[127.0.0.1]
Nov 27 10:50:13 imap1a postfix/cleanup[17627]: D2A2D21B7B: message-id=<000c01ceeb56$0fe5db40$2fb191c0$@gmail.com>
Nov 27 10:50:13 imap1a postfix/qmgr[14346]: D2A2D21B7B: from=<xxxx@xxxx.xxx>, size=4443, nrcpt=1 (queue active)
Nov 27 10:50:13 imap1a postfix/smtpd[17636]: disconnect from localhost[127.0.0.1]
Nov 27 10:50:13 imap1a amavis[16662]: (16662-01) Passed CLEAN {RelayedOutbound}, LOCAL [209.85.215.177]:44406 [84.245.40.74] <xxxx@xxxx.xxx> -> <xxxx@xxxx.xxx>, Message-ID: <000c01ceeb56$0fe5db40$
Nov 27 10:50:13 imap1a postfix/smtp[17632]: 1EC2B21B72: to=<xxxx@xxxx.xxx>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.06/0.01/0.01/1.8, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.$
Nov 27 10:50:13 imap1a postfix/qmgr[14346]: 1EC2B21B72: removed
Nov 27 10:50:13 imap1a postfix/pipe[17637]: D2A2D21B7B: to=<xxxx@xxxx.xxx>, relay=dovecot, delay=0.08, delays=0.01/0.01/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
Nov 27 10:50:13 imap1a postfix/qmgr[14346]: D2A2D21B7B: removed

- /var/log/iredapd.log > no new line added
2013-11-27 10:50:12 INFO [209.85.215.177] xxxxx@xxxx.com -> xxx@xxxx.xx, DUNNO


I did disabled greylisting a while ago.


postconf -n
---------------------
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
allow_percent_hack = no
biff = no
bounce_queue_lifetime = 4h
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
delay_warning_time = 0h
disable_vrfy_command = yes
enable_original_recipient = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailbox_command = /usr/libexec/dovecot/deliver
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_backoff_time = 4000s
maximal_queue_lifetime = 4h
message_size_limit = 15728640
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = xxxx.xx
myhostname = imap1a.xxxx.xx
mynetworks = 127.0.0.0/8
mynetworks_style = host
myorigin = imap1a.xxxx.xx
newaliases_path = /usr/bin/newaliases.postfix
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_can                                                                       onical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sende                                                                       r_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_res                                                                       trictions
queue_directory = /var/spool/postfix
queue_run_delay = 300s
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain                                                                       .cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/relay_domains.cf
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, che                                                                       ck_helo_access pcre:/etc/postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_re                                                                       cipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unaut                                                                       h_destination, check_policy_service inet:127.0.0.1:10031
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_path = ./dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
smtpd_tls_CAfile = /etc/pki/tls/certs/iRedMail_CA.pem
smtpd_tls_cert_file = /etc/pki/tls/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/pki/tls/private/iRedMail.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
swap_bangpath = no
tls_random_source = dev:/dev/urandom
transport_maps = proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf, proxy:my                                                                       sql:/etc/postfix/mysql/catchall_maps.cf, proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/virtual_mailbox_maps.cf
virtual_minimum_uid = 2000
virtual_transport = dovecot
virtual_uid_maps = static:2000


I hope you can see the problem...

Greetings,
Martijn

2

Re: Sender address rejected: User unknown in virtual mailbox table

I get this all the time its most likely an spammer trying to use your mail server with non user to send out mail.