Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

second postfix instance over amavis loop?

0 views
Skip to first unread message

Achim Altmann

unread,
Dec 8, 2003, 11:12:25 AM12/8/03
to
hello,

i have postfix 2.0.16 with a second instance
und have also configured transport-ways once to
amavisd==>second-postfix
and the other way ist
direct to the second instance

But if comes a mail in then gives an loop


The first instance listen on port 25 and the second instance on port 26
amavisd-new listen on [127.0.0.1]:10024 on have an forward-entry to
smtp:[127.0.0.1]:26

The first postfix/main.cf have an transport_maps
like
domainwithamavis.de smtp:[127.0.0.1]:10024
domainwithoutamavis.de smtp:[127.0.0.1]:26

if i send a mail directly from localhost to port 10024 then she would be
delivered
if i send a mail to port 26 the would be to

if send a mail on port 25 the gives an loop

The amavisd.log have this log-entrys

The following log-entrys are from an test-server you can't find the
domain domainwithamavis.de .....


8 17:00:26 cg-fs.com-gate.in amavisd[28922]: (28922-08) FWD via SMTP:
[127.0.0.1:26] <ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com>
Dec 8 17:00:26 cg-fs.com-gate.in amavisd[28922]: (28922-08) Passed,
<ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com>, Message-ID:
<200312081600...@smtp.comgate.homelinux.com>, Hits: 0
Dec 8 17:00:26 cg-fs.com-gate.in amavisd[28963]: (28963-05)
ESMTP::10024 /tmp/amavis-20031208T170015-28963:
<ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com> Received:
SIZE=11996 from smtp.comgate.homelinux.com ([127.0.0.1]) by localhost
(cg-fs.com-gate.in [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id
28963-05 for <achim.comgate...@smtp.comgate.homelinux.com>;
Mon, 8 Dec 2003 17:00:26 +0100 (CET)
Dec 8 17:00:26 cg-fs.com-gate.in amavisd[28963]: (28963-05) Checking:
<ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com>
Dec 8 17:00:26 cg-fs.com-gate.in amavisd[28963]: (28963-05) cached
a5ab1f5a887a07bd86510c9d5f5674d5 from <ro...@smtp.comgate.homelinux.com>
(0,1,1)
Dec 8 17:00:27 cg-fs.com-gate.in amavisd[28963]: (28963-05) FWD via
SMTP: [127.0.0.1:26] <ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com>
Dec 8 17:00:27 cg-fs.com-gate.in amavisd[28963]: (28963-05) Passed,
<ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com>, Message-ID:
<200312081600...@smtp.comgate.homelinux.com>, Hits: 0
Dec 8 17:00:27 cg-fs.com-gate.in amavisd[28922]: (28922-09)
ESMTP::10024 /tmp/amavis-20031208T165637-28922:
<ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com> Received:
SIZE=12806 from smtp.comgate.homelinux.com ([127.0.0.1]) by localhost
(cg-fs.com-gate.in [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id
28922-09 for <achim.comgate...@smtp.comgate.homelinux.com>;
Mon, 8 Dec 2003 17:00:27 +0100 (CET)
Dec 8 17:00:27 cg-fs.com-gate.in amavisd[28922]: (28922-09) Checking:
<ro...@smtp.comgate.homelinux.com> ->
<achim.comgate...@smtp.comgate.homelinux.com>
Dec 8 17:00:27 cg-fs.com-gate.in amavisd[28922]: (28922-09) cached
a5ab1f5a887a07bd86510c9d5f5674d5 from <ro...@smtp.comgate.homelinux.com>
(0,1,1)

I think the forward-method from amavisd is ok or ?

her is the postfix.log

7.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=28989-04, from MTA: 250
Ok: queued as 53BAB21015)
Dec 8 17:01:13 cg-fs postfix/smtpd[28957]: connect from
p508C8C21.dip0.t-ipconnect.de[80.140.140.33]
Dec 8 17:01:13 cg-fs postfix/smtpd[28957]: D32A65511B:
client=p508C8C21.dip0.t-ipconnect.de[80.140.140.33]
Dec 8 17:01:13 cg-fs postfix/cleanup[28941]: D32A65511B:
message-id=<200312081600...@smtp.comgate.homelinux.com>
Dec 8 17:01:13 cg-fs postfix/nqmgr[27792]: D32A65511B: from=<>,
size=28636, nrcpt=1 (queue active)
Dec 8 17:01:13 cg-fs postfix/smtpd[28957]: disconnect from
p508C8C21.dip0.t-ipconnect.de[80.140.140.33]
Dec 8 17:01:13 cg-fs postfix/smtp[28956]: 53BAB21015:
to=<achim.comgate...@smtp.comgate.homelinux.com>,
relay=comgate.homelinux.com[80.140.140.33], delay=0, status=sent (250
Ok: queued as D32A65511B)
Dec 8 17:01:14 cg-fs postfix/smtpd[28949]: connect from
localhost.localdomain[127.0.0.1]
Dec 8 17:01:14 cg-fs postfix/smtpd[28949]: 7C6AE2101D:
client=localhost.localdomain[127.0.0.1]
Dec 8 17:01:14 cg-fs postfix/cleanup[28950]: warning: 7C6AE2101D:
skipping further client input
Dec 8 17:01:15 cg-fs postfix/smtpd[28949]: disconnect from
localhost.localdomain[127.0.0.1]
Dec 8 17:01:15 cg-fs postfix/smtp[28944]: D32A65511B:
to=<achim.comgate...@smtp.comgate.homelinux.com>,
relay=127.0.0.1[127.0.0.1], delay=2, status=bounced (host
127.0.0.1[127.0.0.1] said: 554 5.6.0 Failed, id=28976-08, from MTA: 554
Error: too many hops (in reply to end of DATA command))


Any ideas ?

many thanks for any help

regards Achim

Victor....@morganstanley.com

unread,
Dec 8, 2003, 12:49:16 PM12/8/03
to
On Mon, 8 Dec 2003, Achim Altmann wrote:

> hello,
>
> i have postfix 2.0.16 with a second instance
> und have also configured transport-ways once to
> amavisd==>second-postfix
> and the other way ist
> direct to the second instance
>


What do you mean by a "Postfix instance"? The correct meaning is a
complete configuration directory, separate main/master.cf, separate queue
directory...

--
Viktor.

Achim Altmann

unread,
Dec 8, 2003, 2:06:23 PM12/8/03
to
Hello,


Victor....@morganstanley.com schrieb:

Yes, i have installed a seperate config-directory and spool-directory
like /var/spool/postfix-out and /etc/postfix-out/
The second instance listen on localhost:26

Regards Achim


Victor....@morganstanley.com

unread,
Dec 8, 2003, 2:44:47 PM12/8/03
to

Make sure the second instance has a different transport table (to avoid
the loop).

--
Viktor.

Achim Altmann

unread,
Dec 8, 2003, 3:37:46 PM12/8/03
to
Hello,


>Make sure the second instance has a different transport table (to avoid
>the loop).
>

Sorry, i don't understood this

"different transport table"
The only transport in the second instance is
mailbox_transport =3D cyrus

I don't have a transport_maps entry in the second instance

If isn't so, if a mail send (from the commandline like telnet localhost <=
port>)to =20

port 10024 (amavis is listening and forward this to the second instance=20
localhost:26) and the mail-delivery is ok then is the problem to find=20
in the first insance?

Regards Achim

>
> =20
>

--=20
_________________________________________
Fa. Com-Gate
An der Hofwiese 30
90427 N=FCrnberg

Tel. : +49 (0)911 / 277 43 77
Fax : +49 (0)911 / 274 11 878
Mobil: +49 (0)172 / 834 56 26
Mail : a...@com-gate.com
WWW : http://www.com-gate.com


Achim Altmann

unread,
Dec 8, 2003, 6:32:42 PM12/8/03
to
Hello,

>How does the second instance know what to do with the mail? Perhaps it
>just uses MX records to punt the messages back to the first instance.
>
MX-records ?

This second instance have a lookup-table for hostet domains and accounts
This main.cf is the same like /etc/postfx/main.cf and this main.cf runs
fine without second instance
Maybe is this a problem that i use in the first instance
the
mydestination = $myhostname, mysql:/etc/postfix/mysql-mydestination.cf
virtual_alias_maps = hash:/etc/postfix/virtual
mysql:/etc/postfix/mysql-virtual.cf
sender_canonical_maps = mysql:/etc/postfix/mysql-canonical.cf

I use this entrys in booth main.cf but i think this is only use if is needed

> I
>suggest you use different "syslog_name" settings for the two instances, so
>you can tell the logs for the two instances apart.
>
>
ok now i have configured a second logfile for the second instance

The only once what could i find is,
the mail go back to the first instance and in the forst logfile
i have this entrys

/var/log/maillog (first instance)
Dec 8 23:44:15 alpha1 postfix/nqmgr[26628]: D2A911C00081:
from=<kubi...@freenet.de>, size=1536, nrcpt=1 (queue active)
Dec 8 23:44:16 alpha1 postfix/smtp[26679]: D2A911C00081:
to=<aa.com-...@smtp.com-gate.com>, orig_to=<a...@com-gate.com>,
relay=127.0.0.1[127.0.0.1], delay=2, status=sent (250 2.6.0 Ok,
id=26580-01, from MTA: 250 Ok: queued as 7D3501C04B7)

/var/log/amavis.log
Checking: <kubi...@freenet.de> -> <aa.com-...@smtp.com-gate.com>
Dec 8 23:44:21 alpha1.com-gate.com amavisd[26580]: (26580-05) cached
362cf61d28344042115711f1e52be153 from <kubi...@freenet.de> (0,1,1)
Dec 8 23:44:21 alpha1.com-gate.com amavisd[26580]: (26580-05) FWD via
SMTP: [localhost:26] <kubi...@freenet.de> ->
<aa.com-...@smtp.com-gate.com>
Dec 8 23:44:22 alpha1.com-gate.com amavisd[26580]: (26580-05)
Not-Delivered,
<kubi...@freenet.de> -> <aa.com-...@smtp.com-gate.com>,
Message-ID: <E1ATU6w-...@www4.emo.freenet-rz.de>, Hits: -12.9

/var/log/maillog2 (second instance)
" in the second instance i couldn't find the orig_to=<a...@com-gate.com>,


Dec 8 23:44:16 alpha1 maillog2/cleanup[26683]: 7D3501C04B7:
message-id=<E1ATU6w-...@www4.emo.freenet-rz.de>
Dec 8 23:44:16 alpha1 maillog2/smtpd[26682]: disconnect from
localhost[127.0.0.1]
Dec 8 23:44:16 alpha1 maillog2/nqmgr[26492]: 7D3501C04B7:
from=<kubi...@freenet.de>, size=2354, nrcpt=1 (queue active)
Dec 8 23:44:16 alpha1 maillog2/smtp[26692]: 7D3501C04B7:
to=<aa.com-...@smtp.com-gate.com>,
relay=smtp.com-gate.com[80.190.226.52], delay=0, status=sent (250 Ok:
queued as 95A1B1C00081)

Regards achim

Victor....@morganstanley.com

unread,
Dec 8, 2003, 7:18:06 PM12/8/03
to
On Tue, 9 Dec 2003, Achim Altmann wrote:

> Hello,
>
>
>
> >How does the second instance know what to do with the mail? Perhaps it
> >just uses MX records to punt the messages back to the first instance.
> >
> MX-records ?
>

If you don't know what an MX record is, give up now and go read some books
about how Internet email works.

> Dec 8 23:44:16 alpha1 postfix/smtp[26679]: D2A911C00081:
> to=<aa.com-...@smtp.com-gate.com>, orig_to=<a...@com-gate.com>,
> relay=127.0.0.1[127.0.0.1], delay=2, status=sent (250 2.6.0 Ok,
> id=26580-01, from MTA: 250 Ok: queued as 7D3501C04B7)
>

> Dec 8 23:44:16 alpha1 maillog2/smtp[26692]: 7D3501C04B7:
> to=<aa.com-...@smtp.com-gate.com>,
> relay=smtp.com-gate.com[80.190.226.52], delay=0, status=sent (250 Ok:
> queued as 95A1B1C00081)
>

This is a loop. Once you understand why, configure a transport table in
the second instance to deliver the mail to the correct destination. In
some cases (with Postfix 2.0) setting address classes correctly is enough,
see ADDRESS_CLASS_README for details.

I am out of here. Good luck.

--
Viktor.

0 new messages