Stefan,

> I am using amavisd-new-2.6.1 with SQL lookup and SQL storage.
>
> Received mails are recorded in the table "msgs". This table has
> a field "policy" where I would expect the policy used for handling
> this mail.

I admit it can be confusing to use a similar term for two different
things. The comment by the field makes it a bit more clear:

  policy varchar(255) DEFAULT '',   -- policy bank path (like macro %p)

So this is a name of a policy bank (affects message as a whole),
and not a SQL table 'policy' or its id, which is JOINed with table 'users'
to associate per-recipient parameters with each recipient record
in table 'users'.

> Concerning this I am a little bit confused:
> (1) For all my mails this field is ALWAYS empty,

It could contain something like MYNETS or maybe ORIGINATING/MYNETS
or some other policy bank name, if some policy bank is loaded.
If there were more than one policy bank loaded, all their names would
be listed in the order they were loaded, separated by a slash.

> but I have some 
>     entries in the "policy" table and some entries in the "users"
>     table refering to them (and the usage of these policies really
>     works)

Unrelated.

> (2) As far as I understood the used policy depends on the recipient
>     address, so the field "policy" would have to go into table
>     "msgrcpt" and not "msgs", because it may be different for
>     each recipient of a multi-recipient message.

Misunderstanding, sorry, but now it's too late to change terminology.

> Is there something I can do to achieve the behaviour I expect
> (and would be glad to have ;-))?

So you'd want a copy of users.policy_id to end up in table
msgrcpt (not msgs). That would be possible, but hasn't been provided
because it would be rather redundant: if you are interested in this
id you can repeat a query on SQL lookup tables with a given recipient
e-mail address.

  Mark

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/amavis-user 
 AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 
 AMaViS-HowTos:http://www.amavis.org/howto/ 

Reply via email to