Hello,

Yes, I added to check recipient and check data earlier. I see in logs,
that I get queue id, but I get the same error.

Then I checked code and found, that session data are updated only in RCPT
state. In DATA state no data are updated, so, it is impossible to find
session. a) You cannot get queueid in RCPT state, so you update is bad. b)
You cannot update in DATA state, because policyd updates session data only
in rcpt state.

I changed to update data from RCPT to DATA in code (just for test), and I
got error like this:

Oct 28 22:37:40 server amavis[10523]: (10523-01) (!)custom process_policy
error: Can't call method "get" on an undefined value at
/usr/lib/policyd-2.1/awitpt/cache.pm line 256, <GEN8> line 16.

So, revision should be done in amavisd+policyd integration..

I have chosen policyd from several policy softwares because of amavisd
support...and it would be great to have it working.

Kind regards,
V

 > On 10/31/11 11:09, V wrote:
>> Hello,
>>
>> Could somebody help with woth problems integratings amavisd + policyd
>> (the
>> 2.1 latest git snapshot (20111027).
>>
>> I get such error in logs:
>>
>> Oct 28 20:09:28 server amavis[27100]: (27100-01) (!!)[TRACKING] ERROR:
>> No
>> session data
>> Oct 28 20:09:28 server amavis[27100]: (27100-01)
>> (!)policyd/process_policy: No session data found
>>
>> I debuged, and found, that this is problem of getSessionDataFromQueueID.
>> This request could not get data, because QueueID is allways empty. And
>> QueueID is not updated. As I suppose, QueueID is taken from queue_id. I
>> checked for possible solutions, and found answer from Wietse (postfix
>> developer), that queue ID does not exist until AFTER Postfix accepts the
>> first recipient. So, this policyd could not by used at
>> smtpd_recipient_restrictions state, when using with amavisd.
>>
>> Could somebody fix that issue? As I have read, Wietse said, that
>> smtpd_recipient_restrictions postfix sends a semi-unique ID to the
>> policy
>> server that identifies each MAIL FROM command. Maybe it could be used
>> here?
>>
>> Besides, maybe there is bug in: amavisd-policyd.pm
>>
>> By default it has:
>> $self->{'dbh'} = awitpt::db::dbilayer::Init($self);
>>
>> But I get errors like:
>> [CORE] WARNING: Failed to Initialize: awitpt::db::dbilayer::Init(108):
>> Server name undefined (26278)
>>
>> So I changed it to:
>> $self->{'dbh'} = awitpt::db::dbilayer::Init($self,'cbp');
>>
>> So, it should be fixed as well.
>>
>> Besides, why in dev snapshot I found @TP@ appended in a lot of places
>> (like @TP@session_tracking, and not just session_tracking in selects)
>>
>> Kind regards,
>> V
>
> Did you add policyd  check_policy to your DATA stage?
>
> -N
>
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.policyd.org/mailman/listinfo/users
>


_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users

Reply via email to