FreeBSD 7.4 postfix - status=bounced (unknown user: "myMail")‏

FreeBSD 7.4 postfix - status=bounced (unknown user: "myMail")‏

Hello guys,

Trying to set up a mail server using Postfix - 2.8.7.1 , postfixadmin-2.3.4, Dovecot 1.2.17 and MySQL 5.0.92, maia-1.0.3.r1575_1, clamav-0.97.3_1, php5-5.3.8, for virtual domains/users on FreeBSD 7.4 . So far, no luck. Here's my config file and my logs, let me know if you can make anything of it. I'm new to Postfix and am researching it still. Thanks in advance.

/maillog

Code:
Jan  9 02:16:01 ns postfix/smtpd[16216]: connect from mail-ww0-f41.google.com[74.125.82.41]
Jan  9 02:16:18 ns postfix/smtpd[16216]: warning: 41.82.125.74.list.dsbl.org: RBL lookup error: Host or domain name not found. Name service error for name=41.82.125.74.list.dsbl.org type=A: Host not found, try again
Jan  9 02:16:19 ns postfix/smtpd[16216]: 44F2F308421: client=mail-ww0-f41.google.com[74.125.82.41]
Jan  9 02:16:19 ns postfix/cleanup[16221]: 44F2F308421: message-id=<CAK-G9vaF5k2DVa3TfsEg7bx0cW7zAgdMUjPPyqSsJsC3hz6LSQ@mail.gmail.com>
Jan  9 02:16:19 ns postfix/qmgr[16209]: 44F2F308421: from=<sender123@gmail.com>, size=1613, nrcpt=1 (queue active)
Jan  9 02:16:20 ns postfix/smtpd[16224]: connect from localhost[127.0.0.1]
Jan  9 02:16:20 ns postfix/smtpd[16224]: 1D1BA308444: client=localhost[127.0.0.1]
Jan  9 02:16:20 ns postfix/cleanup[16221]: 1D1BA308444: message-id=<CAK-G9vaF5k2DVa3TfsEg7bx0cW7zAgdMUjPPyqSsJsC3hz6LSQ@mail.gmail.com>
Jan  9 02:16:20 ns postfix/qmgr[16209]: 1D1BA308444: from=<sender123@gmail.com>, size=2010, nrcpt=1 (queue active)
Jan  9 02:16:20 ns postfix/smtpd[16224]: disconnect from localhost[127.0.0.1]
Jan  9 02:16:20 ns maiad[15326]: (15326-04) Passed CLEAN, [74.125.82.41] [74.125.82.41] <sender123@gmail.com> -> <myMail@myDomain.net>, Message-ID: <CAK-G9vaF5k2DVa3TfsEg7bx0cW7zAgdMUjPPyqSsJsC3hz6LSQ@mail.gmail.com>, Hits: -, 270 ms
Jan  9 02:16:20 ns postfix/local[16225]: 1D1BA308444: to=<myMail@myDomain.net>, relay=local, delay=0.12, delays=0.1/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "myMail")
Jan  9 02:16:20 ns maiad[15326]: (15326-04) Passed CLEAN, <sender123@gmail.com> -> <myMail@myDomain.net>, Hits: -, tag=999, tag2=999, kill=999, 0/0/0/0
Jan  9 02:16:20 ns postfix/cleanup[16221]: 39B1830844A: message-id=<20120108171620.39B1830844A@mail.myDomain.net>
Jan  9 02:16:20 ns postfix/bounce[16226]: 1D1BA308444: sender non-delivery notification: 39B1830844A
Jan  9 02:16:20 ns postfix/qmgr[16209]: 39B1830844A: from=<>, size=3843, nrcpt=1 (queue active)
Jan  9 02:16:20 ns postfix/qmgr[16209]: 1D1BA308444: removed
Jan  9 02:16:20 ns postfix/smtp[16222]: 44F2F308421: to=<myMail@mydomain.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=17, delays=16/0.01/0/0.28, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=15326-04, from MTA: 250 2.0.0 Ok: queued as 1D1BA308444)
Jan  9 02:16:20 ns postfix/qmgr[16209]: 44F2F308421: removed
Jan  9 02:16:21 ns postfix/smtp[16227]: certificate verification failed for gmail-smtp-in.l.google.com[74.125.127.26]:25: untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Jan  9 02:16:22 ns postfix/smtp[16227]: 39B1830844A: to=<sender123@gmail.com>, relay=gmail-smtp-in.l.google.com[74.125.127.26]:25, delay=2.3, delays=0/0.01/1.1/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1326043003 l9si69669874pbi.205)
Jan  9 02:16:22 ns postfix/qmgr[16209]: 39B1830844A: removed

