Amavis - sendmail

jaroslav.linhart na dev-net.cz jaroslav.linhart na dev-net.cz
Čtvrtek Duben 29 08:53:20 CEST 2004


Dobrý den,
mohl by mi nekdo pomoci ohledne amavis-new a sendmail.  Chci rozchodit AVG 
a potrebuji amavis-new - spojit s sendmailem. Nainstaloval jsem vsechny 
Perl moduly a externi zipy. Zadnou chybovou hlasku mi to nedalo.

dub 29 07:41:00 linux.test.cz amavisd[7576]: starting.  amavisd at 
linux.test.cz amavisd-new-20030616-p8, Unicode aware, LANG=cs_CZ.UTF-8
dub 29 07:41:01 linux.test.cz amavisd[7576]: Perl version 5.008
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Amavis::Conf 1.15
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Archive::Tar 1.08
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Archive::Zip 1.10
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Compress::Zlib 1.33
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Convert::TNEF 0.17
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Convert::UUlib 1.03
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module MIME::Entity 5.404
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module MIME::Parser 5.406
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module MIME::Tools 5.411
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Mail::Header 1.62
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Mail::Internet 1.62
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Mail::SpamAssassin 
2.44
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Net::Cmd 2.25
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Net::DNS 0.47
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Net::SMTP 2.28
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Net::Server 0.87
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Time::HiRes 1.59
dub 29 07:41:01 linux.test.cz amavisd[7576]: Module Unix::Syslog 0.99
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found myself: 
/usr/local/sbin/amavisd -c /etc/amavisd.conf
dub 29 07:41:01 linux.test.cz amavisd[7576]: Lookup::SQL code       NOT 
loaded
dub 29 07:41:01 linux.test.cz amavisd[7576]: Lookup::LDAP code      NOT 
loaded
dub 29 07:41:01 linux.test.cz amavisd[7576]: AMCL-in protocol code  loaded
dub 29 07:41:01 linux.test.cz amavisd[7576]: SMTP-in protocol code  loaded
dub 29 07:41:01 linux.test.cz amavisd[7576]: ANTI-VIRUS code        loaded
dub 29 07:41:01 linux.test.cz amavisd[7576]: ANTI-SPAM  code        loaded
dub 29 07:41:01 linux.test.cz amavisd[7576]: Net::Server: 
2004/04/29-07:41:01 Amavis (type Net::Server::PreForkSimple) starting! 
pid(7576)
dub 29 07:41:01 linux.test.cz amavisd[7576]: Net::Server: Binding to UNIX 
socket file /var/amavis/amavisd.sock using SOCK_STREAM
dub 29 07:41:01 linux.test.cz amavisd[7576]: Net::Server: Binding to TCP 
port 10024 on host 127.0.0.1
dub 29 07:41:01 linux.test.cz amavisd[7576]: Net::Server: Setting gid to 
"500 500"
dub 29 07:41:01 linux.test.cz amavisd[7576]: Net::Server: Setting uid to 
"511"
dub 29 07:41:01 linux.test.cz amavisd[7576]: Net::Server: Setting up 
serialization via flock
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $file       at 
/usr/local/bin/file
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $arc        at 
/usr/local/bin/nomarch
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $gzip       at 
/usr/local/bin/gzip
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $bzip2      at 
/usr/bin/bzip2
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $lzop       at 
/usr/local/bin/lzop
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $lha        at 
/usr/bin/lha
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $unarj      at 
/usr/local/bin/unarj
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $uncompress at 
/usr/local/bin/gzip -d
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $unfreeze   at 
/usr/local/bin/unfreeze
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $unrar      at 
/usr/bin/unrar
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $zoo        at 
/usr/bin/zoo
dub 29 07:41:01 linux.test.cz amavisd[7576]: Found $cpio       at 
/usr/local/bin/cpio
dub 29 07:41:01 linux.test.cz amavisd[7576]: Using internal av scanner 
code for (primary) AVG Anti-Virus
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
KasperskyLab AVP - aveclient
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
KasperskyLab AntiViral Toolkit Pro (AVP)
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
KasperskyLab AVPDaemonClient
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: H+BEDV 
AntiVir or CentralCommand Vexira Antivirus
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
Command AntiVirus for Linux
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
Symantec CarrierScan via Symantec CommandLineScanner
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
Symantec AntiVirus Scan Engine
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: drweb 
- DrWeb Antivirus
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
F-Secure Antivirus
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: CAI 
InoculateIT
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
MkS_Vir for Linux (beta)
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
MkS_Vir daemon
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: ESET 
Software NOD32
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: ESET 
Software NOD32 - Client/Server Version
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: Norman 
Virus Control v5 / Linux
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: Panda 
Antivirus for Linux
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: NAI 
McAfee AntiVirus (uvscan)
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
VirusBuster
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
CyberSoft VFind
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: Ikarus 
AntiVirus for Linux
dub 29 07:41:01 linux.test.cz amavisd[7576]: No primary av scanner: 
BitDefender
dub 29 07:41:01 linux.test.cz amavisd[7576]: No secondary av scanner: Clam 
Antivirus - clamscan
dub 29 07:41:01 linux.test.cz amavisd[7576]: No secondary av scanner: 
FRISK F-Prot Antivirus
dub 29 07:41:01 linux.test.cz amavisd[7576]: No secondary av scanner: 
Trend Micro FileScanner
dub 29 07:41:01 linux.test.cz amavisd[7576]: No secondary av scanner: 
KasperskyLab kavscanner
dub 29 07:41:01 linux.test.cz amavisd[7576]: SpamControl: initializing 
Mail::SpamAssassin
dub 29 07:41:08 linux.test.cz amavisd[7576]: SpamControl: done
dub 29 07:41:08 linux.test.cz amavisd[7576]: Net::Server: Beginning 
prefork (2 processes)
dub 29 07:41:08 linux.test.cz amavisd[7576]: Net::Server: Starting "2" 
children
dub 29 07:41:08 linux.test.cz amavisd[7579]: Net::Server: Child Preforked 
(7579)
dub 29 07:41:09 linux.test.cz amavisd[7580]: Net::Server: Child Preforked 
(7580)
dub 29 07:41:09 linux.test.cz amavisd[7576]: Net::Server: Parent ready for 
children.



