On Wed, Nov 18, 2009 at 12:34 PM, Wietse Venema <wie...@porcupine.org> wrote:
>> far, but I am getting a "mail loops back to myself" error.
>
> It means that the recipient domain resolves to a local address.
>
> Unfortunately you ignored instructions in the mailing list welcome
> message, and therefore there is no more concrete answer.

My apologies, trying again. The recipient domain does not map to this
machine, as near as I can tell. This machine hosts mail for users
@scribd.com. I am sending mail to i...@ianduggan.net, through this
server.

I am trying to configure postfix to work as follows:

1) In a header_check, look for a header "X-Vmta: n" where n is some number.
2) Based on n, choose an outgoing smtp transport (bound to some ip)

Basically I want postfix to choose the outgoing IP based on a header
that can be placed within the message. I am getting a "mail loops back
to myself" error, however.

The log output produced during the send is this:

Nov 18 15:19:22 mail01 postfix/cleanup[3242]: D9024B689D2: filter:
header X-Vmta: 2 from unknown[192.168.100.114];
from=<donotre...@scribd.com> to=<test.scr...@gmail.com> proto=SMTP
helo=<raptor.local>: vmta2:
Nov 18 15:19:22 mail01 postfix/smtp[3333]: D9024B689D2:
to=<test.scr...@gmail.com>, relay=none, delay=0.05, delays=0.05/0/0/0,
dsn=5.4.6, status=bounced (mail for mail01.scribd.com loops back to
myself)

header_checks is here:

header_checks:
 /^X-Vmta.*1$/   FILTER vmta1:
 /^X-Vmta.*2$/   FILTER vmta2:
 /^X-Vmta.*3$/   FILTER vmta3:
 /^X-Vmta.*4$/   FILTER vmta4:
 /^X-Vmta.*5$/   FILTER vmta5:

Postfinger output:

[r...@mail01 postfix]# postfinger
postfinger - postfix configuration on Wed Nov 18 15:26:55 CST 2009
version: 1.30

Warning: postfinger output may show private configuration information,
such as ip addresses and/or domain names which you do not want to show
to the public.  If this is the case it is your responsibility to modify
the output to hide this private information.  [Remove this warning with
the --nowarn option.]

--System Parameters--
mail_version = 2.5.1
hostname = mail01.scribd.com
uname = Linux mail01.scribd.com 2.6.18-128.el5 #1 SMP Wed Jan 21
10:41:14 EST 2009 x86_64 x86_64 x86_64 GNU/Linux

--Packaging information--
looks like this postfix comes from RPM package:
postfix-2.5.1-1.mysql.sasl2.vda.rhel5

--main.cf non-default parameters--
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
bounce_queue_lifetime = 3d
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
html_directory = /usr/share/doc/postfix-2.5.1-documentation/html
mailbox_size_limit = 1000000000
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 100000000
milter_default_action = accept
mydestination = mail01.scribd.com, localhost, mail01.local, localhost.scribd.com
mynetworks = 192.168.0.0/16, 10.0.0.0/8, 127.0.0.0/8, 87.228.12.149
myorigin = scribd.com
newaliases_path = /usr/bin/newaliases.postfix
non_smtpd_milters = inet:localhost:10099
readme_directory = /usr/share/doc/postfix-2.5.1-documentation/readme
recipient_delimiter = +
sendmail_path = /usr/sbin/sendmail.postfix
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname,
reject_invalid_hostname, permit
smtpd_milters = inet:localhost:10099
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination,
reject_invalid_hostname, reject_non_fqdn_hostname,
reject_non_fqdn_sender, reject_non_fqdn_recipient,
reject_unknown_sender_domain, reject_unknown_recipient_domain,
check_policy_service inet:127.0.0.1:60000, permit
transport_maps = hash:/etc/postfix/transport
virtual_alias_domains = scribd.com, ipaper.scribd.com
virtual_alias_maps = hash:/etc/postfix/virtual

--master.cf--
smtp      inet  n       -       n       -       -       smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
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
fast      unix  -       -       n       -       50      smtp
vmta1     unix  -       -       n       -       -       smtp -o
smtp_bind_address=87.228.12.149
vmta2     unix  -       -       n       -       -       smtp -o
smtp_bind_address=174.66.250.36
vmta3     unix  -       -       n       -       -       smtp -o
smtp_bind_address=174.66.250.37
vmta4     unix  -       -       n       -       -       smtp -o
smtp_bind_address=174.66.250.38
vmta5     unix  -       -       n       -       -       smtp -o
smtp_bind_address=174.66.250.39
relay     unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
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

-- end of postfinger output --


--Ian

Reply via email to