sa_userconf_maps and sa_username_maps syntax question

Matt Goodman matt at
Fri Sep 2 06:51:25 CEST 2011

Thank you very much for your reply. I understand a little bit better now. However, in example one below you listed a single domain name using the method ‘sql’. What if I have dozens of domains, with them being added/removed somewhat regularly by Postfix Admin (I can perceive adding at least 1-2 domains per month) to this system. Isn’t there a way to tell amavisd-new that all domains in the lookup_sql_dsn? The table is actually called ‘domain’ inside the ‘postfixadmin’ db. 


For @sa_username_maps – I do not understand the syntax of that at all. Could you explain it in just a little more detail so I actually understand what’s being done, as opposed to just copying your example. Many thanks.


Thank you for the link to the patch, that will be helpful. And yes I have followed the SpamAssassin SQL README and have my db schema as-per those documents. A table called ‘userpref’ with one line per SA preference. I have even tested this using spamc and validated that the SQL configuration is good.


I am just a little lost as to the @sa_username_maps syntax (looks like regex to me), and I will read through the patch to try and determine what amavisd-new is looking for. In the meantime, if someone can help me understand how one might use all the domains in the postfixadmin table instead of one domain per line of @sa_userconf_maps, that would be helpful.




Sent: Thursday, September 01, 2011 11:21 AM
To: Matt Goodman
Subject: Re: sa_userconf_maps and sa_username_maps syntax question


Hello Matt,

For sql user_prefs ( per user config )::

I had to add

1. @sa_userconf_maps = (
          '' => 'sql:',

@sa_username_maps = new_RE (
  [ qr'^([^@]+ at .*)'i => '${1}' ]

2. this patch 

  You have to read about SPAMMASSASSIN SQL userprf to know howto setup database and userpref table.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the amavis-users mailing list