Re: [AMaViS-user] Can't Get Headers or Subject Rewritten

2010-01-16 Thread Daniel Luttermann
Casey,

> I'm sure this is a simple problem, but I can't find the solution.  Hopefully
> someone here could point me in the correct direction to find a solution.

> I've built a new mail server, basically replicating a system I had operating
> for 3 years.  I'm using postfix/amavisd-new/spamasassin system on a brand new
> Debian Lenny (stable) installation.  

> Previously, I had setup up amavis and postfix to forward all spams to a
> separate eMail account, and to add the subject "SPAM" and the spam value in
> the header (This makes it easy to sort by spam severity and isolate the
> occasional ham from the spam.)   


> With my new setup, however, the subject line does not get re-written and I
> cannot additional headers into the checked eMails.   


> Other than the inability to add custom headers, however, everything works
> perfectly.  (ie: spam is correctly identified and isolated in the appropriate
> eMail account.)


> In accordance with the Debian way of doing things, I've changed the file
> /etc/amavis/conf.d/50-user to add the following items:

> $sa_tag_level_deflt  = undef; 
> $sa_tag2_level_deflt = 2.5;
> $sa_kill_level_deflt = 2.5;
> $sa_dsn_cutoff_level = undef;  
> $sa_spam_subject_tag = "SPAM! _SCORE_ (_REQD_)";   
> $final_spam_destiny = D_DISCARD;# Was D_BOUNCE;
> $spam_quarantine_to  = 's...@nerdworld.org';  
> $virus_quarantine_to = 'vi...@nerdworld.org'; 
> $X_HEADER_TAG = 'X-Virus-Scanned';   

Maybe it helps when you add

$X_HEADER_LINE = "$myproduct_name at $mydomain";

in 50-user too?


> Here are examples of the the spam headers added to the quarantined eMails when
> I sent myself a test spam:


> Return-Path: 
>  X-Original-To: s...@nerdworld.org
>  Delivered-To: s...@nerdworld.org
>  Received: from localhost (localhost [127.0.0.1])
>  by VMailServer.NerdWorld.org (Postfix) with ESMTP id 6235D5DE7E
>  for ; Sat, 16 Jan 2010 13:06:46 -0500 (EST)
>  X-Envelope-From: 
>  X-Envelope-To: 
>  X-Envelope-To-Blocked: 
>  X-Quarantine-ID: 
>  X-Spam-Flag: YES
>  X-Spam-Score: 998.641
>  X-Spam-Level: 
> 
>  X-Spam-Status: Yes, score=998.641 tag=x tag2=2.5 kill=2.5
>  tests=[ALL_TRUSTED=-1.44, AWL=0.081, GTUBE=1
> Received: from VMailServer.NerdWorld.org ([127.0.0.1])
>  by localhost (VMailServer.NerdWorld.org [127.0.0.1]) (amavisd-new,
> port 10024)
>  with ESMTP id kHEBix-KePDD for ;
>  Sat, 16 Jan 2010 13:06:45 -0500 (EST)
>  Received: from m5.localnet (M5.NerdWorld.org [192.168.1.100])
>  by VMailServer.NerdWorld.org (Postfix) with ESMTPSA id D5ECC5DE5D
>  for ; Sat, 16 Jan 2010 13:06:45 -0500 (EST)
>  From: Casey Bralla 
>  Organization: The NerdWorld Organisation
>  To: Mr J R Casey Bralla 
>  Subject: SDpam Testing
>  Date: Sat, 16 Jan 2010 13:05:41 -0500
>  User-Agent: KMail/1.12.4 (Linux/2.6.32-gentoo-r1; KDE/4.3.4; x86_64; ; )
>  MIME-Version: 1.0
>  Content-Type: Text/Plain;
>charset="us-ascii"
>  Content-Transfer-Encoding: 7bit
>  Message-Id: <201001161305.41481.ca...@nerdworld.org>
>  X-Length: 1900
>  X-UID: 25190


> Notice that the X-Virus-Scanned message never gets added, and the subject line
> does not change to add the spam score.

It's not possible with amavisd to add the spam score in the subject
line as with spamassassin. The header edits is done by amavisd and
ther's no config option or else to add the score in the subject line.

The subject is only rewritten if mail is passed to the recipient. If
mail gets quarantained then the subject is not rewritten.

When you set D_PASS as final_spam_destiny or you increase the kill
level and the mail is passed to the recipient the subject line should
be rewritten.


Daniel


--
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
___
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] bypass_spam_checks question

2009-12-23 Thread Daniel Luttermann
Alex,

> Hi,

> I have a relatively simple configuration, with a bunch of remote users
> on an old Linux box with postfix and an older amavisd-new. I believe I
> have postfix configured correctly, but no matter what I do, I can't
> prevent amavisd from having spamassassin filter mail from
> authenticated users from its own domain.

> I believe this is the relevant "postconf -n" output:

> mydestination = $myhostname, localhost.$mydomain, mail.$mydomain, 
> www.$mydomain,
>  ftp.$mydomain
> myhostname = corpAdomain.com
> myorigin = $mydomain
> relay_domains = $mydestination, corpAdomain.com

> smtpd_recipient_restrictions =
> reject_non_fqdn_sender,
> reject_non_fqdn_recipient,
> check_client_access hash:/etc/postfix/pop-before-smtp,
> permit_mynetworks,
> reject_unauth_destination,
> reject_non_fqdn_hostname,
> reject_unknown_sender_domain,
> check_client_access hash:/etc/postfix/client_access,
> check_client_access pcre:/etc/postfix/client_access.pcre,
> check_recipient_access pcre:/etc/postfix/recipient_access,
> check_helo_access hash:/etc/postfix/helo_access,
> check_sender_access hash:/etc/postfix/sender_access,
> check_recipient_access pcre:/etc/postfix/recipient_access.pcre

> I've even added the whole class C network to $mynetworks and it still
> passes it through spamassassin. For amavisd.conf, I have:

> @bypass_virus_checks_acl = qw( mail.corpAdomain.com .mail.corpAdomain.com );
> @bypass_spam_checks_acl = qw( mail.corpAdomain.com .mail.corpAdomain.com );
> @local_domains_acl = ( "." ); # all domains

> What could I be missing? Please let me know if any further information
> is necessary to help troubleshoot this.

If you've set "content_filter=" in main.cf then all mails passes
amavisd. So you must define some exceptions...

If the restriction "permit_mynetworks" is true then postfix only stops
to check further restrictions - content filtering is still active.

The easiest way is to bypass scanning for authenticated users is to
let them submit their mails through the submission port (TCP 587)
rather than through the standard SMTP port and route this messages
through a different policy bank.

More info:
http://www.ijs.si/software/amavisd/amavisd-new-docs.html#pbanks-ex

For examples how to bypass sasl authenticated users see:
http://marc.info/?l=amavis-user&m=125302838227714&w=2
http://www200.pair.com/mecham/spam/bypassing.html#10


Daniel


--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
___
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] Exceeded storage quota?

2009-11-20 Thread Daniel Luttermann
Daniel,

> Running amavisd-new 2.6.1 on Mandriva Corporate Server 4.0

> I just pruned my quarantine.  Unfortunately, I waited too long and I had
> to sqldump the last couple of weeks worth, drop the amavis database,
> stop mysqld, delete the innodb container, start mysqld, create the
> database, and re-import the data.  I also added partition_tag to the
> primary key on a couple of the tables where I had inadvertently left it
> out the last time I played around with the quarantine.

> Soon after getting everything running, I ran into this error message.
> Is it related to something that I did, or is it a coincidence, and how
> might I figure out how to fix it?

> Nov 20 09:34:06 sa postfix/lmtp[20938]: 059589ABD:
> to=, relay=127.0.0.1[127.0.0.1]:10025,
> delay=165530, delays=165524/0.04/0.59/5.8, dsn=4.5.0, status=deferred
> (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing,
> id=20954-01, quar+notif FAILED: temporarily unable to quarantine: 451
> 4.5.0 Storing to sql db as mail_id IvJNBdxFsH5J failed: Exceeded storage
> quota 314572800 bytes by do_unzip; last chunk 1898428 bytes, id=20954-01
> at /usr/sbin/amavisd line 11673,  line 149681. (in reply to end
> of DATA command))

