On Sun Feb 07 2016 10:06:37 Wietse Venema       <wie...@porcupine.org> said:
> 
> @lbutlr:
>> On Feb 6, 2016, at 5:33 PM, Wietse Venema <wie...@porcupine.org> wrote:
>>> @lbutlr:
>>>> # postmap -q ja...@example.com hash:/etc/postfix/virtual 
>>>> john+ja...@example.com,kreme+ja...@kreme.com,fred+ja...@kreme.com
>>>> 
>>>> The address I am redirecting to is getting sent to dovecot without
>>>> hitting virtual.
>>> 
>>> You haven't shown that Postfix is configured to use that table.
>> 
>> To use virtual?
>> 
>> Yeah, I have dozens of things in virtual. If that failed things
>> would go pear-shaped very quickly.
>> 
>> # postconf virtual_alias_maps
>> virtual_alias_maps = hash:$config_directory/virtual 
>> proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
> 
> What is config_directory?

/usr/local/etc/postfix which has a symlink at /etc/psotfix and

postmap -q -q ja...@example.com hash:/usr/local/etc/postfix/virtual returns 
exactly the same results.


> The same program that does the sender_bcc_maps lookups also does
> the virtual_alias_maps expansions. You can't have one without the
> other unless you have "-o name=value" settings in master.cf.

smtp       unix  -       -       n       -       -       smtp
smtp       inet  n       -       n       -       1       postscreen
smtpd      pass  -       -       n       -       -       smtpd
dnsblog    unix  -       -       n       -       0       dnsblog
tlsproxy   unix  -       -       n       -       0       tlsproxy
submission inet  n       -       n       -       -       smtpd
    -o smtpd_tls_security_level=encrypt
    -o smtpd_sasl_auth_enable=yes
    -o smtpd_sasl_type=dovecot
    -o smtpd_sasl_security_options=noanonymous
    -o smtpd_sasl_path=private/auth
    -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    -o smtpd_data_restrictions=
    -o 
smtpd_relay_restrictions=permit_sasl_authenticated,reject_unauth_destination,reject
    -o smtpd_helo_restrictions=
    -o 
smtpd_recipient_restrictions=permit_sasl_authenticated,reject_unauth_destination,reject
    -o syslog_name=submit-tls
pickup     fifo  n       -       n       60      1       pickup
cleanup    unix  n       -       n       -       0       cleanup
qmgr       fifo  n       -       n       300     1       qmgr
rewrite    unix  -       -       n       -       -       trivial-rewrite
bounce     unix  -       -       n       -       0       bounce
defer      unix  -       -       n       -       0       bounce
flush      unix  n       -       n       1000?   0       flush
proxymap   unix  -       -       n       -       -       proxymap
relay      unix  -       -       n       -       -       smtp
showq      unix  n       -       n       -       -       showq
error      unix  -       -       n       -       -       error
local      unix  -       n       n       -       -       local
virtual    unix  -       n       n       -       -       virtual
lmtp       unix  -       -       n       -       -       lmtp
dovecot    unix  -       n       n       -       -       pipe flags=DRhu
    user=vpopmail:vchkpw argv=/usr/local/libexec/dovecot/dovecot-lda -f
    ${sender} -d ${user}@${nexthop} -m ${extension}
policyd-spf unix -       n       n       -       0       spawn user=nobody
    argv=/usr/local/bin/policyd-spf
trace      unix  -       -       n       -       0       bounce
verify     unix  -       -       n       -       1       verify
anvil      unix  -       -       n       -       1       anvil
scache     unix  -       -       n       -       1       scache
discard    unix  -       -       n       -       -       discard
tlsmgr     unix  -       -       n       1000?   1       tlsmgr
retry      unix  -       -       n       -       -       error
proxywrite unix  -       -       n       -       1       proxymap
smtp-amavis unix -       -       n       -       2       smtp
    -o smtp_data_done_timeout=1200
    -o disable_dns_lookups=yes
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_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -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

The sender address is triggering the REDIRECT, but the redirect fails with a 
user unknown (by dovecot), so dovecot is getting the redirect address without 
it going through virtual. That’s the only way that dovecot could ever see that 
address since if it went to the virtual table, it would disappear, replaced by 
the value side of the virtual table.

postmap has been run on virtual, and there are no complaints on postfix reload.

$ grep warning /var/log/maillog 
Feb  7 00:05:23 mail postfix/smtpd[34494]: warning: hostname richtime.fvds.ru 
does not resolve to address 62.109.10.53
Feb  7 00:25:51 mail postfix/smtpd[35318]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 01:35:50 mail postfix/smtpd[40702]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 02:06:50 mail postfix/smtpd[41930]: warning: hostname 
server.1digitechph.com does not resolve to address 142.4.23.172: hostname nor 
servname provided, or not known
Feb  7 02:45:50 mail postfix/smtpd[43432]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 03:55:53 mail postfix/smtpd[47014]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 05:05:52 mail postfix/smtpd[49922]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 06:15:55 mail postfix/smtpd[52643]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 06:40:16 mail postfix/smtpd[53763]: warning: hostname 
hosted-ny.securefastserver.com does not resolve to address 141.255.165.195: 
hostname nor servname provided, or not known
Feb  7 06:42:39 mail postfix/smtpd[53858]: warning: hostname 
hosted-ny.securefastserver.com does not resolve to address 141.255.165.195: 
hostname nor servname provided, or not known
Feb  7 06:46:51 mail postfix/smtpd[54213]: warning: hostname 
Host-46-151-213-129.nashirnet.com does not resolve to address 46.151.213.129: 
hostname nor servname provided, or not known
Feb  7 07:03:18 mail postfix/smtpd[54704]: warning: hostname 
Host-46-151-213-129.nashirnet.com does not resolve to address 46.151.213.129: 
hostname nor servname provided, or not known
Feb  7 07:08:05 mail postfix/smtpd[55100]: warning: hostname 
162-214-21-71.unifiedlayer.com does not resolve to address 162.214.21.71: 
hostname nor servname provided, or not known
Feb  7 07:09:27 mail postfix/smtpd[55100]: warning: hostname 
162-214-24-12.unifiedlayer.com does not resolve to address 162.214.24.12: 
hostname nor servname provided, or not known
Feb  7 07:25:55 mail postfix/smtpd[55953]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 08:35:58 mail postfix/smtpd[59644]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 08:57:28 mail postfix/smtpd[60571]: warning: hostname 
199-96-250-4.static.dbsintl.net does not resolve to address 199.96.250.4: 
hostname nor servname provided, or not known
Feb  7 08:58:53 mail postfix/smtpd[60571]: warning: hostname 
199-96-250-4.static.dbsintl.net does not resolve to address 199.96.250.4: 
hostname nor servname provided, or not known
Feb  7 09:41:54 mail postfix/smtpd[62993]: warning: hostname 
2-214-245-216.static.reverse.lstn.net does not resolve to address 
216.245.214.2: hostname nor servname provided, or not known
Feb  7 09:45:50 mail postfix/smtpd[63142]: warning: hostname 
2-214-245-216.static.reverse.lstn.net does not resolve to address 
216.245.214.2: hostname nor servname provided, or not known
Feb  7 09:45:56 mail postfix/smtpd[63142]: warning: hostname localhost does not 
resolve to address 123.31.26.52
Feb  7 10:23:16 mail postfix/smtpd[65615]: warning: hostname 
server.1digitechph.com does not resolve to address 142.4.23.172: hostname nor 
servname provided, or not known


-- 
If you think that Mick Jagger will still be doing the whole rock star
thing at age fifty, well, then, you are sorely, sorely mistaken.

Reply via email to