postfix-users October 2011 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: Re: problem with pipe ${sender} to gnarwl when se

Re: problem with pipe ${sender} to gnarwl when sender has BATV enabled

From: Simeon Ott <simeon.ott_at_nospam>
Date: Sun Oct 02 2011 - 13:39:07 GMT
To: Postfix users <postfix-users@postfix.org>

Thanks Wietse for your help!

On 02.10.2011, at 14:59, Wietse Venema wrote:

> Simeon Ott:
>> On 30.09.2011, at 19:25, Simeon Ott wrote:
>>
>>> hello,
>>>
>>> i recently configured gnarwl autoresponder on my mailserver. the
>> autoresponder works great as long as the sender doesn't use BATV.
>> otherwise the autoresponded message is not delivered to the origin
>> sender. is there a possibility to pipe another attribute then
>> ${sender} in the master.cf?
>>>
>>> here are the relevant configuration parts:
>>> master.cf:
>>> gnarwl unix - n n - - pipe flags=F
>>> user=vmail argv=/usr/bin/gnarwl -a ${user} -s ${sender}
> ...
>> Sep 30 09:22:35 ares postfix/qmgr[23383]: B00CF2C649F: from=<prvs=1254408a08=sender1@senderdomain.com>, size=3407, nrcpt=3 (queue active)
>> Sep 30 09:22:36 ares postfix/pipe[23817]: B00CF2C649F: to=<rcpt1@rcvdomain.com,rcpt1@rcvdomain.com@autoreply.example.com>, relay=gnarwl, delay=0.3, delays=0.09/0.04/0/0.17, dsn=2.0.0, status=sent (delivered via gnarwl service)
>
> The above shows that you provide gnarwl with the BATV-ed envelope
> sender address.
>
> You also mention that gnarwl replies to some different address but
> provide no concrete evidence.

sorry, i have to clarify this.. if you have a look at the following logfile entries, there is some evidence

Sep 30 09:22:41 ares amavis[23081]: (23081-08) Passed CLEAN, <rcpt1@rcvdomain.com> -> <prvs@ares.intra.example.com>, Message-ID: <20110930072235.EE6662C64A7@ares.intra.example.com>, mail_id: Ie+WuC0MyE5S, Hits: -1.901, size: 933, queued_as: F1F592C6101, 5101 ms
Sep 30 09:22:41 ares postfix/smtp[23791]: EE6662C64A7: to=<prvs@ares.intra.example.com>, orig_to=<prvs>, relay=127.0.0.1[127.0.0.1]:10024, delay=5.3, delays=0.17/0/0.01/5.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=23081-08, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as F1F592C6101)
Sep 30 09:22:41 ares postfix/qmgr[23383]: EE6662C64A7: removed
Sep 30 09:22:41 ares postfix/local[23824]: F1F592C6101: to=<prvs@ares.intra.example.com>, relay=local, delay=0.31, delays=0.17/0.05/0/0.09, dsn=5.1.1, status=bounced (unknown user: "prvs")

these are the log entries from gnarwl after the mail is processed. GNARWL tries to send an email to prvs@ares.intra.example.com (localhost) instead of sender1@senderdomain.com. so the value is truncated at the equal sign.

>
> If the sender really looks like
> <rcpt1@rcvdomain.com,rcpt1@rcvdomain.com@autoreply.example.com>
> then that is badly malformed and that should be fixed first.
>

that was indeed a misconfiguration and I fixed it. thank you to point this out.

> To debug gnarwl, take an email message and invoke gnarwl by hand:
>
> $ gnarwl -a rcpt1@whatever -s prvs=whatever@whatever < email-message-file
>
> Then, observe what happens. If it does not reply to the sender
> that you specify, then gnarwl is mis-configured or broken.
>
> Wietse

i invoked gnarwl by hand and the same thing happend. it sends an email to <prvs> instead of whatever@whatever. i can't change this behavior in gnarwl that's why i was looking for another solution to pass the senders email address instead of the batv-ed envelope from. any suggestions?