I'm not really sure but it could be possible to change the values for

  MIN_EXPANSION_QUOTA
  MAX_EXPANSION_QUOTA

in amavisd.conf.From the release notes:

new defense against mail bombs: for the cumulative total of all
  decoded mail parts we set max storage size. The formula is:
quota = max($MIN_EXPANSION_QUOTA,
$mail_size*$MIN_EXPANSION_FACTOR,
min($MAX_EXPANSION_QUOTA, $mail_size*$MAX_EXPANSION_FACTOR))


Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Could not connect to database

2009-11-08 Thread Daniel Luttermann
Florian,

> Hello,

> all of a sudden, on my Ubuntu 9.04 machine with amavids-new 2.6.2 and
> SpamAssassin 3.2.5, I get the following error when starting:

> # /etc/init.d/amavis start
> Starting amavisd:
> Could not connect to database
> amavisd-new.

> I found out that if I disable SpamAssassin, everything works fine
> again. It might be related to an unfinished FusionForge installation,
> but I can't find out why it doesn't work. Anyone has an idea what
> might cause the error message? sa-update -D works fine, so the basic
> database seems to be existing, and I couldn't find any changes neither
> in amavisd nor in SpamAssassin configuration.

please try to start amavisd in debug mode and look for errors.You can
start amavisd with

amavisd debug

If there are amavisd releated errors you should see the error messages
at the console.

amavisd uses spamassassin directly so if spamassassin works correctly
amavisd should also work - but you can also configure own database
settings in amavisd.conf (per recipient lookups,white/blacklisting
etc.). Maybe there's something wrong in amavisd.conf?

If you can't find any error message at the console (debug) please look
at your mail log file (/var/log/mail.err or /var/log/mail.info) if
there are any other errors logged.

Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] How do I know which spamassassin rules amavisd-new is using, after sa-update

2009-10-26 Thread Daniel Luttermann
wild_oscar wrote:

> I've run sa-update to update spam rules.

> How can I make sure amavis is using the new rules?  I've run amavisd-new
> debug-sa. I get a bunch of lines, including

> Oct 26 12:39:21.605 mail.me.com /usr/sbin/amavisd-new[4518]: Module
> Mail::SpamAssassin  3.002005

> But I get no info on the rule set that is being used (and which is being
> stored at  /var/lib/spamassassin/3.002005/).

> Thank you

amavisd calls spamassassin. To check if a message is spam you can also
run

  su vscan -c 'spamassassin -D -t < message.msg'

to check if any of the rules match.

vscan is the user amavisd runs as - maybe you use another one.

If spamassassin uses your updated or custom rules when you run sa
manually then it should also work if amavisd calls sa.

Don't forget to run "spamassassin --lint" to check your rules for
typos or any other other errors. If you get no errors than your
updated or custom rules are OK.


Daniel


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] [Fwd: Explicit forwarding, but not all recips done]

2009-10-22 Thread Daniel Luttermann
Raven,

> On Wed, 21 Oct 2009 13:35:32 +0200, Daniel Luttermann wrote:
>> Raven,
>>
>>> Hi all.
>>> I'm trying to set up spam email quarantine but it doesn't seem to be
>>> working.
>>> This is the relevant conf section:
>>
>>> $QUARANTINEDIR = '/var/virusmails';
>>> $virus_quarantine_method = 'local:spam-%b-%i-%n';
>>> $spam_quarantine_method = 'spam-quarantine';
>>> $spam_admin = 'spam-...@$mydomain';
>>> $final_spam_destiny   = D_DISCARD;
>>
>>> "spam-qt" has been accordingly set as a system alias, but amavis still
>>> fails:
>>
>>> Oct 15 08:31:36 dsrv amavis[15228]: (15228-01) (!!)TROUBLE in
>>> check_mail:
>>> quar+notif FAILED: Explicit forwarding, but not all recips done at
>>> /usr/sbin/amavisd-new line 4161.
>>> Oct 15 08:31:36 dsrv amavis[15228]: (15228-01) (!)PRESERVING EVIDENCE in
>>> /var/lib/amavis/tmp/amavis-20091015T083133-15228
>>> Oct 15 08:31:36 dsrv postfix/smtp[15222]: 545A31F0D9F: to=,
>>> relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=0.29/0.03/6.8/3.6,
>>> dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0
>>> Error in processing, id=15228-01, quar+notif FAILED: Explicit
>>> forwarding,
>>> but not all recips done at /usr/sbin/amavisd-new line 4161. (in reply to
>>> end of DATA command))
>>
>> have you tried to set
>>
>> $spam_admin = "spam-...@$mydomain";
>>
>> instead of
>>
>> $spam_admin = 'spam-...@$mydomain';
>>
>>
>> Daniel
>>
>>

> Thanks Dan.
> Unfortunately I'm afraid it's still not working. I tried wrapping all in
> double quotes but the error returned is the same. I am quite clueless..

hmm,maybe the setting $spam_quarantine_method causes this error...

Can you set this for example (default settings):

$spam_quarantine_method = 'local:spam-%m.gz';
$virus_quarantine_method = 'local:virus-%m';

and test again if it works?

Daniel


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] [Fwd: Explicit forwarding, but not all recips done]

2009-10-21 Thread Daniel Luttermann
Raven,

> Hi all.
> I'm trying to set up spam email quarantine but it doesn't seem to be working.
> This is the relevant conf section:

> $QUARANTINEDIR = '/var/virusmails';
> $virus_quarantine_method = 'local:spam-%b-%i-%n';
> $spam_quarantine_method = 'spam-quarantine';
> $spam_admin = 'spam-...@$mydomain';
> $final_spam_destiny   = D_DISCARD;

> "spam-qt" has been accordingly set as a system alias, but amavis still fails:

> Oct 15 08:31:36 dsrv amavis[15228]: (15228-01) (!!)TROUBLE in check_mail:
> quar+notif FAILED: Explicit forwarding, but not all recips done at
> /usr/sbin/amavisd-new line 4161.
> Oct 15 08:31:36 dsrv amavis[15228]: (15228-01) (!)PRESERVING EVIDENCE in
> /var/lib/amavis/tmp/amavis-20091015T083133-15228
> Oct 15 08:31:36 dsrv postfix/smtp[15222]: 545A31F0D9F: to=,
> relay=127.0.0.1[127.0.0.1]:10024, delay=11, delays=0.29/0.03/6.8/3.6,
> dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0
> Error in processing, id=15228-01, quar+notif FAILED: Explicit forwarding,
> but not all recips done at /usr/sbin/amavisd-new line 4161. (in reply to
> end of DATA command))

have you tried to set

$spam_admin = "spam-...@$mydomain";

instead of

$spam_admin = 'spam-...@$mydomain';


Daniel


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] How to prevent banned content notification to faked sender

2009-10-14 Thread Daniel Luttermann
Justin,

> I am receiving emails with banned content that have faked From and
> Return-path information.  Amavisd is sending a banned content notification
> back to these forged addresses.  I would like to prevent those messages
>  from being sent to the forged addresses, but I (the postmaster) wish to
> continue receiving the notice of the banned content as I do now.  What is
> the best method to accomplish this?

> I am using amavisd-new 2.6.4 with Postfix 2.3.3.

have you set any $warn*sender manually? Normally amavisd doesn't send
any notification to the sender of the message because most of the used
sender addresses are forged.

If you use any of these settings and you pass such emails to the
recipients then the sender gets a notification.

$warnbadhsender = 1;
$warnvirussender = 1;
$warnspamsender = 1;
$warnbannedsender = 1;

You can set the values to "0" to prevent the sending of notifications.

These options are only valid if you pass emails with such content to
the recipient (final_*_destiny = D_PASS or recipient is defined as a
"banned_files_lovers").

If you don't use any of the above settings then you use D_BOUNCE or
D_REJECT as $final_banned_destiny.

When you use "$final_banned_destiny = D_BOUNCE" or "D_REJECT" then the
sender of the email gets a non delivery status notification independet
of the warn*sender settings above.

If so, then you should set "$final_banned_destiny = D_DISCARD" to
silently discard such emails without any notification to the sender.

The admin/postmaster notifications should not be affected.


Daniel


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] Attachment Filtering - Per User Restriction

2009-10-10 Thread Daniel Luttermann
Manish,

> How can I stop some users from sending any kind of attachments along with
> their mails ? Further, I would like to block the attachment file extensions
> selectively on a per user basis. Is it possible to do so ? I plan to use
> Amavisd-new along with Postfix.

to block all outgoing attachments with amavisd you could maybe use

$banned_filename_re = new_RE(
  [ qr'^\.[a-zA-Z0-9]*$'   => 1 ],
);

To allow or to block certain attachments types on a per user basis you
can use a dedicated policy bank for this. Here you'll find some
examples:

http://www200.pair.com/mecham/spam/bypassing.html
http://www.ijs.si/software/amavisd/amavisd-new-docs.html#pbanks

If you use a sql database you could maybe use the field
"banned_rulenames" in the table "policy". Then it's necassary that you
define a set of banned rulenames for allowed and/or disallowed
filetypes per user.

See readme.sql-mysql:

banned_rulenamesvarchar(64) default NULL  -- comma-separated list of
names mapped through %banned_rules to actual banned_filename tables


Daniel


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] queue processing directory

2009-09-18 Thread Daniel Luttermann
Jake,

> What directory does amavis actually store the messages in for processing?
> I'm wondering if a ramdisk would increase throughput, so if you've tried
> this and had issues, please let me know.
> Thanks.

amavisd uses the directory which is defined with "$TEMPBASE = " in
amavisd.conf. Default is

$TEMPBASE = $MYHOME;

amavisd uses this directory to unpack files,store messages temporarily
etc.

amavisd cleans up the directory automatically if new messages are
processed or if you restart amavisd. You should reserve at least 128
MB for the ramdisk - better a bit more.

Example for a possible /etc/fstab entry:

/etc/fstab:
none /var/lib/amavis/tmp tmpfs 
defaults,size=128m,mode=750,uid=101,gid=0,noatime 0 0


The size of the ramdisk depends on the number and size of the in-
and/or outgoing emails.Some people who are using a smaller Vserver
have sometimes problems with amavisd if the "physical" ramdisk size is
too small. Same problem should happen if the the ramdisk is too small
so I think 150-180 MB should be sufficient.

If the ramdisk is "full" and amavisd can not process the email then
the mail should be rejected with an error "4xx".

Daniel


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
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] Amavis configuration stored in database

2009-09-18 Thread Daniel Luttermann
Andrea Cappelli wrote on 18.09.09:

> Il giorno mar, 15/09/2009 alle 00.30 +0200, Daniel Luttermann ha
> scritto:

>> Yes,if no other values are found in the database amavisd falls back to
>> the settings which are defined in amavisd.conf.
>> Have you include these lines in 50-user for example:
>> 
>> @lookup_sql_dsn =
>>   ( ['DBI:mysql:database=amavis;host=localhost', 'sql-user', 'sql-pass'] );
>> @storage_sql_dsn = @lookup_sql_dsn;

> Yes, I have these lines

>> With the above settings you enable sql lookups. Have you created the
>> mysql database and tables which amavisd should use?

> Ok, this is the real question, can i specify the query to amavis (as i
> do with dovecot and postfix) or i have to use the schema proposed in the
> file README.sql-mysql.txt?

you can use your existing user db for amavis,postfix and dovecot but
you must add the other tables (policy,wblist...) for amavis too to use
all features like white- and blacklisting, pen pals...

If you're using other tables you can modify the sql select clause so
that amavisd can fetch the correct user settings. Normally amavisd
uses such a query:

$sql_select_policy = 'SELECT *,users.id FROM users,policy'.
 ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))'.
 ' ORDER BY users.priority DESC';

This query,and the query for white-/blacklisting can be changed in
amavisd.conf.

> Because I would like to extend the current schema (maybe with a policy
> table) which is used by mail cluster

I think this should be possible.

>> You can use the spamassassin autolearn feature within amavisd or you
>> can train the bayes db manually.
>> Note: amavisd calls spamassassin so the bayes database is owned and
>> used by the amavisd user. You can store your bayes db on the local
>> filesystem or in a mysql database.

> Ok

> Thank you for the quick reply

Daniel


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
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] Examining the amavis DB's

2009-09-15 Thread Daniel Luttermann
Kevin,

> Hi,

> If I use the soft pen pals option then the recipient/sender pairs need
> to be stored by Amavis so it can use these on incoming mail.

> If I've not set @lookup_sql_dsn I presume the info is stored in a local
> DB file.  How do I examine the contents of the required DB file - I want
> to check that the outgoing sender/recipient pairs are being stored when
> email gets sent out.

> Or do I have to set up an SQL DB to store this info?

yes, you need a SQL Database for this feature.

Daniel


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
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] Amavis configuration stored in database

2009-09-14 Thread Daniel Luttermann
Andrea,

> Hi all,
> I'm new on this list and I have configured amavisd-new-2.6.1 (20080629)
> on a Debian server (lenny) with dovecot ans postfix.

> Everything works fine, but i have some question and www.amavis.org/howto
> seems to be down (at least from my network)

This site is outdated. For informations please use
http://www.ijs.si/software/amavisd/

This is the official website of amavisd.

> 1) I have configured amavis and i have also defined sql_select_policy,
> but i'm not able to figure out how to instruct amavis to get per user
> information from database.
> For example i have the following conf

> $sa_spam_subject_tag = undef;
> $sa_tag_level_deflt = undef;
> $sa_tag2_level_deflt = 5.5; # add 'spam detected' headers at
> that level
> $sa_kill_level_deflt = 6.0; # triggers spam evasive actions
> $sa_dsn_cutoff_level = 10;  # spam level beyond which a DSN
> is not sent

> $final_spam_destiny   = D_PASS;
> $final_virus_destiny  = D_DISCARD;  # (data not lost, see virus
> quarantine)
> $final_banned_destiny = D_BOUNCE;   # D_REJECT when front-end MTA
> $final_bad_header_destiny = D_PASS; 

> This conf is global, so every mail get analyzed with the same
> $sa_tag2_level_deflt, but I would have this setting stored on a database
> for each user (for each recipient)

Yes,if no other values are found in the database amavisd falls back to
the settings which are defined in amavisd.conf.

Have you include these lines in 50-user for example:

@lookup_sql_dsn =
  ( ['DBI:mysql:database=amavis;host=localhost', 'sql-user', 'sql-pass'] );
@storage_sql_dsn = @lookup_sql_dsn;

With the above settings you enable sql lookups. Have you created the
mysql database and tables which amavisd should use?

See http://www.ijs.si/software/amavisd/README.sql-mysql.txt for
examples.

> It's possible? There is a guide or howto to accomplish this?

> 2) Where can i found an exhaustive list of amavis configuration params?

Personally I use the documentation which is included in the amavisd
source package from the amavis website. Inside you'll find the file
amavisd.conf-sample which contains many configuration options.

> 3) If I wanto to teach my server what is spam and what is not, i have to
> use the spaassasin tools (sa_learn) or it's possible to specify some
> options within amavis?

You can use the spamassassin autolearn feature within amavisd or you
can train the bayes db manually.
Note: amavisd calls spamassassin so the bayes database is owned and
used by the amavisd user. You can store your bayes db on the local
filesystem or in a mysql database.

> Sorry is these questions are too simple, but i don't find any doc on
> internet (maybe i submit the wrong question)


Regards,
Daniel


--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
___
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] Allow all emails from local domain

2009-09-13 Thread Daniel Luttermann
Kevin,

> Hi,

> I have to get a server up and running tomorrow - all is in place but I'm
> worried that Amavis is going to stop outgoing emails from the users.

> The users use the server - which is on an internet IP address - to send
> emails.  They obviously have to authenticate otherwise the server would
> be an open relay.

> Now it looks like the use of a policy bank and allowing authenticated 
> users  is the best way to do this - but I'm short on time to implement this.

> To enable the use of the server whilst I look into this - is there any
> way I can allow all emails which have a sending domain of the domains 
> the server is hosting.

> I know that this address can be spoofed and so this isn't recommended -
> but I need to get the machine up and running soon.

> Can I hard code a white list of sending domains somewhere.

I think the easiest way to bypass spam scanning for outgoing emails is
to set

@bypass_spam_checks_maps = ( ["example.com"] );

Or if you want to read your domains from a file:

read_hash(\%local_domains, '/etc/amavis/local_domains');

Then you can add your domains to /etc/amavis/local_domains - one
domain per line.

You can use the same syntax for bypass virus/header/banned checks.

Also look at these examples:
http://www200.pair.com/mecham/spam/bypassing.html

Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Training bayes

2009-09-13 Thread Daniel Luttermann
troxlinux wrote:

> Hi list, I have a doubt that post I am training my spamassassin with
> filters bayes , the amavisd-new lance the spamassassin for the spam,
> but I see that inside the directory amavis, there is another directory
> with the name of.spamassassin and making a debug to my spamassassin, I
> see that it doesn't use that directory for the database baye ...


> /var/spool/amavis # ls -l
> total 4060
> -rw---   1 vscan vscan 837 Sep  5 16:26 .bash_history
> -rw---   1 vscan vscan  35 May 17 11:14 .lesshst
> drwxr-x---   2 vscan vscan4096 Sep 11 14:54 .razor
> drwx--   2 vscan vscan4096 Sep 12 19:04 .spamassassin
> -rw-r-   1 vscan vscan   0 Sep 12 19:04 amavisd.lock
> -rw-r-   1 vscan vscan   6 Sep 12 19:04 amavisd.pid
> srwxr-x---   1 vscan vscan   0 Sep 12 19:04 amavisd.sock
> drwx--   2 vscan root 4096 Sep 12 19:04 db
> drw---   6 vscan root 4096 May 17 12:35 dcc
> drwxr-xr-x  20 vscan vscan4096 May 12 20:50 dcc-1.3.103


> debug off my spamassassin

> dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_toks
> [14061] dbg: bayes: tie-ing to DB file R/O /root/.spamassassin/bayes_seen
> [14061] dbg: bayes: found bayes db version 3
> [14061] dbg: bayes: DB journal sync: last sync: 0
> [14061] dbg: config: score set 2 chosen.

> when I train my spamassassin, I see that the one writes the files
> inside the /root/.spamassassin, but is my doubt this which uses
> amavisd-new when it throws the spamassassin?

> 1. /root/.spamassassin
> 2. /var/spool/amavis/.spamassassin

when you train your bayes db as normal user like root then
spamassassin use your home directory to store the bayes db. In your
case this is /root/.spamassassin so this is correct.

When you train your bayes db through amavisd then the home directory
of the amavis user is used because amavisd calls spamassassin.
Therefore /var/spool/amavis/.spamassassin is correct.

When you would like to train the spamassassin bayes db then you should
always use the amavisd user for that.

Example:

su amavis -c 'sa-learn --spam < spam_message'


Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] no activity

2009-08-12 Thread Daniel Luttermann
polloxx wrote:

> Deat list,

> I'm doing tests with Amavisd-new 2.6.1 on Debian.
> After a period of no activity I see amavisd takes long to respond.
> Can I change that?

are you sure that this is amavisd related? Where do you get your
informations? Logfile? Maybe spamassasssin or your MTA is slow? Do you
use a virus scanner?


Thanks.


-- 
Daniel




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] bypass spam and virus account email

2009-08-12 Thread Daniel Luttermann
troxlinux wrote:

> hello list I have a server with postfix and amavisd-new 2.6.3, I
> have some accounts of the system to send log to an administrator
> account root, and want to avoid that amavisd-new scan , I put within
> amavisd-new these lines for the post office that I do not want to scan
> with in amavisd-new

> @bypass_header_checks_acl = qw( oss...@tia.domain.org.ni );
> @bad_header_lovers_acl= qw( oss...@tia.domain.org.ni );
> $bypass_virus_checks{lc('oss...@tia.domain.org.ni')} = 1;


> but this does not work to me, I am making something bad

> X-Virus-Scanned: amavisd-new
> X-Spam-Flag: NO
> X-Spam-Score: 0.021
> X-Spam-Level:
> X-Spam-Status: No, score=0.021 tagged_above=-999 required=5 tests=[AWL=0.021]
> autolearn=ham

with the above settings you only bypass header and virus checks - spam
scanning is still enabled so it's correct that the amavisd header and
spam score is added. If you would like to diable these checks too try
to add

  @bypass_spam_checks_maps = ( [qw( postmas...@example.com )] );
  @spam_lovers_maps = ( [qw( postmas...@example.com )] );


-- 
Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] how to supress message notification

2009-08-08 Thread Daniel Luttermann
Luis,

> Hi ,

> Is there a way to supress message notification to senders by amavisd?

notifications are only send if messages are passed to the recipients.
If so, you can disable the sender notifications with

$warnvirussender = undef;
$warnspamsender = undef;
$warnbannedsender = undef;
$warnbadhsender = undef;

If you use D_BOUNCE or D_DISCARD as final_*_destiny (virus,spam...)
the the sender gets notification too.

D_BOUNCE: mail will not be delivered to its recipients, a non-delivery
notification (bounce) will be sent to the sender by amavisd-new.

D_REJECT: mail will not be delivered to its recipients, sender should
preferably get a reject, e.g. SMTP permanent reject response
(e.g. with milter), or non-delivery notification from MTA.

You can use D_DISCARD as final_*_destiny so that the sender gets no
notification.


-- 
Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Amavis will not ignore bad headers.

2009-08-05 Thread Daniel Luttermann
Tom,

> Basically I have 2 problems. The first problem is that I am trying to get
> amavis-new to pass messages with bad headers. I have $warnbadhsender = undef
> in the amavisd.conf. As I understand things, this is the default and this
> should allow these messages to just pass through.

$warnbadhsender controls if the sender of an email should be notified
when the header contains invalid characters and the mail is passed to the
recipient.

If you would like to pass messages (spam,virus,bad header) to
recipients you should use $final_bad_header_destiny = D_PASS (for bad
header) or @bad_header_lovers_maps.

With $final_bad_header_destiny you can define if amavisd should reject
the message, let the message pass through or else.

> The second problem is that the messages with bad headers are getting the
> To address rewritten to tdiehl+b...@mydomain.com. This part is what I expect
> since I have plus addressing turned on. What I do not understand is, with
> softbounce turned on in postfix, I am getting messages stuck in the mailq
> that say
> Aug  5 15:33:55 vfoggy postfix/pipe[12086]: 7EEBAF0807:
> to=, relay=dovecot, delay=94946,
> delays=94946/0.48/0/0.02, dsn=4.1.1, status=SOFTBOUNCE (user unknown)

> I have an alias that says to deliver mail for tdiehl+badh to my mailbox, so
> I do not understand why it says "user unknown".

It seems that this is dovecot related because the lda couldn't find
the user (relay=dovecot). Have you modified local_transport or
virtual_transport in main.cf? Maybe the lda looks in the wrong alias
database?

> If I look at the header of one of the messages stuck in the queue I see the
> following: 
> X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "MIME-Version"

> The system is running postfix 2.3.3, dovecot 1.2.2 using the dovecot lda,
> amavisd-new 2.6.2 and the latest svn version of postfix admin. Quarantine
> is in mysql and the users are stored in mysql and managed by postfixadmin.

> Does anyone have any idea what I am doing wrong or how to troubleshoot this
> problem?

You could try to disable this check with

   $allowed_header_tests{'multiple'} = 0;

At the moment I've no idea where this duplicate entry come from...
This happens only when when the mail gets bounced (status=SOFTBOUNCE)?


Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Delivery Failures From Banned Emails to Sender

2009-07-31 Thread Daniel Luttermann
Carlos Williams wrote on 07/31/2009:

> When someone sends a message that is blocked / quarantined for banned
> contents or viruses, I would like to get notification sent to
> postmast...@$mydomain however I do not want notification sent to the
> sender that their message was not delivered based on whatever reason.
> Right now I am getting admin notifications but so are the senders. How
> can I stop notifications to the sender that their incoming message was
> not relayed to it's destination?

normally amavisd-new doesn't notify the sender of the message - but
you can explicit turn-off the sender notifications with these settings
in 50-user:

$warnbadhsender = undef;
$warnbannedsender = undef;
$warnspamsender = undef;
$warnbadhsender = undef;

The above warn sender settings are used if the mail is passed to the
recipient (final_*_destiny = D_PASS or if the recipient is in *_lover.

When you use D_BOUNCE or D_REJECT as final_*_destiny the sender gets
notified even if the above warn sender settings are disabled.

If you would like to get notified about spam/virus... then you can
also set these options in 50-user:

$virus_admin = "postmast...@$mydomain";
$spam_admin = "postmast...@$mydomain";


> Second issue is when the sender receives a notification that their
> message was rejected, the message is sent from
>  rather than just
> . I guess this does not really matter since I
> wont to stop sending out notifications to the sender that their emails
> have not been delivered. I don't want to let someone who is trying to
> sneak malisous code into my LAN know that they should try again...

> Does anyone know how I can resolve the above or what I need to look for?

Maybe you could set your domain name in 50-user with:

$mydomain = 'example.com';

and maybe

$myhostname = 'fqdn.example.com';

Some settings uses the variable "mydomain" so it's important that this
setting is correct.

-- 
Daniel


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Confused About Ports

2009-07-17 Thread Daniel Luttermann
Carlos,

> I am confused about my current configuration and it working properly.
> In my amavisd.conf file, I show the following parameters:

>>$max_servers = 15;# num of pre-forked children (2..30 is common), 
>>-m
>>$daemon_user  = "amavis"; # (no default;  customary: vscan or amavis), -u
>>$daemon_group = "amavis"; # (no default;  customary: vscan or amavis), -g

>> $mydomain = 'iamunix.com';   # a convenient default for other settings

>> $MYHOME = '/var/amavis';   # a convenient default for other settings, -H
>> $TEMPBASE = "$MYHOME/tmp";   # working directory, needs to exist, -T
>> $ENV{TMPDIR} = $TEMPBASE;# environment variable TMPDIR, used by SA, etc.
>> $QUARANTINEDIR = "/var/virusmails";

>> $db_home   = "$MYHOME/db";  # dir for bdb nanny/cache/snmp databases, -D
>> $helpers_home = "$MYHOME/var";  # working directory for SpamAssassin, -S
>> $lock_file = "$MYHOME/var/amavisd.lock";  # -L
>> $pid_file  = "$MYHOME/var/amavisd.pid";   # -P

>> @local_domains_maps = ( [".$mydomain"] );  # list of all local domains

>> $interface_policy{'10026'} = 'ORIGINATING';

>> $policy_bank{'ORIGINATING'} = {  # mail supposedly originating from our users
>> originating => 1,  # declare that mail was submitted by our smtp client
>> allow_disclaimers => 1,  # enables disclaimer insertion if available
>> # notify administrator of locally originating malware
>> virus_admin_maps => ["virusale...@$mydomain"],
>> spam_admin_maps  => ["virusale...@$mydomain"],
>> warnbadhsender   => 1,
>> # forward to a smtpd service providing DKIM signing service
>> forward_method => 'smtp:[127.0.0.1]:10027',
>> # force MTA conversion to 7-bit (e.g. before DKIM signing)
>> smtpd_discard_ehlo_keywords => ['8BITMIME'],
>> bypass_banned_checks_maps => [1],  # allow sending any file names and types
>> terminate_dsn_on_notify_success => 0,  # don't remove NOTIFY=SUCCESS option
>> };

> It appears to me that Postfix sends the message to Amavisd on port
> 10024. Then its passed to ClamAV and then from there it's passed back
> to Amavisd-new but I am confused because I thought something happened
> on port 10025 as noted in my Postfix master.cf:

>> amavisfeed unix-   -   n- 15 lmtp
>>   -o lmtp_data_done_timeout=1200
>>   -o lmtp_send_xforward_command=yes
>>   -o disable_dns_lookups=yes
>>   -o max_use=20

>> 127.0.0.1:10025 inet n-   n   -   - smtpd
>>   -o content_filter=
>>   -o smtpd_delay_reject=no
>>   -o smtpd_client_restrictions=permit_mynetworks,reject
>>   -o smtpd_helo_restrictions=
>>   -o smtpd_sender_restrictions=
>>   -o smtpd_recipient_restrictions=permit_mynetworks,reject
>>   -o smtpd_data_restrictions=reject_unauth_pipelining
>>   -o smtpd_end_of_data_restrictions=
>>   -o smtpd_restriction_classes=
>>   -o mynetworks=127.0.0.0/8
>>   -o smtpd_error_sleep_time=0
>>   -o smtpd_soft_error_limit=1001
>>   -o smtpd_hard_error_limit=1000
>>   -o smtpd_client_connection_count_limit=0
>>   -o smtpd_client_connection_rate_limit=0
>>   -o 
>> receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters,no_address_mappings
>>   -o local_header_rewrite_clients=
>>   -o smtpd_milters=
>>   -o local_recipient_maps=
>>   -o relay_recipient_maps=

> How come I don't see anything in my Amavisd-new config file about port
> 10025? I see port 10024 listed in amavisd.conf but nothing else. Does
> the above look wrong to anyone?

Looks good...

Port 10025 ist the standard port that amavisd is using - no need to
set this value in amavisd.conf because it's defined in amavisd
directly.

Readme.Postfix:

The first parameter, $forward_method, specifies where amavisd-new should
transport scanned messages to, while the second parameter, $notify_method,
specifies where notifications about scanned messages should be transported
to.

By default amavisd uses 127.0.0.1 on port 10025 to contact a SMTP server
for reinjection of filtered messages. Unless a different IP address or
port should be used, no modifications must be applied and this section can
be skipped.


-- 
Daniel



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
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] Guide / Howto for Lenny

2009-07-08 Thread Daniel Luttermann
Carlos,

> On Fri, Jun 26, 2009 at 2:58 PM, Daniel Luttermann  wrote:
>>
>> personally I can recommend these two howtos:
>>
>> http://workaround.org/articles/ispmail-etch/index.html.en

> The link above seems to be working fine however I start at step 10. I don't 
> have
> or am using a MySQL database for Postfix. My users are not in MySQL but 
> regular
> shell / bash users. I installed Postfix from 'apt' and got everything
> working and then
> used apt to install everything else the guide recommended from step 10 but I 
> am
> confused on one section...

> The guide linked above indicates I need to add the following to
> /etc/amavis/conf.d/50-user

> @lookup_sql_dsn = (
> ['DBI:mysql:database=mailserver;host=127.0.0.1;port=3306',
>  'mailuser',
>  'mailuser2007']);

> $sql_select_policy = 'SELECT name FROM virtual_domains WHERE
> CONCAT("@",name) IN (%k)';

> I don't know really what that means however I am guessing since I am
> not following that guide
> to set up Postfix and a virtual user database in MySQL, I should skip this, 
> yes?

yes, you can skip this if you don't use a MySQL database. This setting
is important that amavisd-new knows what recipients are "local".

Note from amavisd.conf:

# The SQL select clause to fetch per-recipient policy settings.
# The %k will be replaced by a comma-separated list of query addresses
# (e.g. full address, domain only (stripped level by level), and a
# catchall).

In this "policy" in your MySQL database you could set different spam
scores for this user, you could set that the recipient is a "virus
lover" which would pass virues to this recipient...

If you don't use MySQL you've to set such values in 50-user for
example or in "text files" which you could load by amavisd-new.

An example for 50-user:

$sa_tag2_level_deflt = 5.0;
@spam_lovers_maps = (
["postmast...@$mydomain", 'recipi...@example.com', 'u...@example.com'],
);

For different spam scores you can set:

@spam_tag2_level_maps = (
 { 'recipi...@example.com' => 8.0, '.example.com' => 6.0 },
 \$sa_tag2_level_deflt,   # catchall default
);

If you've only a few users it's OK to set this in 50-user.

Example for read_hash from local text file (more users, seperate from
config file...):

$sa_tag2_level_deflt = 5.0;
@spam_tag2_level_maps = (read_hash("/etc/amavis/conf.d/sa-recipient"),
\$sa_tag2_level_deflt);

File "sa-recipient":

recipi...@example.com  5.0
u...@example.com 10.0

This should work.

Some things are easier if you use databases but it's not a
requirement. Some features of amavisd (like "pen pals"= can only be
used with MySQL (or another SQL-DB) but not everybody need all
features.


-- 
Daniel



--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
___
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] Error with mysql

2009-07-01 Thread Daniel Luttermann
Salvatore,

> Hi, I use amavisd-new-2.2.1 with Maia/MySQL Server/Postfix/Clamv and
> sometimes I have this error:

> A00301A195  1037884 Tue Jun 30 16:19:29  acco...@domain.com
> (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=22278-02,
> spam_scan FAILED: DBD::mysql::st execute failed: Got a packet bigger than
> 'max_allowed_packet' bytes at /usr/sbin/amavisd line 3790,  line
> 36191. (in reply to end of DATA command))

> This error is caused from amavis or not ? How can I resolve this problem ?
> Thanks.

maybe you should increase the value for max_allowed_packet in your
mysql configuration (my.cnf). Sometimes this value is a bit low; I
mean that standard value is 1 MB.

You can check this setting in phpmyadmin or manually at the mysql
command prompt like

mysql> SHOW VARIABLES;

Look for max_allowed_packet. If the value is low you can increase the
value in my.cnf. Example:

[mysqld]
max_allowed_packet=8M

Further informations:
http://dev.mysql.com/doc/refman/5.1/en/packet-too-large.html
http://dev.mysql.com/doc/refman/5.0/en/show-variables.html


-- 
Daniel



--
___
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] Guide / Howto for Lenny

2009-06-26 Thread Daniel Luttermann
Carlos,

> I have a standalone Debian 5 (Lenny) server up and running fresh at a
> new location and is simply just running Postfix 5.0. I have also
> installed Amavisd-new however it's not running because I have yet to
> find a helpful guide that shows me step by step how to integrate
> Amavisd-new into Postfix. So far I have configured just my server
> (Debian) and my MTA (Postfix) to work perfectly. Now my confusion is
> all the different / dated / imcomplete guides I Google for Postfix +
> Amavisd-new + ClamAV. Can anyone on the list please recommend or help
> me find a step by step guide?

personally I can recommend these two howtos:

http://workaround.org/articles/ispmail-etch/index.html.en
http://www200.pair.com/mecham/spam/spamfilter20090215.html

You should also read

http://www.ijs.si/software/amavisd/README.postfix.html

These howtos will give you some ideas/informtions on how to setup your
mailserver with amavisd,postfix and clamav.


-- 
Daniel




--
___
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] Normal, that ham gets in quarantine folder?

2009-06-22 Thread Daniel Luttermann
Claudio,

> Hello,

> I'm new to Amavisd-new and I have a question about the incoming ham-mails.
> Is the following procedure normal?

> Incoming (ham) e-mail:
> -
> Jun 22 10:27:11 mx1 amavis[27260]: (27260-05) ESMTP::10024
> /var/spool/amavis/tmp/amavis-20090621T042001-27260:  ->
>  Received: SIZE=3924 from
> mx1.example.com([127.0.0.1]) by localhost (mx1 [127.0.0.1])
> (amavisd-new, port 10024) with
> ESMTP id 27260-05 for ; Mon, 22 Jun 2009 10:27:11
> +0200 (CEST)
> Jun 22 10:27:11 mx1 amavis[27260]: (27260-05) Checking: lN6GbpoYXYus
> [123.123.123.123]  -> 
> Jun 22 10:27:11 mx1 amavis[27260]: (27260-05) local delivery: <> ->
> ,
> mbx=/var/spool/amavis/virusmails/spam-lN6GbpoYXYus.gz
> -
> The incoming mail gets obviously transferred into the quarantine-folder ...

> Then there is the result coming back from amavis:
> -
> Jun 22 10:27:11 mx1 amavis[27260]: (27260-05) Passed CLEAN,
> [123.123.123.123] [98.0.0.70]  -> ,
> quarantine: spam-lN6GbpoYXYus.gz, Message-ID: <
> ofe122d591.83a7a75b-onc12575dd.002e627c-c12575dd.002e8...@example.com>,
> mail_id: lN6GbpoYXYus, Hits: 0.644, 491 ms
> Jun 22 10:27:11 mx1 postfix/smtp[9996]: 01CD26BBFB: to=,
> relay=127.0.0.1[127.0.0.1], delay=1, status=sent (250 2.6.0 Ok, id=27260-05,
> from MTA([127.0.0.1]:10025): 250 Ok: queued as 844136BBFC)
> -
> After delivering the e-mail to the final recipient, the quarantines mail
> stays in the quarantine-folder as
> /var/spool/amavis/virusmails/spam-lN6GbpoYXYus.gz.

> Is it normal, that a ham e-mail stays quarantined even that it was delivered
> correctly?

as far as I know this could happen if you use D_PASS as
final_*_destiny and you use quarantaine.

So if you've configured

$final_spam_destiny = D_PASS;

and "$spam_quarantine_to=" is not empty than the mail gets stored into
quarantaine and will be delivered to the recipient.

Same for bad header, banned files and viruses...

The score 0.644 is a bit low for classify the mail as spam but if you
use D_PASS it should be OK.


-- 
Daniel




--
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
___
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] SpamAssassin header

2009-05-27 Thread Daniel Luttermann
Luc MAIGNAN wrote:

> Unfortunaly, I've setup -999 to sa_tag_level and it doesn't work.
> My problem is perhaps on the configuration of local_domains_acl. Which
> value have I to put ?

value for $sa_tag_level is OK.

In  @local_domains_maps you should list your "local domains" for which
you receive emails - similar to the postfix settings mydestination,
virtual_alias_domains, virtual_mailbox_domains and/or relay_domains.

Example:

$mydomain = 'example.com';
@local_domains_maps = ( [ ".$mydomain", 'example.net' ] );

This also affects the notification for recipients if you enable it for
viruses,spam ($warnvirusrecip,$warnbannedrecip...). Standard is
"disabled" - no recipient notification is send.


-- 
Daniel




--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
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] SpamAssassin header

2009-05-27 Thread Daniel Luttermann
Luc MAIGNAN wrote:

> Under Amavis, I can't setup  the SpamAssassin option that set the X flag
> status that give the status of the message and the results of all the 
> tests even if the message is considered as ham.

> Has anyone an idea ?

additional headers are only inserted if the score of an email reaches
the value of sa_tag_level.
See also: http://www.ijs.si/software/amavisd/#faq-spam

To add message related headers for every mail you can set

$sa_tag_level = -999

It's also important that you've set @local_domains_acl correctly.

Afterwards   you  should  see  additional  headers  like  X-Spam-Flag,
X-Spam-Status...

-- 
Daniel




--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
___
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] use amavis as proxy filter and reject mails

2009-05-25 Thread Daniel Luttermann
sebast...@debianfan.de wrote:

> i wan't to use amavisd-new as an proxy filter for rejecting spam- & 
> virusmails.

Have you read this first (pros/cons):
http://www.postfix.org/SMTPD_PROXY_README.html

> smtp  inet  n   -   n   -   -   smtpd
>-o smtpd_proxy_filter=127.0.0.1:10024

OK.

> 127.0.0.1:10025 inet n - n - - smtpd

this line is unnecessary because you've set this later...

> 127.0.0.1:10025 inet n   -   n   -   -  smtpd
>  -o content_filter=
>  -o local_recipient_maps=
>  -o relay_recipient_maps=
>  -o smtpd_restriction_classes=
>  -o smtpd_client_restrictions=
>  -o smtpd_helo_restrictions=
>  -o smtpd_sender_restrictions=
>  -o smtpd_recipient_restrictions=permit_mynetworks,reject
>  -o mynetworks=127.0.0.0/8
>  -o strict_rfc821_envelopes=yes


