sa_userconf_maps and sa_username_maps syntax question

Matt Goodman matt at
Sun Sep 11 11:21:19 CEST 2011

For the @sa_username_maps I have the following provided by Florin:

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

As he pointed out, he uses only a single domain on his mail server and this
expression maps the 'user' portion user at and sends that as the SA
username. How would I modify this so that I pass 'user at' as the SA
user? I've got the SQL portion up and running, I just don't have the
username maps set up properly. I've been trying for a few days to figure out
how to do this but I am unsure :(

Any insight would be appreciated.


-----Original Message-----
From: at
[ at] On Behalf Of Mark
Sent: Friday, September 09, 2011 2:36 PM
To: amavis-users at
Subject: Re: sa_userconf_maps and sa_username_maps syntax question


> I understand that it's more efficient, but, in some scenarios you 
> *need* to need user the powers to select their own required_score. 
> That was the reason i wrote that patch.

Makes sense, although I'd probably want to reverse the logic:
if a lookup on @spam_tag2_level_maps returns undef, then fall back to a
default 'required_hits' as provided by a SpamAssassin's config.

This way it will remain backwards compatible with existing configurations.

> Do you see any real problem on the changed i made? I mean, do you 
> think it could break something?

Probably not.

> And since amavisd-new is a one-file program, and this is a really big 
> file, do you consider applying this patch if it don't break anything? 
> I'm asking because maintain a custom patch for a so big file is a hard 
> task sometimes.

Sure, after reversing the logic.


More information about the amavis-users mailing list