Re: [AMaViS-user] to address whitelisting

2006-03-01 Thread Richard Bishop

Aaron, all,


Quoting Aaron P. Martinez [EMAIL PROTECTED]:

 Essentially all i want to happen is for amavisd-new or SA to add the
 person our users are sending mail to the whitelist automatically.  I
 don't think we really care if it's using the to header or the rcpt to.

I think there are two ways to achieve this, one being to hack the source of
amavisd around, adding the necessary coding.  Alternatively you could do this
within your MTA...

I have never used Postfix, though with Exim this should be quite straightforward
to achieve using a combination of an 'unseen' router and a pipe transport acting
upon all outgoing mail.

A router matching all outgoing mail originating from your known local domains
would direct the outgoing email to both the destined recipient, as well as to a
script via the ('unseen') pipe transport - unseen just means that delivery
doesn't stop at this point, the message can be processed by other routers.

Routers
---

# Direct all locally sourced email to the whitelist script
whitelist_recip:
driver = accept
transport = whitelist_transport
unseen
...

# Deliver mail normally via SMTP
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
...


Transports
--

# Handle outgoing local mail and send it to the bash script
whitelist_transport:
driver = pipe
command = /usr/local/bin/whitelist_sender.sh
user = mail
...


I realise that this is very exim specific - as I said I've not had any
experience of using postfix, though I'm sure that there must be a way of
achieving the same results.  If somebody with more experience could interpret
my ramblings into postfix lingo?


A bash script would then extract the to:/cc: fields from the outgoing mail,
storing these into a lookup table - though this would probably be easier with
if amavis were using an sql database.  I'm not sure whether amavis can read
whitelists from external flat files - can somebody confirm this?

Of course, you'd have to account for the address having already been previously
whitelisted, and if so, not adding it a second time.  This should be a
straightforward sql/file search operation.

You would probably also want to periodically 'purge' the whitelist, removing
addresses that have not been used in a while.


 Is there a known way to make this happen that i'm missing?

Not natively with the software you are using AFAIK.  I can't see that SA will be
capable of doing this, and as I mentioned above, short of source-hacking, amavis
cannot achieve this.


 Is there a reason this is a bad idea?

If done correctly I believe that this will be quite effective and reliable, as
others have mentioned, this is used by a variety of providers - for example
Hotmail use a very similar system whereby you can add recipients to your
'contacts' list - which are then considered spam whitelisted.



Regards


Richard


-- 




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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/


[AMaViS-user] Re: amavis-stats-0.1.21 no data in domain.com

2006-03-01 Thread Dale Walsh


On Feb 27, 2006, at 04:12 , Joachim Schoenberg wrote:


Hello Dale,

Am Samstag, 25. Februar 2006 02:20 schrieb Dale Walsh:


Amavis-stats looks at the amavisd-new log entries and pulls the
domain name form it.

If you have multi domains and log via syslog you would have entries
like the following (I use mutliple instances of amavisd-new).


[...]


The first three field are the date and time, the fourth field is the
domain name, if all the domain names fields are all the same then you
are not logging additional servers via syslog so you will need to
make other adjustments either by running multiple instances of
amavisd-new (easy to do) or log the other servers via syslog (also
easy to do).


Now I see what amavis-stats is looking for and what my problem is.
I have a relay server here which checks all incoming mail and uses
the postfix transport table to send the mails to the approriate
internal servers then.
So for Amavis all mail seems to be local
(agent-j is my relay server):

Feb 27 00:16:42 agent-j amavis[32475]: (32475-15) Passed CLEAN,  
[217.110.105.70]

[EMAIL PROTECTED] - [EMAIL PROTECTED], Message-ID:
	[EMAIL PROTECTED], mail_id: HPFAXOpQeHNS,  
Hits: -2.356, 1519 ms


Feb 27 00:18:04 agent-j amavis[32517]: (32517-13) Passed CLEAN,  
[87.123.7.149]

[EMAIL PROTECTED] - [EMAIL PROTECTED], Message-ID:
	[EMAIL PROTECTED],  
mail_id: 0nkZ+yIfDAGQ, Hits: -2.373, 756 ms


So for my setup amavis-stats can not do what I expected.


This is incorrect thinking, it certainly can do what you want but  
requires a little work form you.


Have the other server(s) log mail via syslog to this server and you  
will have exactly what you want.



Thank you for the help

Joe


-- Dale



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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/


Re: [AMaViS-user] Database reconnection with PostgreSQL

2006-03-01 Thread Brian Wong
On 2/28/06, Mark Martinec [EMAIL PROTECTED] wrote:
 Brian,

  Can anyone else confirm that reconnection does not work with
  PostgreSQL? Im suspecting that the line:
