Я включил логи mysql и логи postfix. Получается, что mysql верно отдает адрес по которому отсылать сообщение полученное на alias. Привожу логи postfix (Посылаю письмо от admin@mydomain.com на алис test@mydomain.com, должно упасть по редиректу на admin@mydomain.com)
Jul 8 21:48:45 srv postfix/smtpd[998]: >>> CHECKING RECIPIENT MAPS <<<
Jul 8 21:48:45 srv postfix/smtpd[998]: ctable_locate: leave existing entry key test@mydomain.com
Jul 8 21:48:45 srv postfix/smtpd[998]: maps_find: recipient_canonical_maps: test@mydomain.com: not found
Jul 8 21:48:45 srv postfix/smtpd[998]: maps_find: recipient_canonical_maps: test: not found
Jul 8 21:48:45 srv postfix/smtpd[998]: maps_find: recipient_canonical_maps: @mydomain.com: not found
Jul 8 21:48:45 srv postfix/smtpd[998]: mail_addr_find: test@mydomain.com -> (not found)
Jul 8 21:48:45 srv postfix/smtpd[998]: maps_find: canonical_maps: test: not found
Jul 8 21:48:45 srv postfix/smtpd[998]: maps_find: canonical_maps: @mydomain.com: not found
Jul 8 21:48:45 srv postfix/smtpd[998]: dict_mysql_get_active: attempting to connect to host localhost
Jul 8 21:48:45 srv postfix/smtpd[998]: dict_mysql: successful connection to host localhost
Jul 8 21:48:45 srv postfix/smtpd[998]: dict_mysql: successful query from host localhost
Jul 8 21:48:45 srv postfix/smtpd[998]: dict_mysql_lookup: retrieved 1 rows
Вот здесь smtpd находит по алису адрес получателя (admin@mydomain.com).
Jul 8 21:48:45 srv postfix/smtpd[998]: maps_find: virtual_alias_maps: mysql:/usr/local/etc/postfix/mysql/alias_maps.conf(0,100): test@mydomain.com = admin@mydomain.com
Jul 8 21:48:45 srv postfix/smtpd[998]: mail_addr_find: test@mydomain.com -> admin@mydomain.com
Jul 8 21:48:45 srv postfix/smtpd[998]: smtpd_check_rewrite: trying: permit_inet_interfaces
Jul 8 21:48:45 srv postfix/smtpd[998]: permit_inet_interfaces: localhost 127.0.0.1
Jul 8 21:48:45 srv postfix/smtpd[998]: before input_transp_cleanup: cleanup flags = enable_header_body_filter enable_automatic_bcc enable_address_mapping
Jul 8 21:48:45 srv postfix/smtpd[998]: after input_transp_cleanup: cleanup flags = enable_header_body_filter
Jul 8 21:48:45 srv postfix/smtpd[998]: connect to subsystem public/cleanup
Jul 8 21:48:45 srv postfix/smtpd[998]: input attribute name: queue_id
Jul 8 21:48:45 srv postfix/smtpd[998]: input attribute value: E7982136985
Jul 8 21:48:45 srv postfix/smtpd[998]: input attribute name: (end)
Jul 8 21:48:45 srv postfix/smtpd[998]: send attr flags = 2
Jul 8 21:48:45 srv postfix/smtpd[998]: > localhost[127.0.0.1]: 250 Ok
Jul 8 21:48:45 srv postfix/smtpd[998]: < localhost[127.0.0.1]: DATA
Jul 8 21:48:45 srv imapd: LOGOUT, user=admin@mydomain.com, ip=[x.x.x.x], headers=439, body=0, time=0
Jul 8 21:48:46 srv postfix/smtpd[998]: public/cleanup socket: wanted attribute: status
Jul 8 21:48:46 srv postfix/cleanup[994]: E7982136985: message-id=<50181.x.x.x.x.1152380925.squirrel@www.mydomain.com>
Jul 8 21:48:46 srv postfix/qmgr[988]: E7982136985: from=<admin@mydomain.com>, size=1199, nrcpt=1 (queue active)
Jul 8 21:48:46 srv postfix/smtpd[998]: input attribute name: status
Jul 8 21:48:46 srv postfix/smtpd[998]: input attribute value: 0
Jul 8 21:48:46 srv postfix/smtpd[998]: public/cleanup socket: wanted attribute: reason
Jul 8 21:48:46 srv postfix/smtpd[998]: input attribute name: reason
Jul 8 21:48:46 srv postfix/smtpd[998]: input attribute value: (end)
Jul 8 21:48:46 srv postfix/smtpd[998]: public/cleanup socket: wanted attribute: (list terminator)
Jul 8 21:48:46 srv postfix/smtpd[998]: input attribute name: (end)
Jul 8 21:48:46 srv postfix/smtpd[998]: > localhost[127.0.0.1]: 250 Ok: queued as E7982136985
Jul 8 21:48:46 srv postfix/smtpd[998]: watchdog_pat: 0x80d1388
Jul 8 21:48:46 srv postfix/smtpd[998]: < localhost[127.0.0.1]: QUIT
Jul 8 21:48:46 srv postfix/smtpd[998]: > localhost[127.0.0.1]: 221 Bye
Jul 8 21:48:46 srv postfix/smtpd[998]: match_hostname: localhost ~? 127.0.0.0/8
Jul 8 21:48:46 srv postfix/smtpd[998]: match_hostaddr: 127.0.0.1 ~? 127.0.0.0/8
Jul 8 21:48:46 srv postfix/smtpd[998]: disconnect from localhost[127.0.0.1]
Здесь срабатываем спам и вирус фильтры.
Jul 8 21:48:46 srv amavis[662]: (00662-02) FWD via SMTP: <admin@mydomain.com> -> <test@mydomain.com>, BODY=8BITMIME 250 2.6.0 Ok, id=00662-02, from MTA([127.0.0.1]:10025): 250 Ok: queued as E7982136985
Jul 8 21:48:46 srv amavis[662]: (00662-02) Passed CLEAN, [x.x.x.x] <admin@mydomain.com> -> <test@mydomain.com>, Message-ID: <50181.x.x.x.x.1152380925.squirrel@www.mydomain.com>, mail_id: vl+5aoJNPWns, Hits: -0.132, queued_as: E7982136985, 777 ms
Jul 8 21:48:46 srv postfix/smtp[995]: < 127.0.0.1[127.0.0.1]: 250 2.6.0 Ok, id=00662-02, from MTA([127.0.0.1]:10025): 250 Ok: queued as E7982136985
Jul 8 21:48:46 srv amavis[662]: (00662-02) TIMING [total 788 ms] - SMTP EHLO: 4 (1%)1, SMTP pre-MAIL: 2 (0%)1, SMTP pre-DATA-flush: 4 (0%)1, SMTP DATA: 98 (12%)14, body_digest: 1 (0%)14, gen_mail_id: 1 (0%)14, mime_decode: 16 (2%)16, get-file-type1: 26 (3%)19, decompose_part: 1 (0%)19, parts_decode: 0 (0%)19, AV-scan-1: 32 (4%)23, spam-wb-list: 3 (0%)24, SA msg read: 1 (0%)24, SA parse: 13 (2%)26, SA check: 201 (26%)51, SA finish: 3 (0%)52, update_cache: 2 (0%)52, decide_mail_destiny: 1 (0%)52, fwd-connect: 64 (8%)60, fwd-mail-from: 50 (6%)66, fwd-rcpt-to: 82 (10%)77, fwd-data-cmd: 18 (2%)79, write-header: 1 (0%)79, fwd-data-contents: 1 (0%)79, fwd-data-end: 128 (16%)96, fwd-rundown: 10 (1%)97, prepare-dsn: 1 (0%)97, main_log_entry: 14 (2%)99, update_snmp: 2 (0%)99, unlink-1-files: 2 (0%)99, rundown: 6 (1%)100
Jul 8 21:48:46 srv postfix/smtp[995]: 394B313696C: to=<test@mydomain.com>, relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=00662-02, from MTA([127.0.0.1]:10025): 250 Ok: queued as E7982136985)
Jul 8 21:48:46 srv postfix/smtp[995]: name_mask: resource
Jul 8 21:48:46 srv postfix/smtp[995]: name_mask: software
Jul 8 21:48:46 srv postfix/qmgr[988]: 394B313696C: removed
А вот здесь virtual пишет, что не нашел test@mydomain.com.
Jul 8 21:48:46 srv postfix/virtual[1000]: E7982136985: to=<test@mydomain.com>, relay=virtual, delay=1, status=bounced (unknown user: "test@mydomain.com")
Jul 8 21:48:46 srv postfix/cleanup[994]: 3004F136987: message-id=<20060708174846.3004F136987@srv.mydomain.com>
Jul 8 21:48:46 srv postfix/qmgr[988]: 3004F136987: from=<>, size=2934, nrcpt=1 (queue active)
Jul 8 21:48:46 srv postfix/qmgr[988]: E7982136985: removed
Jul 8 21:48:46 srv postfix/virtual[1000]: 3004F136987: to=<admin@mydomain.com>, relay=virtual, delay=0, status=sent (delivered to maildir)
Jul 8 21:48:46 srv postfix/qmgr[988]: 3004F136987: removed
Может кто знает в чем беда?