######### maillog end #########

maillog -> status=bounced (unknown user: "myMail") but add postfixadmin myMail@myDomain.net.
and telnet 110 auth ok, but list 0.

/main.cf

Code:
soft_bounce = no
broken_sasl_auth_clients = yes
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks
smtpd_recipient_restrictions =
  permit_mynetworks,
  permit_sasl_authenticated,
  reject_non_fqdn_hostname,
  reject_non_fqdn_sender,
  reject_non_fqdn_recipient,
  reject_unauth_destination,
  reject_unauth_pipelining,
  reject_invalid_hostname,
  reject_rbl_client list.dsbl.org,
  reject_rbl_client bl.spamcop.net,
  reject_rbl_client sbl-xbl.spamhaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

# TLS CONFIG
#
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/postfix/smtpd.pem
smtpd_tls_cert_file = /etc/ssl/postfix/smtpd.pem
smtpd_tls_CAfile = /etc/ssl/postfix/smtpd.pem
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom   

# MySQL Configuration
#
virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:125
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 125
virtual_transport = virtual
virtual_uid_maps = static:125   

# Additional for quota support
#
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/usr/local/etc/postfix/mysql_virtual_mailbox_limit_maps.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
  $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
  $virtual_mailbox_limit_maps
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.
virtual_overquota_bounce = yes

myhostname = mail.myDomain.net

mydomain = myDomain.net

mydestination = localhost.$mydomain, $mydomain

relay_domains = proxy:mysql:/usr/local/etc/postfix/mysql_relay_domains_maps.cf

content_filter=smtp-amavis:[127.0.0.1]:10024

queue_directory = /var/spool/postfix

command_directory = /usr/local/sbin

daemon_directory = /usr/local/libexec/postfix

data_directory = /var/db/postfix

mail_owner = postfix

default_privs = nobody

myorigin = $mydomain

unknown_local_recipient_reject_code = 550

mynetwork_style = host

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

debug_peer_level = 2

debugger_command =
     PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
     ddd $daemon_directory/$process_name $process_id & sleep 5

sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = /usr/local/share/doc/postfix
manpage_directory = /usr/local/man
sample_directory = /usr/local/share/examples/postfix
readme_directory = /usr/local/share/doc/postfix

transport_maps = hash:/usr/local/etc/postfix/transport
vacation_destination_recipient_limit = 1

######### main.cf end #########

/dovecot.conf

Code:
protocols = imap pop3 imaps pop3s
disable_plaintext_auth = no
ssl = yes
ssl_cert_file = /etc/ssl/dovecot/cert.pem
ssl_key_file = /etc/ssl/dovecot/key.pem
login_greeting = ISP Mail Server Ready.
mail_location = maildir:/usr/local/virtual/%d/%n
mail_privileged_group = mail
dotlock_use_excl = yes
verbose_proctitle = yes

first_valid_uid = 125
last_valid_uid = 125

first_valid_gid = 125
last_valid_gid = 125

maildir_copy_with_hardlinks = yes

protocol imap {

  mail_plugins = quota imap_quota
  imap_client_workarounds = delay-newmail netscape-eoh tb-extra-mailbox-sep
}

protocol pop3 {
  pop3_uidl_format = %08Xu%08Xv

  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}


protocol lda {
  postmaster_address = [email]postmaster@myDomain.net[/email]

  sendmail_path = /usr/sbin/sendmail

}

auth_username_format = %Lu

