List Info

Thread: penpals triggered on outbound, not inbound.




penpals triggered on outbound, not inbound.
country flaguser name
United States
2007-09-07 17:44:14
I know this must be something I've overlooked as it just
seem so 
silly that penpals would work in reverse order.

All outbound email from my location sends through a SMTP
server which 
forwards to the AMAVIS filtering server before leaving the 
network.  Inbound email comes into the AMAVIS server, and
once 
reviewed by amavis is forwarded to the SMTP server for
POP3/IMAP access.

In this setup, there are thousands of domains being scanned,
and 
amavis as well as postfix utilize a mysql db to determine
where to 
forward the email after it's scanned via a postfix transport

table.  With this setup, I typically leave mynetworks and 
local_domains_maps undefined and the setup works
great.

I am experimenting with penpals now and when I activate it
with my 
current config it seems to only log a penpals scan on one in
every 
few thousand messages.  Even messages which the SQL
statement should 
hit (and does hit if i run the SQL statement by hand) are
ignored by 
amavis for penpals purposes.  I modified my mynetworks and 
local_domains_maps to have valid data for the local
network and my 
test domain I'm working with.  The results of this caused
all 
outbound email from anywhere in mynetworks to get penpals
attributes 
checked when the sql statement returned data; however, no
inbound 
email would ever produce penpals log entries.

Of course my goal is for penpals to mark incoming emails,
not outgoing.

Do these symtoms ring any familiar bells for anyone that
might point 
out where i goofed?

Thanks,

- Nate


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

Re: penpals triggered on outbound, not inbound.
country flaguser name
Slovenia
2007-09-07 19:22:47
Nate,

> In this setup, there are thousands of domains being
scanned, and
> amavis as well as postfix utilize a mysql db to
determine where
> to forward the email after it's scanned via a postfix
transport
> table.  With this setup, I typically leave mynetworks and
> local_domains_maps undefined and the setup works
great.

This does not allow amavisd to distinguish between
incoming,
outgoing, and internal mail.  Depending on your intended
use
of features, this may or may not be important.

> I am experimenting with penpals now and when I activate
it with my
> current config it seems to only log a penpals scan on
one in every
> few thousand messages.  Even messages which the SQL
statement should
> hit (and does hit if i run the SQL statement by hand)
are ignored by
> amavis for penpals purposes.  I modified my mynetworks and
> local_domains_maps to have valid data for the local
network and my
> test domain I'm working with.  The results of this
caused all
> outbound email from anywhere in mynetworks to get penpals
attributes
> checked when the sql statement returned data;

Yes, this is normal. Inbound, and internal-to-internal mail
is checked for pen pals, matching it to a previous mail
originating from inside.

> however, no inbound email would ever produce penpals
log entries.

Is not even checked, or just does not find a matching record
in a database?

Turn up log level to 4 and grep the log for a string
'penpals:' .
(the more important of these log entries are at log level 2,
one is
at level 3, the rest is at 4; log level 5 would also show
SQL clauses
being executed).

> Of course my goal is for penpals to mark incoming
emails, not outgoing.

Incoming and internal is supposed to be checked, outgoing
not.

> Do these symtoms ring any familiar bells for anyone
that might point
> out where i goofed?

- all recipients matching local_domains_maps (except
when sender is the
  same as recipient) should result in a penpals SQL query;

- for a query to match some previous mail in the opposite
direction,
  that mail must have exactly matching sender and recipient
address
  (swapped), or at least have a matching previous sender
_and_
  and match on Message-ID. Make sure virtual_alias_maps and
canonical
  (when used) is not causing mismatches.

- to save cycles, a ham message with low spam score which
does not need
  pen pals help is not checked, and on the other extreme, an
high
  scoring spam which would not have a chance of being saved
  even by a maximum pen pals contribution, is not checked
either.
  To override these two optimization steps for test
purposes, set:
    $penpals_threshold_low = undef;
    $penpals_threshold_high = undef;

- one additional condition: unauthenticated senders from
outside (i.e.
  not having IP matching mynetworks) _and_ using a
local domain address
  do not receive a pen pals bonus. Make sure your mynetworks is correct. 


Mark

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

Re: penpals triggered on outbound, not inbound.
country flaguser name
Slovenia
2007-09-07 19:29:02
Nate,

> Of additional note, when I add a little more debugging
code to
> amavisd in the penpals sections, it seems regardless if
a domain is
> local or not (or even in cases where local_domain_maps is undefined
> i find the following:
>
> lookup(0,$sender,{ca('local_domains_maps')})  ALWAYS
returns Y
>
> This is a result of having a wildcard (.) entry
in my mysql users
> table which specifies . as local.

Which means that all mail is considered inbound or
internal-to-internal.

> By changing this to N in the database, it seems to have
solved the
> majority of my issue.

Assuming you have all your domains listed in a SQL table
'users',
this gives you what is needed.

  Mark

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

Re: penpals triggered on outbound, not inbound.
country flaguser name
United States
2007-09-07 19:54:04
At 05:29 PM 9/7/2007, Mark Martinec wrote:

> > Of additional note, when I add a little more
debugging code to
> > amavisd in the penpals sections, it seems
regardless if a domain is
> > local or not (or even in cases where local_domain_maps is undefined
> > i find the following:
> >
> > lookup(0,$sender,{ca('local_domains_maps')})
 ALWAYS returns Y
> >
> > This is a result of having a wildcard (.) entry
in my mysql users
> > table which specifies . as local.
>
>Which means that all mail is considered inbound or
internal-to-internal.
>
> > By changing this to N in the database, it seems to
have solved the
> > majority of my issue.
>
>Assuming you have all your domains listed in a SQL table
'users',
>this gives you what is needed.


I either have domain entries or individual user entries in
the users 
table with local as Y.  All other users should fall into the
wildcard 
.
category and not be scanned for spam or penpals.  I think
this 
accomplishes it all and doesn't leave any holes of
coverage.

- Nate


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
AMaViS-user mailing list
AMaViS-userlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amavis-user

AMaViS-FAQ:http://www.amav
is.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/ho
wto/

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )