[AMaViS-user] policy bank problem
i have defined @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 203.90.11.8/21 ); policy_bank{'MYNETS'} = { # mail originating from @mynetworks $sa_tag_level_deflt = [undef], # 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 = [18.0], # triggers spam evasive actions $sa_mail_body_size_limit = [400*1024], # don't waste time on SA if mail is larger $sa_local_tests_only = [0],# only tests which do not require internet access? $final_virus_destiny = [D_BOUNCE], $final_banned_destiny = [D_BOUNCE], $final_spam_destiny = [D_DISCARD], $final_bad_header_destiny = [D_BOUNCE], }; but its giving me Error in config file /etc/amavisd.conf: Can't locate object method policy_bank via package MYNETS (perhaps you forgot to load MYNETS?) at /etc/amavisd.conf - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] Amavisd killed on high volume mails
As reported in last mail, my amavis will be killed on high-volume mails. Here's my amavisd debug report: Jun 1 10:25:29 zero amavis[13931]: starting. /usr/local/sbin/amavisd at zero.x.it amavisd-new-2.5.1 (20070531), Unicode aware Jun 1 10:25:29 zero amavis[13931]: user=, EUID: 0 (0); group=, EGID: 0 (0) Jun 1 10:25:29 zero amavis[13931]: Perl version 5.008007 Jun 1 10:25:34 zero amavis[13931]: SpamControl: init_pre_chroot done Jun 1 10:25:34 zero amavis[13986]: Net::Server: Process Backgrounded Jun 1 10:25:34 zero amavis[13986]: Net::Server: 2007/06/01-10:25:34 Amavis (type Net::Server::PreForkSimple) starting! pid(13986) Jun 1 10:25:34 zero amavis[13986]: Net::Server: Binding to UNIX socket file /var/amavis/amavisd.sock using SOCK_STREAM Jun 1 10:25:34 zero amavis[13986]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1 Jun 1 10:25:34 zero amavis[13986]: Net::Server: Setting gid to 105 105 Jun 1 10:25:35 zero amavis[13986]: Net::Server: Setting uid to 1004 Jun 1 10:25:35 zero amavis[13986]: Module Amavis::Conf2.089 Jun 1 10:25:35 zero amavis[13986]: Module Archive::Zip1.18 Jun 1 10:25:35 zero amavis[13986]: Module BerkeleyDB 0.27 Jun 1 10:25:35 zero amavis[13986]: Module Compress::Zlib 1.41 Jun 1 10:25:35 zero amavis[13986]: Module Convert::TNEF 0.17 Jun 1 10:25:35 zero amavis[13986]: Module Convert::UUlib 1.09 Jun 1 10:25:35 zero amavis[13986]: Module DBD::mysql 3.0002 Jun 1 10:25:35 zero amavis[13986]: Module DBI 1.48 Jun 1 10:25:35 zero amavis[13986]: Module DB_File 1.811 Jun 1 10:25:35 zero amavis[13986]: Module Digest::MD5 2.33 Jun 1 10:25:35 zero amavis[13986]: Module MIME::Entity5.420 Jun 1 10:25:35 zero amavis[13986]: Module MIME::Parser5.420 Jun 1 10:25:35 zero amavis[13986]: Module MIME::Tools 5.420 Jun 1 10:25:35 zero amavis[13986]: Module Mail::Header1.77 Jun 1 10:25:35 zero amavis[13986]: Module Mail::Internet 1.77 Jun 1 10:25:35 zero amavis[13986]: Module Mail::SPF::Query1.997 Jun 1 10:25:35 zero amavis[13986]: Module Mail::SpamAssassin 3.002000 Jun 1 10:25:35 zero amavis[13986]: Module Net::DNS0.53 Jun 1 10:25:35 zero amavis[13986]: Module Net::Server 0.96 Jun 1 10:25:35 zero amavis[13986]: Module Time::HiRes 1.9707 Jun 1 10:25:35 zero amavis[13986]: Module URI 1.35 Jun 1 10:25:35 zero amavis[13986]: Module Unix::Syslog0.99 Jun 1 10:25:35 zero amavis[13986]: Amavis::DB code loaded Jun 1 10:25:35 zero amavis[13986]: Amavis::Cache code loaded Jun 1 10:25:35 zero amavis[13986]: SQL base codeNOT loaded Jun 1 10:25:35 zero amavis[13986]: SQL::Log codeNOT loaded Jun 1 10:25:35 zero amavis[13986]: SQL::Quarantine NOT loaded Jun 1 10:25:35 zero amavis[13986]: Lookup::SQL code NOT loaded Jun 1 10:25:35 zero amavis[13986]: Lookup::LDAP codeNOT loaded Jun 1 10:25:35 zero amavis[13986]: AM.PDP-in proto code loaded Jun 1 10:25:35 zero amavis[13986]: SMTP-in proto code loaded Jun 1 10:25:35 zero amavis[13986]: Courier proto code NOT loaded Jun 1 10:25:35 zero amavis[13986]: SMTP-out proto code loaded Jun 1 10:25:35 zero amavis[13986]: Pipe-out proto code NOT loaded Jun 1 10:25:35 zero amavis[13986]: BSMTP-out proto code NOT loaded Jun 1 10:25:35 zero amavis[13986]: Local-out proto code loaded Jun 1 10:25:35 zero amavis[13986]: OS_Fingerprint code NOT loaded Jun 1 10:25:35 zero amavis[13986]: ANTI-VIRUS code NOT loaded Jun 1 10:25:35 zero amavis[13986]: ANTI-SPAM code loaded Jun 1 10:25:35 zero amavis[13986]: ANTI-SPAM-SA codeloaded Jun 1 10:25:35 zero amavis[13986]: Unpackers code loaded Jun 1 10:25:35 zero amavis[13986]: Found $fileat /usr/bin/file Jun 1 10:25:35 zero amavis[13986]: No $dspam, not using it Jun 1 10:25:35 zero amavis[13986]: No $altermime, not using it Jun 1 10:25:35 zero amavis[13986]: Internal decoder for .mail Jun 1 10:25:35 zero amavis[13986]: Internal decoder for .asc Jun 1 10:25:35 zero amavis[13986]: Internal decoder for .uue Jun 1 10:25:35 zero amavis[13986]: Internal decoder for .hqx Jun 1 10:25:35 zero amavis[13986]: Internal decoder for .ync Jun 1 10:25:35 zero amavis[13986]: No decoder for .Ftried: unfreeze, freeze -d, melt, fcat Jun 1 10:25:35 zero amavis[13986]: Found decoder for.Z at /usr/bin/uncompress Jun 1 10:25:35 zero amavis[13986]: Found decoder for.gz at /usr/bin/gzip -d Jun 1 10:25:35 zero amavis[13986]: Found decoder for.bz2 at /usr/bin/bzip2 -d Jun 1 10:25:35 zero amavis[13986]: No decoder for .lzo tried: lzop -d Jun 1 10:25:35 zero amavis[13986]: Found decoder for.rpm at /usr/bin/rpm2cpio Jun 1 10:25:35 zero amavis[13986]: Found decoder for.cpio at /bin/cpio Jun 1 10:25:35 zero amavis[13986]: Found decoder for.tar at /bin/cpio Jun 1 10:25:35
[AMaViS-user] Can't connect to UNIX socket /var/run/clamav/clamd: Permission denied
Hallo, I installed amavis-new for the first time this morning and noticed this message in my logs. I have not been able to solve it by myself, so ask for some assistance. Clamd runs as user clamav:clamav. User amavis:amavis also belong to group clamav. Directory /var/run/clamav is owned by clamav:clamav, permissions rwxrwx---; socket /var/run/clamav/clamd is owned by clamav:clamav, permissions srwxrwxrwx. What is it that I don't see? Groeten, Hans. jdh punt beekhuizen bij duinheks punt xs4all punt nl --- GoldED+/LNX 1.1.5/070407 * Origin: The Wizard is using MBSE/Linux (2:280/1018) - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] policy bank problem
Azfar wrote: i have defined @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10 203.90.11.8/21 ); policy_bank{'MYNETS'} = { # mail originating from @mynetworks $policy_bank, not policy_bank $sa_tag_level_deflt = [undef], sa_tag_level_deflt, not $sa_tag_level_deflt Is this setting different than what is already in amavisd.conf? Keep in mind the X-Spam headers still will not be written for non local recipients $sa_tag2_level_deflt = [5.0], # add 'spam detected' headers at that level sa_tag2_level_deflt, not $sa_tag2_level_deflt Keep in mind the X-Spam headers and Subject: tag still will not be written for non local recipients $sa_kill_level_deflt = [18.0], # triggers spam evasive actions sa_kill_level_deflt, not $sa_kill_level_deflt $sa_mail_body_size_limit = [400*1024], sa_mail_body_size_limit, not $sa_mail_body_size_limit Is this different than normal? $sa_local_tests_only = [0], sa_local_tests_only, not $sa_local_tests_only Is this different than normal? remove $ from all $final_virus_destiny = [D_BOUNCE], $final_banned_destiny = [D_BOUNCE], $final_spam_destiny = [D_DISCARD], $final_bad_header_destiny = [D_BOUNCE], }; but its giving me Error in config file /etc/amavisd.conf: Can't locate object method policy_bank via package MYNETS (perhaps you forgot to load MYNETS?) at /etc/amavisd.conf This could be probably be corrected and shortened to: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks sa_tag2_level_deflt = [5.0], sa_kill_level_deflt = [18.0], final_virus_destiny = [D_BOUNCE], final_banned_destiny = [D_BOUNCE], final_spam_destiny = [D_DISCARD], final_bad_header_destiny = [D_BOUNCE], }; Gary V - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] Can't connect to UNIX socket /var/run/clamav/clamd: Permission denied
lists wrote: Hallo, I installed amavis-new for the first time this morning and noticed this message in my logs. I have not been able to solve it by myself, so ask for some assistance. Clamd runs as user clamav:clamav. User amavis:amavis also belong to group clamav. Directory /var/run/clamav is owned by clamav:clamav, permissions rwxrwx---; socket /var/run/clamav/clamd is owned by clamav:clamav, permissions srwxrwxrwx. What is it that I don't see? Groeten, Hans. Possibly missing: AllowSupplementaryGroups yes in clamd.conf http://www200.pair.com/mecham/spam/clamav-amavisd-new.html Gary V - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] policy bank problem
Gary wrote: Azfar wrote: Gary wrote: This could be probably be corrected and shortened to: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks sa_tag2_level_deflt = [5.0], sa_kill_level_deflt = [18.0], final_virus_destiny = [D_BOUNCE], final_banned_destiny = [D_BOUNCE], final_spam_destiny = [D_DISCARD], final_bad_header_destiny = [D_BOUNCE], }; I made mistakes too, need to fix my fix: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks sa_tag2_level_deflt = 5.0, sa_kill_level_deflt = 18.0, final_virus_destiny = D_BOUNCE, final_banned_destiny = D_BOUNCE, final_spam_destiny = D_DISCARD, final_bad_header_destiny = D_BOUNCE, }; Gary V - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] policy bank problem
Gary wrote: This could be probably be corrected and shortened to: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks sa_tag2_level_deflt = [5.0], sa_kill_level_deflt = [18.0], final_virus_destiny = [D_BOUNCE], final_banned_destiny = [D_BOUNCE], final_spam_destiny = [D_DISCARD], final_bad_header_destiny = [D_BOUNCE], }; I made mistakes too, need to fix my fix: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks sa_tag2_level_deflt = 5.0, sa_kill_level_deflt = 18.0, final_virus_destiny = D_BOUNCE, final_banned_destiny = D_BOUNCE, final_spam_destiny = D_DISCARD, final_bad_header_destiny = D_BOUNCE, }; This is getting to be a bad habit. Not the first time I have done this, let me try again: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks spam_tag2_level_maps = 5.0, spam_kill_level_maps = 18.0, final_virus_destiny = D_BOUNCE, final_banned_destiny = D_BOUNCE, final_spam_destiny = D_DISCARD, final_bad_header_destiny = D_BOUNCE, }; Gary V - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] policy bank problem
Gary wrote: This is getting to be a bad habit. Not the first time I have done this, let me try again: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks spam_tag2_level_maps = 5.0, spam_kill_level_maps = 18.0, final_virus_destiny = D_BOUNCE, final_banned_destiny = D_BOUNCE, final_spam_destiny = D_DISCARD, final_bad_header_destiny = D_BOUNCE, }; So (from the original post) why is this wrong (as an example):? $sa_tag2_level_deflt = [5.0], # add 'spam detected' headers at that level sa_tag2_level_deflt is not a member of policy banks, but spam_tag2_level_maps is. Drop the $ because we are not trying to assign a value to a scaler here, as we would be doing elsewhere in amavisd.conf, we are instead creating a key that references a variable. The square brackets in the example [5.0] would only be required if there were a list of values; the brackets could be used here (there is a list of 1 value), but for a _maps setting like this (that normally would take a list of values), the brackets are not required when there is only a single value. The final_*_destiny settings only take a single value, not a list. So, this should be Ok too: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks spam_tag2_level_maps = [5.0], spam_kill_level_maps = [18.0], final_virus_destiny = D_BOUNCE, final_banned_destiny = D_BOUNCE, final_spam_destiny = D_DISCARD, final_bad_header_destiny = D_BOUNCE, }; Mark, I'm kind of winging it here. I hope I'm not too far off. :) Gary V - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] Can't connect to UNIX socket /var/run/clamav/clamd:
lists wrote: Hallo Gary, Op zaterdag 02 juni 2007 schreef Gary V aan amavis-user@lists.sourceforge.net: I installed amavis-new for the first time this morning and noticed this message in my logs. GV Possibly missing: GV AllowSupplementaryGroups yes GV in clamd.conf Alas. I saw that one mentioned in the docs and did put it in. Groeten, Hans. User amavis:amavis also belong to group clamav. This may not help, but I always add the clamav user to the amavis group, not the amavis user to the clamav group. Then: stop amavisd stop clamd start clamd start amavisd Gary V - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] Error in template?
Hallo und Guten Abend AMaViS-user, I use [? %q |Not quarantined. | The message has been quarantined as: %q] in template notify_virus_recips.txt. And $final_virus_destiny = D_DISCARD; # (defaults to D_BOUNCE) $final_banned_destiny = D_DISCARD; # (defaults to D_BOUNCE) in amavisd.conf The viruses/banned files also land properly in the specially mail box. However, the notification of the recipient is unfortunately: Not quarantined. What`s wrong? I use amavisd-new 2.5.1 -- Viele Gruesse, Kind regards, Jim Knuth [EMAIL PROTECTED] ICQ #277289867 -- Zufalls-Zitat -- Gedanken springen wie Flöhe von einem zum anderen, aber sie beißen nicht jeden. (George Bernard Shaw, irischer Dramatiker, 1856-1950) -- Der Text hat nichts mit dem Empfaenger der Mail zu tun -- Virus free. Checked by NOD32 Version 2305 Build 9959 01.06.2007 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] Can't connect to UNIX socket /var/run/clamav/clamd: Permission denied
Hans, I installed amavis-new for the first time this morning and noticed this message in my logs. I have not been able to solve it by myself, so ask for some assistance. Clamd runs as user clamav:clamav. Directory /var/run/clamav is owned by clamav:clamav, permissions rwxrwx---; socket /var/run/clamav/clamd is owned by clamav:clamav, permissions srwxrwxrwx. User amavis:amavis also belong to group clamav. As Gary noticed, this is irrelevant, what matters is placing user clamav to the amavis group, as documented in the INSTALL document: - some virus scanners run as daemons or change UID when checking files. It is easiest to run such virus scanners under the same UID/GID (or at least within the same group) as amavisd, to avoid file permission problems when virus scanner reads files prepared for checking by amavisd daemon. Some virus scanners may require write permission to the $TEMPBASE directory to be able to create auxiliary files there. If a different UID is preferred for an AV scanner, a solution for ClamAV is to add user clamav to the amavis group (e.g.: vscan:*:110:clamav in a file /etc/group), and then add: AllowSupplementaryGroups yes to clamd.conf. Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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] policy bank problem
Gary, The square brackets in the example [5.0] would only be required if there were a list of values; the brackets could be used here (there is a list of 1 value), but for a _maps setting like this (that normally would take a list of values), the brackets are not required when there is only a single value. The final_*_destiny settings only take a single value, not a list. So, this should be Ok too: $policy_bank{'MYNETS'} = { # mail originating from @mynetworks spam_tag2_level_maps = [5.0], spam_kill_level_maps = [18.0], final_virus_destiny = D_BOUNCE, final_banned_destiny = D_BOUNCE, final_spam_destiny = D_DISCARD, final_bad_header_destiny = D_BOUNCE, }; Mark, I'm kind of winging it here. I hope I'm not too far off. :) You are doing alright, thanks! The above example looks fine. the brackets are not required when there is only a single value True, due to special concession in sub cr, which fetches array-type keys (like *_maps) from policy banks: # return a ref to a config variable value (which is supposed to be an array), # converting undef to an empty array, and a scalar to a one-element array # if necessary sub ca($) { ... } Also Perl itself is merciful if someone assigns a scalar to an array-type variable (variable name starting with @), and automatically supplies missing parenthesis - although it is ugly to rely on this. When an list (=array) is called-for in an assignment, please provide a list, e.g.: @bypass_spam_checks_maps = (1); and not a single scalar like: @bypass_spam_checks_maps = 1; # ugly, Perl converts # a scalar 1 into a list (1) Similarly in policy banks, correct: $policy_bank{'TEST'} = { bypass_spam_checks_maps = [1], }; and not a sloppy: $policy_bank{'TEST'} = { bypass_spam_checks_maps = 1, }; which happens to work, converting a scalar 1 into an array reference [1] by a routine cr. From RELEASE_NOTES when policy banks were introduced: A word of caution: the syntax of entries within a policy bank hash is slightly different from assignments to configuration variables. This is because entries within policy bank are not asssignments, but key=value pairs as in any Perl hash. And these pairs are delimited by commas, unlike statements, which are delimited by semicolons. Value is separated from its key by '=' (or by a comma), whereas the assignment operator is '='. Keys of a policy bank are without leading $ or @ or %, unlike variable names. Values of a hash can only be scalars (e.g. strings or references). Compare: - value of a policy bank is a reference to a Perl hash, e.g.: { log_level = 3, forward_method = 'smtp:[127.0.0.1]:10025', spam_admin_maps = [[EMAIL PROTECTED]], } - normal assignments look like: $log_level = 3; $forward_method = 'smtp:[127.0.0.1]:10025'; @spam_admin_maps = ([EMAIL PROTECTED]); Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ 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/