amavis no escucha el puerto
Juan Andres Ramirez
jandresaedo en gmail.com
Jue Feb 26 10:35:08 CLST 2009
On Wed, Feb 25, 2009 at 4:14 PM, Rolando Mota <barbudone en gmail.com> wrote:
> 2009/2/25 Juan Andres Ramirez <jandresaedo en gmail.com>
>
>> Hola Listeros:
>> Estoy dando de alta un nuevo server de correo, y el unico
>> problema que he tenido es que amavisd no esta escuchando ni por el
>> puerto que debería ni por ningún otro:
>> [root en mail2 log]# netstat -puta
>> Active Internet connections (servers and established)
>> Proto Recv-Q Send-Q Local Address Foreign Address
>> State PID/Program name
>> tcp 0 0 mail2.xxxx.com:10025 *:*
>> LISTEN 3120/master
>> tcp 0 0 *:mysql *:*
>> LISTEN 2359/mysqld
>> tcp 0 0 *:pop3 *:*
>> LISTEN 2390/dovecot
>> tcp 0 0 mail2.xxxxx:dyna-access *:*
>> LISTEN 2264/clamd
>> tcp 0 0 mail2.xxxxx.com:imap *:*
>> LISTEN 2390/dovecot
>>
>>
>> Simplemente no aparece.
>>
>> Pero el servicio esta arriba:
>> ps -A
>>
>> 3160 ? 00:00:01 amavisd
>> 3166 ? 00:00:00 amavisd
>> 3167 ? 00:00:00 amavisd
>> 2264 ? 00:00:00 clamd
>>
>>
>>
>> Postfix también responde por donde deberia:
>> telnet localhost 10025 y al 25:
>> Connected to localhost.localdomain (127.0.0.1).
>> Escape character is '^]'.
>> 220 xxxx.xxxx.com ESMTP Postfix
>>
>> Configuracion de amavis:
>>
>> $daemon_user = 'amavis';
>> $daemon_group = 'clamav';
>> $mydomain = 'xxxx.com';
>> $MYHOME = '/var/amavis';
>> $QUARANTINEDIR = '/var/virusmails';
>> $db_home = "$MYHOME/db";
>> $helpers_home = "$MYHOME/var";
>> $pid_file = "$MYHOME/var/amavisd.pid";
>> $lock_file = "$MYHOME/var/amavisd.lock";
>> $log_level = 2;
>> $virus_admin = "mick\@$mydomain";
>> $mailfrom_notify_admin = "antivirus\@$mydomain";
>> $mailfrom_notify_spamadmin = "antivirus\@$mydomain";
>>
>> ['ClamAV-clamd',
>> \&ask_daemon, ["CONTSCAN {}\n", "/var/amavis/amavisd.sock"],
>> qr/\bOK$/, qr/\bFOUND$/,
>> qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
>>
>> En los logs no veo ningun error cuando inicia amavis, e Iptables lo tengo
>> abajo
>>
>> La linea de amavis que va en el main.cf tambien esta anotada:
>> content_filter = smtp-amavis:[127.0.0.1]:10024
>>
>> Y las lineas del master.cf:
>>
>> smtp-amavis unix - - n - 2 smtp
>> -o smtp_data_done_timeout=1200
>> -o smtp_send_xforward_command=yes
>> -o disable_dns_lookups=yes
>> -o max_use=100
>>
>> 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_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 mynetworks_style=host
>> -o mynetworks=127.0.0.0/8
>> -o strict_rfc821_envelopes=yes
>> -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
>>
>>
>> Cualquier comentario se los agradesco de antemano. Gracias.
>>
>>
>
>
> Esta correcta la ruta del socket ?
No lo se, en todos los manuales que vi la ruta al socket nunca
coincidia con la mia, estoy con un Centos 5, asi que decidi hacer un
locate *.sock:
/var/amavis/amavisd.sock
/var/lib/mysql/mysql.sock
/var/run/cups/cups.sock
He buscado un montón sobre el famoso socket , pero en todos los
manuales aparece un clamd.sock, y como ven ese sock no lo tengo.
> habilita la variable de los logs de amavisd, asi vemos pk se puso idiota
Aca van los logs de partida del amavis:
Feb 26 10:25:58 mail2 amavis[8445]: logging initialized, log level 2,
syslog: amavis.mail
Feb 26 10:25:58 mail2 amavis[8445]: starting. /usr/sbin/amavisd at
mail2.lagos-ing.com amavisd-new-2.5.4 (20080312), Unicode aware,
LANG="es_ES.UTF-8"
Feb 26 10:25:58 mail2 amavis[8445]: user=102, EUID: 102 (102);
group=, EGID: 103 103 (103 103)
Feb 26 10:25:58 mail2 amavis[8445]: Perl version 5.008008
Feb 26 10:25:58 mail2 amavis[8445]: INFO: SA version: 3.2.5, 3.002005,
no optional modules: Net::CIDR::Lite Sys::Hostname::Long
Mail::SpamAssassin::BayesStore::PgSQL Encode::Detect
Mail::SpamAssassin::Plugin::DKIM Razor2::Client::Agent
IP::Country::Fast Mail::DKIM Mail::DKIM::Verifier Image::Info
Image::Info::GIF Image::Info::JPEG Image::Info::PNG Image::Info::TIFF
Mail::SPF Mail::SPF::Server Mail::SPF::Request Mail::SPF::Mech
Mail::SPF::Mech::A Mail::SPF::Mech::PTR Mail::SPF::Mech::All
Mail::SPF::Mech::Exists Mail::SPF::Mech::IP4 Mail::SPF::Mech::IP6
Mail::SPF::Mech::Include Mail::SPF::Mech::MX Mail::SPF::Mod
Mail::SPF::Mod::Exp Mail::SPF::Mod::Redirect
Mail::SPF::SenderIPAddrMech Mail::SPF::v1::Record
Mail::SPF::v2::Record NetAddr::IP NetAddr::IP::Util
auto::NetAddr::IP::Util::inet_n2dx auto::NetAddr::IP::Util::ipv6_n2d
Mail::SPF::Query Crypt::OpenSSL::RSA
auto::Crypt::OpenSSL::RSA::new_public_key
auto::Crypt::OpenSSL::RSA::new_key_from_parameters
auto::Crypt::OpenSSL::RSA::get_key_parameters aut...
Feb 26 10:25:58 mail2 amavis[8445]:
...o::Crypt::OpenSSL::RSA::import_random_seed Digest::SHA Error
Feb 26 10:25:58 mail2 amavis[8445]: SpamControl: init_pre_chroot done
Feb 26 10:25:58 mail2 amavis[8446]: Net::Server: Process Backgrounded
Feb 26 10:25:58 mail2 amavis[8446]: Net::Server: 2009/02/26-10:25:58
Amavis (type Net::Server::PreForkSimple) starting! pid(8446)
Feb 26 10:25:58 mail2 amavis[8446]: Net::Server: Binding to UNIX
socket file /var/amavis/amavisd.sock using SOCK_STREAM
Feb 26 10:25:58 mail2 amavis[8446]: Net::Server: Group Not Defined.
Defaulting to EGID '103 103'
Feb 26 10:25:58 mail2 amavis[8446]: Net::Server: User Not Defined.
Defaulting to EUID '102'
Feb 26 10:25:58 mail2 amavis[8446]: config files read: /etc/amavisd.conf
Feb 26 10:25:58 mail2 amavis[8446]: Module Amavis::Conf 2.094
Feb 26 10:25:58 mail2 amavis[8446]: Module Archive::Zip 1.26
Feb 26 10:25:58 mail2 amavis[8446]: Module BerkeleyDB 0.36
Feb 26 10:25:58 mail2 amavis[8446]: Module Compress::Zlib 2.015
Feb 26 10:25:58 mail2 amavis[8446]: Module Convert::TNEF 0.17
Feb 26 10:25:58 mail2 amavis[8446]: Module Convert::UUlib 1.051
Feb 26 10:25:58 mail2 amavis[8446]: Module DBD::mysql 4.010
Feb 26 10:25:58 mail2 amavis[8446]: Module DBI 1.607
Feb 26 10:25:58 mail2 amavis[8446]: Module DB_File 1.814
Feb 26 10:25:58 mail2 amavis[8446]: Module Digest::MD5 2.36
Feb 26 10:25:58 mail2 amavis[8446]: Module Digest::SHA1 2.11
Feb 26 10:25:58 mail2 amavis[8446]: Module IO::Socket::INET6 2.56
Feb 26 10:25:58 mail2 amavis[8446]: Module MIME::Entity 5.420
Feb 26 10:25:58 mail2 amavis[8446]: Module MIME::Parser 5.420
Feb 26 10:25:58 mail2 amavis[8446]: Module MIME::Tools 5.420
Feb 26 10:25:58 mail2 amavis[8446]: Module Mail::Header 2.04
Feb 26 10:25:58 mail2 amavis[8446]: Module Mail::Internet 2.04
Feb 26 10:25:58 mail2 amavis[8446]: Module Mail::SpamAssassin 3.002005
Feb 26 10:25:58 mail2 amavis[8446]: Module Net::DNS 0.63
Feb 26 10:25:58 mail2 amavis[8446]: Module Net::Server 0.97
Feb 26 10:25:58 mail2 amavis[8446]: Module Time::HiRes 1.86
Feb 26 10:25:58 mail2 amavis[8446]: Module URI 1.35
Feb 26 10:25:58 mail2 amavis[8446]: Module Unix::Syslog 1.0
Feb 26 10:25:58 mail2 amavis[8446]: Amavis::DB code loaded
Feb 26 10:25:58 mail2 amavis[8446]: Amavis::Cache code loaded
Feb 26 10:25:58 mail2 amavis[8446]: SQL base code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: SQL::Log code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: SQL::Quarantine NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: Lookup::SQL code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: Lookup::LDAP code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: AM.PDP-in proto code loaded
Feb 26 10:25:58 mail2 amavis[8446]: SMTP-in proto code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: Courier proto code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: SMTP-out proto code loaded
Feb 26 10:25:58 mail2 amavis[8446]: Pipe-out proto code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: BSMTP-out proto code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: Local-out proto code loaded
Feb 26 10:25:58 mail2 amavis[8446]: OS_Fingerprint code NOT loaded
Feb 26 10:25:58 mail2 amavis[8446]: ANTI-VIRUS code loaded
Feb 26 10:25:58 mail2 amavis[8446]: ANTI-SPAM code loaded
Feb 26 10:25:58 mail2 amavis[8446]: ANTI-SPAM-SA code loaded
Feb 26 10:25:58 mail2 amavis[8446]: Unpackers code loaded
Feb 26 10:25:58 mail2 amavis[8446]: Found $file at /usr/bin/file
Feb 26 10:25:58 mail2 amavis[8446]: No $dspam, not using it
Feb 26 10:25:58 mail2 amavis[8446]: No $altermime, not using it
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .mail
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .asc
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .uue
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .hqx
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .ync
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .F at
/usr/bin/unfreeze
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .Z at
/usr/bin/uncompress
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .gz at
/usr/bin/gzip -d
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .gz
(backup, not used)
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .bz2 at
/usr/bin/bzip2 -d
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .lzo at
/usr/bin/lzop -d
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .rpm at
/usr/bin/rpm2cpio
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .cpio at /usr/bin/pax
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .tar at /usr/bin/pax
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .deb at /usr/bin/ar
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .zip
Feb 26 10:25:58 mail2 amavis[8446]: No decoder for .7z tried:
7zr, 7za, 7z
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .rar at /usr/bin/unrar
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .arj at /usr/bin/arj
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .arc at
/usr/bin/nomarch
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .zoo at /usr/bin/zoo
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .lha at /usr/bin/lha
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .cab at
/usr/bin/cabextract
Feb 26 10:25:58 mail2 amavis[8446]: No decoder for .tnef tried: tnef
Feb 26 10:25:58 mail2 amavis[8446]: Internal decoder for .tnef
Feb 26 10:25:58 mail2 amavis[8446]: Found decoder for .exe at
/usr/bin/unrar; /usr/bin/lha; /usr/bin/arj
Feb 26 10:25:58 mail2 amavis[8446]: Using primary internal av scanner
code for ClamAV-clamd
Feb 26 10:25:58 mail2 amavis[8446]: Found secondary av scanner
ClamAV-clamscan at /usr/bin/clamscan
Feb 26 10:25:58 mail2 amavis[8446]: Creating db in /var/amavis/db/;
BerkeleyDB 0.36, libdb 4.3
Feb 26 10:25:58 mail2 amavis[8446]: SpamControl: initializing Mail::SpamAssassin
Feb 26 10:26:00 mail2 amavis[8446]: SpamControl: init_pre_fork done
Feb 26 10:26:00 mail2 amavis[8452]: TIMING [total 10 ms] - bdb-open:
10 (100%)100, rundown: 0 (0%)100
Feb 26 10:26:00 mail2 amavis[8453]: TIMING [total 10 ms] - bdb-open:
10 (100%)100, rundown: 0 (0%)100
>
> --
> Larry Letelier N.
> barbudone en gmail.com
> lletelier en fedoraproject.org
>
Más información sobre la lista de distribución Linux