OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Subject: Really strange behavior
From: Andy Dills (andyxecu.net)
Date: Thu Apr 27 2000 - 15:41:50 CDT


I've setup some virtual maps (no big deal, done it a million
times). However, they don't seem to work for some really strange reason
that I can't determine.

Essentially, it does the map lookup properly, but it gets delivered to
the rootmail account regardless of the result of the map lookup.

If anybody has suggestions, I'm all ears.

Thanks,
Andy

Specs:
FreeBSD 4.0, ECC memory, 1231pl6.

postconf -n:
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
debug_peer_level = 10
debug_peer_list = 127.0.0.1, 216.127.139.24
default_destination_concurrency_limit = 10
local_destination_concurrency_limit = 2
mail_owner = postfix
mydestination = $myhostname, localhost.$mydomain, $mydomain
mydomain = cribs2go.com
myhostname = www.cribs2go.com
myorigin = $mydomain
queue_directory = /var/spool/postfix
virtual_maps = hash:/etc/postfix/virtual

/etc/postfix/virtual looks like:

alertware.com alertware
buybubblewrap.com bubble
cribs2go.com rootmail
cribs2go.com OK
alertware.com OK
buybubblewrap.com OK

What happens is that no matter what, everything ends up going to
rootmail.

Here is the output with debug 10 (starting with RCPT TO, with timestamp
trimmed for sanity):

: < unknown[216.127.139.24]: RCPT TO: tesaalertware.com
: extract_addr: input: tesaalertware.com
: extract_addr: result: tesaalertware.com
: generic_checks: START
: generic_checks: name=permit_mynetworks
: permit_mynetworks: unknown 216.127.139.24
: match_hostaddr: 216.127.139.24 ~? 216.127.139.0/24
: generic_checks: name=permit_mynetworks status=1
: smtpd_check_rcptmap: tesaalertware.com
: connect to subsystem private/rewrite
: event_enable_read: fd 10
: event_request_timer: set 0x8052914 0x806f4e8 100
: print string: rewrite
: print string: canonicalize
: print string: tesaalertware.com
: vstream_fflush_some: fd 10 flush 40
: vstream_buf_get_ready: fd 10 got 19
: mail_scan_any: read string: tesaalertware.com
: rewrite_clnt: canonicalize: tesaalertware.com -> tesaalertware.com
: event_request_timer: reset 0x8052914 0x806f4e8 100
: print string: resolve
: print string: tesaalertware.com
: vstream_fflush_some: fd 10 flush 27
: vstream_buf_get_ready: fd 10 got 40
: mail_scan_any: read string: smtp
: mail_scan_any: read string: alertware.com
: mail_scan_any: read string: tesaalertware.com
: mail_scan_any: read integer: 0
: resolve_clnt_query: `tesaalertware.com' -> t=`smtp' h=`alertware.com' r=`tesaalertware.com'
: match_string: alertware.com ~? www.cribs2go.com
: match_string: alertware.com ~? localhost.cribs2go.com
: match_string: alertware.com ~? cribs2go.com
: match_list_match: alertware.com: no match
: maps_find: tesaalertware.com: not found
: match_string: alertware.com ~? www.cribs2go.com
: match_string: alertware.com ~? localhost.cribs2go.com
: match_string: alertware.com ~? cribs2go.com
: match_list_match: alertware.com: no match
: maps_find: alertware.com: not found
: mail_addr_find: tesaalertware.com -> (not found)
: maps_find: tesaalertware.com: not found
: match_string: alertware.com ~? www.cribs2go.com
: match_string: alertware.com ~? localhost.cribs2go.com
: match_string: alertware.com ~? cribs2go.com
: match_list_match: alertware.com: no match
: maps_find: alertware.com: not found
: mail_addr_find: tesaalertware.com -> (not found)
: maps_find: tesaalertware.com: not found
: match_string: alertware.com ~? www.cribs2go.com
: match_string: alertware.com ~? localhost.cribs2go.com
: match_string: alertware.com ~? cribs2go.com
: match_list_match: alertware.com: no match
: maps_find: alertware.com: not found
: mail_addr_find: tesaalertware.com -> (not found)
: maps_find: tesaalertware.com: not found
: match_string: alertware.com ~? www.cribs2go.com
: match_string: alertware.com ~? localhost.cribs2go.com
: match_string: alertware.com ~? cribs2go.com
: match_list_match: alertware.com: no match
: maps_find: hash:/etc/postfix/virtual: alertware.com = alertware
: mail_addr_find: tesaalertware.com -> alertware
: rec_put: type R len 18 data tesaalert
: > unknown[216.127.139.24]: 250 Ok
: vstream_fflush_some: fd 7 flush 8
: vstream_buf_get_ready: fd 7 got 6
: < unknown[216.127.139.24]: DATA
: rec_put: type M len 0 data
: rec_put: type N len 50 data Received:
: rec_put: type N len 56 data ?by www.cr
: rec_put: type N len 64 data ?for <tesa
: > unknown[216.127.139.24]: 354 End data with <CR><LF>.<CR><LF>
: vstream_fflush_some: fd 9 flush 226
: vstream_fflush_some: fd 7 flush 37
: vstream_buf_get_ready: fd 7 got 2
: rec_put: type N len 0 data
: vstream_buf_get_ready: fd 7 got 2
: rec_put: type N len 0 data
: vstream_buf_get_ready: fd 7 got 6
: rec_put: type N len 4 data afda
: vstream_buf_get_ready: fd 7 got 3
: rec_put: type X len 0 data
: rec_put: type E len 0 data
: vstream_fflush_some: fd 9 flush 14
: 16D2B2CED70: message-id=<20000428042942.16D2B2CED70www.cribs2go.com>
: 16D2B2CED70: from=<andyxecu.net>, size=311 (queue active)
: vstream_buf_get_ready: fd 9 got 2
: mail_scan_any: read integer: 0
: > unknown[216.127.139.24]: 250 Ok: queued as 16D2B2CED70
: vstream_fflush_some: fd 7 flush 31
: 16D2B2CED70: to=<rootmailcribs2go.com>, relay=local, delay=11, status=sent (mailbox)

Thanks!
Andy

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Andy Dills 301-682-9972
Xecunet, LLC www.xecu.net
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Dialup * Webhosting * E-Commerce * High-Speed Access