Spustil jsem amavisd
V konfigu amavisd.conf jsem definoval domenu, uzivatele, grupu nic vic. 
Urcite se tam má jeste neco okomentovat ale nevím co.
V sendmail.cf jsem dle readme udělal toto:

tep 1: Copy your /etc/sendmail.cf file to /etc/sendmail.orig.cf
Step 2: Change sendmail.cf manually

a) open /etc/sendmail.cf in your favorite editor

b) change the queue directory, i.e. to
O QueueDirectory=/var/spool/mqamavis

c) change the status file, i.e. to
O StatusFile=/var/log/amavis.st

d) change rule set 0 to
R$*             $: $>Parse0 $1          initial parsing
R<@>            $#local $: <@>          special case error msgs
R$*             $: $>98 $1              handle local hacks
R$*             $#amavis $:$1
#R$*            $: $>Parse1 $1          final parsing 

Be careful of tabs, so here's the code again, instead of [tab] press
the tab key :-)

R$*[tab][tab]$: $>Parse0 $1[tab][tab]initial parsing
R<@>[tab][tab]$#local $: <@>[tab][tab]special case error msgs
R$*[tab][tab]$: $>98 $1[tab][tab]handle local hacks
R$*[tab][tab]$#amavis $:$1
#R$*[tab][tab]$: $>Parse1 $1[tab][tab]final parsing 

Add the new mailer definition:
Mamavis,        P=/usr/sbin/amavis, F=nmlsACDFMS5:/|@qhP, S=0, R=0,
                T=DNS/RFC822/X-Unix, U=amavis:amavis,
                A=amavis $f $u



Step 3, with amavisd-new: change the settings of $forward_method and
$notify_method in /etc/amavisd.conf:
  $forward_method= 'pipe:flags=q argv=/usr/sbin/sendmail -i -f ${sender} 
-- ${recipient}';
  $notify_method = 'pipe:flags=q argv=/usr/sbin/sendmail -i -f ${sender} 
-- ${recipient}';

Step 4: Create /var/spool/mqamavis with the same permissions as
/var/spool/mqueue but owner and group should be amavis

udelal jsem restart sendmailu a napsalo to do maillog toto:

Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 11: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 11: mailer-daemon... cannot alias non-local names
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 12: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 12: postmaster... cannot alias non-local names
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 15: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 15: bin... cannot alias non-local names
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 16: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 16: daemon... cannot alias non-local names
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 17: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 17: adm... cannot alias non-local names
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 18: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 18: lp... cannot alias non-local names
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 19: buildaddr: no user
Apr 29 07:53:13 linux sendmail[7696]: NOQUEUE: SYSERR(root): /etc/aliases: 
line 19: sync... cannot alias non-local names


Pokud poslu email na tento server v mail log je tato hlaska:


Apr 29 07:21:38 linux sendmail[7432]: i3T5Lbri007432: SYSERR(root): 
buildaddr: no user
Apr 29 07:22:30 linux sendmail[7442]: i3T5MUri007442: SYSERR(root): 
buildaddr: no user

Muzete mi nekdo pomoci

Jaroslav Linhart


Další informace o konferenci Linux