Luis,

> i am using pgsql to manage my mail server, and i can't get amavis to
> work with that.
>
> the how-to i followed is for mysql:
> http://workaround.org/articles/ispmail-sarge/
>
> so he has this:
> 'SELECT "Y" as local FROM domains WHERE CONCAT("@",domain) IN (%k)';
>
> in may talks,

Note that the following claim in the referenced document is wrong
(the last statement of it):

  AMaViS needs to know which domains are hosted on your server.
  When an email passes the mail server this setting is used to determine
  if the email is outgoing (sent by your system) or incoming (sent by someone
  on the internet). Outgoing email will not be scanned for viruses or spam.

A recipient matching or not matching local_domains does not affect
if virus and spam is checked, it only affects insertion of spam-related
header fields, modifying subject and appending address extensions.

To turn off spam and virus checks the controls are
@bypass_virus_checks_maps and @bypass_spam_checks_maps
(and related lookup tables). You may want to notify the author
of the document.

> i adopted this for pgsql: 
>
> $sql_select_policy = "SELECT 'Y' as local FROM mail_domains WHERE
> '@'||domain IN (%k)";

> lookup_sql: -1, called with 3 bind variables when 0 are needed

You did the quoting incorrectly, your assignment leaves the following string
in variable $sql_select_policy:

SELECT 'Y' as local FROM mail_domains WHERE '||domain IN (%k)

Note that Perl does $xxx and @xxx variable interpolations in "..." strings
but not in '...' strings. You need to use \@ instead of a plain @ in doubly 
quoted strings unless your intention is to obtain a value of a variable @'

  Mark


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
AMaViS-user mailing list
[email protected]
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