> i think i have to change the amavis-settings too:

No, not needed - it's mainly postfix related.

> $final_virus_destiny  = D_DISCARD;  # (data not lost, see virus
> quarantine)
> $final_banned_destiny = D_BOUNCE;   # D_REJECT when front-end MTA
> $final_spam_destiny   = D_BOUNCE;

Use D_REJECT instead of D_BOUNCE and also D_REJECT for viruses.


-- 
Daniel



--
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
___
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] user account for spam

2009-05-17 Thread Daniel Luttermann
troxlinux wrote:

> when I put the address this way $spam_quarantine_to =
> 's...@domain.org.ni'; he doesn't send me the spam to the account and
> in the log of the mail it seemed that if:


> 4 ns1 amavis[10725]: (10725-01) Passed SPAM, [209.85.221.171]
> [209.85.221.171]  -> ,
> quarantine: s...@domain.org.ni, Message-ID:
> ,
> mail_id: xb+vZXFYEKFJ, Hits: 1001.156, size: 1738, queued_as:
> 4BAD53AE3FD, dkim_...@gmail.com,xserverli...@gmail.com, 3655 ms
> May 16 16:28:24 ns1 postfix/lmtp[10738]: 720A93AE3ED:
> to=, relay=127.0.0.1[127.0.0.1]:10024, delay=4.5,
> delays=0.88/0.01/0.01/3.7, dsn=2.0.0, status=sent (250 2.0.0 Ok,
> id=10725-01, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as
> 4BAD53AE3FD

try this additional setting in amavisd.conf:

$spam_quarantine_method = 'smtp:localhost:25';


-- 
Daniel




--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
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] user account for spam

2009-05-16 Thread Daniel Luttermann
troxlinux wrote:

> I have configured it as your you say, but it doesn't work me, and the
> idea that I have is that I want to forward all that is spam to a mail
> account

> $mailfrom_to_quarantine = 's...@domain.org.ni';

> any idea where my error can be?

> regardss

If you would like to forward spam messages to an email addess then you
should use

$spam_quarantine_to = 's...@domain.org.ni';

Mails which have a score greater than $sa_kill_level_deflt should be
forwarded to this email.

-- 
Daniel




--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
___
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] No subject with spam

2009-05-11 Thread Daniel Luttermann
troxlinux wrote:

> if I have configured that option, but I forget to comment that my
> domains are virtual with postfix and use mysql

> $mydomain = 'domain.org.ni'

> @local_domains_maps = ( [".$mydomain .domain.net.ni .domain.org.ni"] )

It's not needed that you set your domain twice here ($mydomain is the
same than domain.org.ni) - you can remove .domain.org.ni.

You should list the same domains in @local_domains_maps that you use
for the Postfix settings mydestination,virtual_alias_domains,
virtual_mailbox_domains or relay_domains.

-- 
Daniel




--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
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] Use spamassassin throgh amavisd-new

2009-05-06 Thread Daniel Luttermann
Alejandro Cabrera Obed wrote:

> Dear all, I can't put to work Spamassassin trough Amavisd-new (version 2.4),
> and the spam messages are not taged with ***SPAM***  as I need. So I show my
> amavis conf files in order to get your help:

> /etc/amavis/conf.d/15-content_filter_mode:
> use strict;
> @bypass_virus_checks_maps = (
>\%bypass_virus_checks, \...@bypass_virus_checks_acl,
> \$bypass_virus_checks_re);
> @bypass_spam_checks_maps = (
>\%bypass_spam_checks, \...@bypass_spam_checks_acl, 
> \$bypass_spam_checks_re);
> 1;

OK.

> /etc/amavis/conf.d/20-debian_defaults:
> $inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface
> @inet_acl = qw ( 10.1.6.13 127.0.0.1 ); # allow SMTP access from these IP's
> $sa_spam_subject_tag = '***SPAM*** ';
> $sa_tag_level_deflt  = 4.0;  # add spam info headers if at, or above that
> level
> $sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
> $sa_kill_level_deflt = 5.0; # triggers spam evasive actions
> $sa_dsn_cutoff_level = 10;   # spam level beyond which a DSN is not sent
> $sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is
> larger
> $sa_local_tests_only = 0;# only tests which
> $forward_method = 'smtp:127.0.0.1:10025';
> $notify_method = $forward_method;
> $final_virus_destiny  = D_REJECT;  # (data not lost, see virus
> quarantine)
> $final_banned_destiny = D_BOUNCE;   # D_REJECT when front-end MTA
> $final_spam_destiny   = D_PASS;
> $final_bad_header_destiny = D_PASS;

Please check your setting for @local_domains_acl. Normally the Debian
version reads /etc/mailname where you should set your hostname fully
qualified (FQDN).

See /etc/amavis/05-domain_id.

When you've more than one domain it's better to use

@local_domains_maps = ( [ ".$mydomain", 'example.com', 'example.net' ] );

in 05-domain_id instead of

chomp($mydomain = `head -n 1 /etc/mailname`);
@local_domains_acl = ( ".$mydomain" );


-- 
Daniel




--
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
___
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] How to apply banned_filename_maps to sender domains

2009-05-02 Thread Daniel Luttermann
Ronie Gilberto Henrich wrote:

> Hi,

>   I am using the following rule to block mp3 files of being received
> by domain example.com (recipient == @.example.com), which is hosted
> by us.

> @banned_filename_maps = (
>{
>  '.example.com' => 'AUDIO',
>  '.' => 'DEFAULT',
>},
> );


>   Is it any way to enforce that rule also to block mp3 files of being
> sent by domain example.com (sender == @.example.com)?

maybe you can use policy_banks like this:

$inet_socket_port = [10024,10026];
$interface_policy{'10026'} = 'BLOCKAUDIO';

$policy_bank{'BLOCKAUDIO'} = {
 banned_filename_maps => ['MYNETS-DEFAULT'],
};

%banned_rules = (
  'MYNETS-DEFAULT' => new_RE(
  [qr'.\.(mp3|mp4)$'i => 1],
  ),
  'DEFAULT' => $banned_filename_re,
);

Then you could use check_sender_access with postfix like this:

smtpd_sender_restrictions =
  check_sender_access hash:/etc/postfix/amavis_block_audio

Then you can set this in /etc/postfix/amavis_block_audio

example.com FILTER smtp-amavis:[127.0.0.1]:10026

All E-Mails from example.com go through amavis, port 10026.

I've not tested this but it's an idea.

-- 
Daniel



--
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
___
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] Settings

2009-04-27 Thread Daniel Luttermann
Karsten Frohwein wrote:

> Dear List,

> this doesn't seem to change anything

> @spam_kill_level_maps = (
>  {
>'.example.com'   => 8.0,
>'.'   => \$sa_kill_level_deflt,
>  }
> );


> The domains I use are in @local_domains_maps = ( 
> read_hash("$MYHOME/local_domains") ); and normal Spam tagging works. But
> the kill level doesn't seem to change.

> The header still states 6.31

> X-Spam-Status: No, score=-2.406 required=6.31 tests=[AWL=0.194,
> BAYES_00=-2.599, SPF_PASS=-0.001]

> I am using Debian Etch with latest packages.

your setting looks a bit different than this:

@spam_kill_level_maps = (
  { 'us...@example.com' => 20.5,
  'postmas...@example.com' => ,
  '.example.com' => 25 },
  \$sa_quarantine_cutoff_level,
);

Maybe you've set the "}" wrong so that the values could not be
interpreted by amavisd.

You could also set this (let amavisd read the values from a textfile):

@spam_kill_level_maps = ( read_hash('/etc/amavis/sa-kill.txt'), 30.0 );

u...@example.com30.0
us...@example.net   18.0

-- 
Daniel




--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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] X-Spam- headers on ham

2009-04-26 Thread Daniel Luttermann
Frans de Boer wrote:

> Dear Reader,

> I try to get a X-Spam-Status line on all the e-mail I receive - as a
> test - but I only get this special header when SpamAssassin has reported
> that it was Spam. Is this a behaviour of SA or is there a switch in
> amavis-new (2.6.3) which I need to set?