auth default {
   mechanisms = plain login

  passdb sql {
    args = /usr/local/etc/dovecot-sql.conf
  }

  userdb sql {
    args = /usr/local/etc/dovecot-sql.conf
  }

  user = root

  socket listen {

    client {

      path = /var/spool/postfix/private/auth
      mode = 0660
      user = postfix
      group = postfix
    }
  }
}

dict {
  quota = mysql:/usr/local/etc/dovecot-dict-sql.conf
  #expire = db:/var/db/dovecot/expire.db
}

dict_db_config = /usr/local/etc/dovecot-db.conf


plugin {

     quota = dict:user::proxy::quota

     quota_rule = *:storage=1024000

}

######### dovecot.conf end #########


/dovecot-sql.conf

Code:
driver = mysql

connect = host=localhost dbname=myDbname user=myDbuser password=myDbpass

default_pass_scheme = MD5


password_query = SELECT password FROM mailbox WHERE username = '%u'

user_query = SELECT maildir, 125 AS uid, 125 AS gid, CONCAT('*:messages=10000:bytes=', quota) AS quota_rule FROM mailbox WHERE username = '%u' AND active = '1'

######### dovecot-sql.conf end #########

/dovecot-dict-sql.conf

Code:
connect = host=localhost dbname=myDbname user=myDbuser password=myDbpass

map {
  pattern = priv/quota/storage
  table = quota2
  username_field = username
  value_field = bytes
}
map {
  pattern = priv/quota/messages
  table = quota2
  username_field = username
  value_field = messages
}

map {
  pattern = shared/expire/$user/$mailbox
  table = expires
  value_field = expire_stamp

  fields {
    username = $user
    mailbox = $mailbox
  }
}
######### dovecot-dict-sql.conf  end #########
 
Hi,

I don't know your master.cf, but is your virtual defined there?
Code:
virtual_transport = virtual

I have
Code:
virtual_transport = dovecot
in main.cf and
Code:
dovecot   unix  -       n       n       -       -       pipe
  flags=DRhu user=mymail:mymail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
in master.cf

From your logs it seems that it does use the local transport in the end (but it should deliver with dovecot). Maybe this thread helps: http://forums.freebsd.org/showthread.php?p=64529#post64529
 
thanks your reply, glocke
but, local user worked, virtual user problem(status=bounced (unknown user: "myMail")‏.
 
Maybe its the maiad, that doesn't know anything about the virtual setup, but I'm only guessing around. Could you paste your master.cf somewhere?
 
You could also run qmgr and virtual or local with the verbose flag(s) enabled, see http://www.postfix.org/master.5.html:
Code:
-v     Increase the verbose logging level.  Specify
       multiple -v options to make a Postfix daemon
       process increasingly verbose.
This works for all postfix daemons, not only for master.
 
thanks reply, glocke.

master.cf

Code:
smtp      inet  n       -       n       -       -       smtpd
submission inet n       -       n       -       -       smtpd
smtps   inet    n       -       n       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

smtp-amavis unix    -   -   n   - 2 smtp
  -o smtp_data_done_timeout=2400
  -o smtp_send_xforward_command=yes
  -o disable_dns_lookups=yes
  -o max_use=20
127.0.0.1:10025     inet    n   -   n   -   -   smtpd
      -o content_filter=
      -o local_recipient_maps=
      -o relay_recipient_maps=
      -o smtpd_restriction_classes=
      -o smtpd_delay_reject=no
      -o smtpd_client_restrictions=permit_mynetworks,reject
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o mynetworks_style=host
      -o mynetworks=127.0.0.0/8
      -o strict_rfc821_envelopes=yes
      -o smtpd_error_sleep_time=0
      -o smtpd_soft_error_limit=1001
      -o smtpd_hard_error_limit=1000
      -o smtpd_client_connection_count_limit=0
      -o smtpd_client_connection_rate_limit=0
      -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks

#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
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp

relay     unix  -       -       n       -       -       smtp
    -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache

vacation  unix  -       n       n       -       -       pipe
    flags=DRhu user=vacation argv=/var/spool/vacation/vacation.pl
 
It all looks good to me, I don't have a clue whats wrong and I have a very simular setup to yours. As I said I would try the verbose flag and hope an error comes up, I compared your setup to mine, and I could spot a real difference.
 
Back
Top