eval { $self-dbh-begin_work(@_) }; # line 9575 of amavisd 2.3.3
  always returns true for the DBD::Pg module regardless of the state of
  the connection. Therefore constantly making false attempts to store
  sql information with save_info_preliminary() if the connection is
  actually lost.

 Seems like PostgreSQL returns status 7 in such case,
 while MySQL returns either 2006 or 2013.

 Could you please add the '7' to the list in sub execute, e.g.:

 --- amavisd.origMon Aug 22 01:46:15 2005
 +++ amavisd Wed Mar  1 01:27:01 2006
 @@ -9639,8 +9639,11 @@
eval { $sth-execute(@args) };
if ($@ ne '') {
 -my($err) = $@; chomp($err); my($msg) = sql execute: sts=$DBI::err, 
 $err;
 -if (!$sth || ($sth-err ne '2006'  $sth-err ne '2013')) {
 -  die $msg;
 -} else {  # MySQL specific: server has gone away; Lost connection to...
 +my($err) = $@; chomp($err); my($msg) = sts= . $DBI::err . , $err;
 +if (!$sth) {
 +  die sql execute (no handle): .$msg;
 +} elsif ($sth-err ne '2006'  $sth-err ne '2013'  $sth-err ne '7') 
 {
 +  die sql execute: .$msg;
 +} else {  # Server has gone away; Lost connection to...
 +  # MySQL: 2006, 2013;  PostgreSQL: 7
if ($self-{in_transaction}) {
  $self-disconnect_from_sql;

I have no idea what I was thinking when I said it was the begin_work
failing when the logs clearly said it was the execute. Thanks, ill
test this out.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
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/


[AMaViS-user] (no subject)

2006-03-01 Thread oliver
hallo,

i installed amavisd-new two years ago it it worked fine, now i have a new
server Suse 9.3 with sendmail 8.13.3 and amavisd-new with milter...

i want to know how to get it to work, or how to deactivate checking for
outgoing mails because i don´t need it!

i can check fine incomming mails but when users try to send out mails i got
error messages:


Mar  1 14:06:21 gruenxxx sendmail[17604]: k21D6JNx017604:
from=[EMAIL PROTECTED], size=308, class=0, nrcpts=1,
msgid=[EMAIL PROTECTED]
Mar  1 14:06:21 gruenuxxx amavis[16597]: (16597) AM.CL
/var/spool/amavis/amavis-milter-k21D6JNx017604: [EMAIL PROTECTED] -
[EMAIL PROTECTED]
Mar  1 14:06:21 gruenux amavis[16597]: (16597) Checking: [EMAIL PROTECTED] -
[EMAIL PROTECTED]
Mar  1 14:06:22 gruenuxxx amavis[16597]: (16597) Passed CLEAN,
[195.243.149.77] [EMAIL PROTECTED] - [EMAIL PROTECTED], Message-ID: 
4405a23b.
Mar  1 14:06:22 gruenuxxx sendmail[17604]: k21D6JNx017604: Milter change
(add): header: X-Virus-Scanned: by amavisd-new
Mar  1 14:06:24 gruenuxxx sendmail[17613]: k21D6JNx017604: SYSERR(root):
mail.xxx.de. config error: mail loops back to me (MX problem?)
Mar  1 14:06:24 gruenuxxx sendmail[17614]: k21D6M1H017614: gruenuxxx.xxx.de
[195.xxx.xxx.xx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Mar  1 14:06:24 gruenuxxx sendmail[17613]: k21D6JNx017604:
to=[EMAIL PROTECTED], ctladdr=[EMAIL PROTECTED] (1000/100), delay=00:00:03,
xdelay=
Mar  1 14:06:24 gruenuxxx sendmail[17613]: k21D6JNx017604: k21D6ONx017613:
DSN: Local configuration error
--

here is a part of my sendmail.cf:

# Input mail filters
O InputMailFilters=milter-amavis

# Milter options
#O Milter.LogLevel
O Milter.macros.connect=j, _, {daemon_name}, {if_name}, {if_addr}
O Milter.macros.helo={tls_version}, {cipher}, {cipher_bits}, {cert_subject},
{cert_issuer}
O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf},
{auth_author}, {mail_mailer}, {mail_host}, {mail_addr}
O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}
O Milter.macros.eom={msg_id}

Xmilter-amavis, S=local:/var/run/amavis/amavis-milter.sock,
T=S:10m;R:10m;E:10m

-

and here is a part of my amavisd.conf


$forward_method = undef;
$notify_method = 'pipe:flags=q argv=/usr/sbin/sendmail -Am -i -odd -f
${sender} -- ${recipient}';



so please halp me, iam getting cracy!!

thanks

Oliver



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
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/


[AMaViS-user] Sendmail + milter with Suse 9.3 Problem please help

2006-03-01 Thread oliver

hallo,

i installed amavisd-new two years ago it it worked fine, now i have a new
server Suse 9.3 with sendmail 8.13.3 and amavisd-new with milter...

i want to know how to get it to work, or how to deactivate checking for
outgoing mails because i don´t need it!

i can check fine incomming mails but when users try to send out mails i got
error messages:


Mar  1 14:06:21 gruenxxx sendmail[17604]: k21D6JNx017604:
from=[EMAIL PROTECTED], size=308, class=0, nrcpts=1,
msgid=[EMAIL PROTECTED]
Mar  1 14:06:21 gruenuxxx amavis[16597]: (16597) AM.CL
/var/spool/amavis/amavis-milter-k21D6JNx017604: [EMAIL PROTECTED] -
[EMAIL PROTECTED]
Mar  1 14:06:21 gruenux amavis[16597]: (16597) Checking: [EMAIL PROTECTED] -
[EMAIL PROTECTED]
Mar  1 14:06:22 gruenuxxx amavis[16597]: (16597) Passed CLEAN,
[195.243.149.77] [EMAIL PROTECTED] - [EMAIL PROTECTED], Message-ID: 
4405a23b.
Mar  1 14:06:22 gruenuxxx sendmail[17604]: k21D6JNx017604: Milter change
(add): header: X-Virus-Scanned: by amavisd-new
Mar  1 14:06:24 gruenuxxx sendmail[17613]: k21D6JNx017604: SYSERR(root):
mail.xxx.de. config error: mail loops back to me (MX problem?)
Mar  1 14:06:24 gruenuxxx sendmail[17614]: k21D6M1H017614: gruenuxxx.xxx.de
[195.xxx.xxx.xx] did not issue MAIL/EXPN/VRFY/ETRN during connection to MTA
Mar  1 14:06:24 gruenuxxx sendmail[17613]: k21D6JNx017604:
to=[EMAIL PROTECTED], ctladdr=[EMAIL PROTECTED] (1000/100), delay=00:00:03,
xdelay=
Mar  1 14:06:24 gruenuxxx sendmail[17613]: k21D6JNx017604: k21D6ONx017613:
DSN: Local configuration error
--

here is a part of my sendmail.cf:

# Input mail filters
O InputMailFilters=milter-amavis

# Milter options
#O Milter.LogLevel
O Milter.macros.connect=j, _, {daemon_name}, {if_name}, {if_addr}
O Milter.macros.helo={tls_version}, {cipher}, {cipher_bits}, {cert_subject},
{cert_issuer}
O Milter.macros.envfrom=i, {auth_type}, {auth_authen}, {auth_ssf},
{auth_author}, {mail_mailer}, {mail_host}, {mail_addr}
O Milter.macros.envrcpt={rcpt_mailer}, {rcpt_host}, {rcpt_addr}
O Milter.macros.eom={msg_id}

Xmilter-amavis, S=local:/var/run/amavis/amavis-milter.sock,
T=S:10m;R:10m;E:10m

-

and here is a part of my amavisd.conf


$forward_method = undef;
$notify_method = 'pipe:flags=q argv=/usr/sbin/sendmail -Am -i -odd -f
${sender} -- ${recipient}';



so please halp me, iam getting cracy!!

thanks

Oliver



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid0944bid$1720dat1642
___
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/


[AMaViS-user] Re: Per-user subject blacklisting

2006-03-01 Thread Felix Schwarz
Hi Richard,

Richard Bishop schrieb:
 Has anybody else considered such a system? Any advice on how to go
 about implementing it? Any general comments?

I think you are hit by some of the disadvantages of SpamAssassin (many
rules to maintain, most of the times it is not easy adding user
specific rules). This is one of the reason why I am implementing a
DSPAM plugin for amavisd-new and extending amavisd-new with the
ability to choose a spam filter per user.

With DSPAM you would have just different user profiles for customers
and the best thing is that you don't have to evaluate which words will
not appear in legimate email but just train DSPAM it will learn what
you consider as ham/spam.

Unfortunately my work only progresses slowly as I have many other jobs
to do right now (one of these is my thesis...). I try to get the
infrastructure into amavisd-new 3.4 first (per user spam filters)
before actually implementing the DSPAM plugin (which is quite easy).

If you like to do some Perl hacking, I can give you some pointers
which things need to be done next.

If you need a working system NOW, I suggest you train the SpamAssassin
bayes db using sa_learn. I think that will help much if the filter
rate is nearly good enough for you now.

-- 
Felix



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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/


Re: [AMaViS-user] Re: amavis-stats-0.1.21 no data in domain.com

2006-03-01 Thread Shane Hickey
Dale Walsh [EMAIL PROTECTED] [2006-03-01 06:12]:
 This is incorrect thinking, it certainly can do what you want but  
 requires a little work form you.

 Have the other server(s) log mail via syslog to this server and you  
 will have exactly what you want.

What if there aren't any other servers?  I have about 35 domains running 
through one mailserver running amavisd.  I would like to see a breakdown by 
domain on this server.  I think that's what Joe is saying also. 

Shane

-- 
Shane Hickey [EMAIL PROTECTED]: Network/System Consultant
GPG KeyID: 777CBF3F
Key fingerprint: 254F B2AC 9939 C715 278C  DA95 4109 9F69 777C BF3F


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
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/