have you tried it with a low score like "-999" instead of "undef"?

$sa_tag_level_deflt  = -999;

-- 
Daniel



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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] Amavis DKIM Signing with Postfix check_client_access ?

2009-04-23 Thread Daniel Luttermann
mRyOuNg wrote:

> Hi there,

> I'm trying to setup a DKIM signing through Amavis with a multipath
> amavis configuration as explained in the documentation ...

> Every mail sent to 127.0.0.1:10024 are foreign and not signed ...
> Every mail sent to 127.0.0.1:10026 are originnating and are signed ...

> This works pretty nicely if i do some tests directly via telnet ...

> But i can't make it works from postfix ... Indeed, Postfix is always
> sending mail as foreign (10024) even when they are supposed to be
> originnating (for example, when i send a mail from localhost which is in
> the $mynetworks configuration parameters)...

> My configuration looks like the following:

> -- from main.cf
> content_filter = amavisfeed:[127.0.0.1]:10024

> smtpd_client_restrictions =
>check_client_access regexp:/etc/postfix/tag_as_originating.re,
>permit_mynetworks,
>permit_sasl_authenticated,
>check_client_access regexp:/etc/postfix/tag_as_foreign.re,
>reject_unknown_reverse_client_hostname

> smtpd_recipient_restrictions = permit_mynetworks,
>reject_unauth_destination,
>check_policy_service inet:127.0.0.1:10030

> -- from tag_as_originating.re
> /^/ FILTER amavisfeed:[127.0.0.1]:10026

> -- from tag_as_foreign.re
> /^/ FILTER amavisfeed:[127.0.0.1]:10024

> I know this seems to be more a "postfix" problem, than an amavis problem
> ... But i first thought to come here, as i found all this information
> from the amavis Website ...

> Anyone having any idea about it ?

> Thanks in advance for your answer ...

Do you have more than one IP for your server? If so it were possible
to seperate in and outgoing emails with different content filters per
IP in master.cf.

It's then not necassary to use check_client_access in the postfix
restrictions.

-- 
Daniel




--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
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] crm114

2009-04-22 Thread Daniel Luttermann
Luigi Rosa wrote:

> I am interested in crm114 as a plugin of SA or as a scanner parallel to SA.

> Are there detailed HOWTOs, experiences, suggestions... on the web?

I only know the CRM114 Spamassassin-Plugin from here:
http://mschuette.name/wp/crm114-spamassassin-plugin/

So I think the easiest way is to use this plugin with spamassassin.

As I've read it should work and could be a replacement/addition for
bayes but personally I've no experiences with it...

With the new amavisd-new 2.63 it's worth a try because amavisd-new
supports crm114 without additional patches.

-- 
Daniel



--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
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] mails not controlled (passed or blocked)

2009-04-21 Thread Daniel Luttermann
Sasa wrote:

> main.cf

> myorigin = $myhostname
> mydomain = mydomain.com
> myhostname = mail.mydomain.com
> mynetworks = 127.0.0.0/8, 192.168.1.0/16
> smtpd_sasl_security_options = noanonymous
> smtpd_sasl_local_domain = $myhostname
> broken_sasl_auth_clients = yes
> smtpd_recipient_restrictions = permit_sasl_authenticated, 
> reject_unauth_destination,
> reject_rbl_client list.dsbl.org,
> reject_rbl_client sbl-xbl.spamhaus.org,
> reject_rbl_client cbl.abuseat.org,
> reject_rbl_client bl.spamcop.net

please remove list.dsbl.org from recipient restrictions because this
list does no longer exists (see: http://dsbl.org/)

Then you could remove sbl-xbl.spamhaus.org and cbl.abuseat.org and
use zen.spamhaus.org instead. See: http://www.spamhaus.org/zen/

Zen contains the sbl-xbl and abuseat data and also the "PBL".

> smtpd_sender_restrictions =
>   check_sender_access hash:/etc/postfix/access

Content of this file? Do you control here which users can send /
receive / filter mails or do you use some "generic" checks here?

Do you've set @local_domains_maps in amavisd.conf to match your local
domains (as defined in $mydestination or virtual_alias_domains)?

After these changes please increase the log level to check if the
mails gets through amavisd.

amavisd.conf

$log_level = 5;

master.cf
=
smtp  inet  n   -   n   -   -   smtpd -v

-- 
Daniel



--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
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] mails not controlled (passed or blocked)

2009-04-20 Thread Daniel Luttermann
Sasa wrote:

> in amavisd.conf (also in amavisd.conf-maia) I have this value:

> $sa_tag_level_deflt  = -999;
> $sa_tag2_level_deflt = 5.0;
> $sa_kill_level_deflt = 5.0;
> $sa_dsn_cutoff_level = 10;

> ..also on another mail server I have the same parameter and all mails are
> contolled.
> can I send another another information for to detect my problem ?

OK, tag levels are OK but when I look at your logfile again I don't
see that the message gets through amavisd.

Have you configured amavis as content filter in main.cf for global
filtering or do you use "per recipient filtering"?

Can you post your master.cf / main.cf?

You could also try to increase the log level in amavisd and use
verbose logging in postfix.

amavisd.conf

$log_level = 5;

master.cf
=
smtp  inet  n   -   n   -   -   smtpd -v

Perhaps the verbose logging helps to find the problem.

-- 
Daniel Luttermann



--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
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] mails not controlled (passed or blocked)

2009-04-20 Thread Daniel Luttermann
Sasa wrote:

> Hi, I use amavisd-new 2.2.1 with Maia-1.0.2 & Postfix-2.5.6 & ClamAV& 
> SA-3.2.5 but I have a problem because a few mails aren't controlled, I have
> tried to send mail from the same computer to two different address 
> detination and I have two diffent result, in log file I have for the first
> mail :

this amavisd-new version is a bit old but should work.

> In first mail from t...@mydomain.com to sa...@anotherdomain.com I have
> "Passed CLEAN" with score 3.693 but in the second mail from 
> t...@mydomain.com to s...@anotherdomain2.it I don't view 'Passed' (or 
> 'Blocked') and I don't view the score.

Maybe the "tag_levels" are to low. amavisd-new insert these headers
when the score of an email is greater than the value of "tag_level".

See:
http://www.ijs.si/software/amavisd/amavisd-new-docs.html#tagkill
http://www.ijs.si/software/amavisd/#faq-spam

I don't know Maia Mailguard but there should be options like "Add
spam score headers when score is" or else. Are there a webfrontend to
configure these settings?

-- 
Daniel Luttermann




--
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
___
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] Spamassassin Scores

2009-04-15 Thread Daniel Luttermann

Jeff Grossman wrote on 15.04.2009:

> I have just started using Amavis and have a question regarding an
> discrepancy between the Spamassassin header in a spam message and the
> Spamassassin report included in the spam notification.

> Here is the report in the spam notification:

> Content analysis details:   (22.0 points, 5.0 required)

Looks like the default spamassassin settings from local.cf.

> And, here is the report in the header of the quarantined message:

> X-Spam-Status: Yes, score=21.973 tag=- tag2=8 kill=10
>  tests=[AV:Sanesecurity.Junk.8084.UNOFFICIAL=0, AV_SS=7.5,
> BAYES_99=7,
>  FORGED_MUA_OUTLOOK=3.116, FORGED_OUTLOOK_HTML=0.001,
>  FORGED_OUTLOOK_TAGS=0.001, HTML_MESSAGE=0.001,
> MIME_HTML_ONLY=1.457,
>  MSOE_MID_WRONG_CASE=0.82, SUBJ_ALL_CAPS=2.077] autolearn=spam

> How come the required value is only 5 in the spam notification while
> in the config files and the header it shows as 8?

Spamassassin uses a default score of 5.0 (local.cf). When you run
spamassassin as user root or another user then the settings from
local.cf are used because you run spamassassin directly.

amavis runs as user "amavis" (or another dedicated user) and uses the
settings from amavisd.conf when it calls spamassassin.

The spam score itself are nearly the same (22.0 points) so it's OK.

See also:
http://www.ijs.si/software/amavisd/#faq-spam


-- 
Daniel Luttermann




--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
___
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/