• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

FQDN für amavis unbedingt nötig?

Status
Für weitere Antworten geschlossen.

argy

Newbie
Hallo alle zusammen,

ich habe meinen Server mit einem Domainnamen ohne TLD "kp-netz" aufgesetzt. Bisher funktioniert auch alles ohne Probleme, Samba, Postfix. Leider verweigert amavis seinen Dienst mit der Fehlermeldung:

Starting virus-scanner (amavisd-new): The value of variable $myhostname is "linux-fac.kp-netz", but should have been
a fully qualified domain name; perhaps uname(3) did not provide such.
You must explicitly assign a FQDN of this host to variable $myhostname
in amavisd.conf, or fix what uname(3) provides as a host's network name!

Gibt es eine Möglichkeit, amavis umzustimmen, oder muß ich den Domainnamen wirklich ändern??

Danke für schnelle Hilfe
Axel
 

stka

Guru
läuft bei dir ein DNS-Server? Wenn nein hast du den Rechner in der /etc/hosts eingetragen? Du brauchst keine TLD, der Name deines Servers muss nur auflöbar sein.
 
OP
A

argy

Newbie
Hi,

es läuft kein DNS-Server. In der hosts-Datei sind die Rechner alle eingetragen:

meine hosts-Datei:
127.0.0.1 localhost.kp-netz localhost

192.168.1.200 linux-fac.kp-netz linux-fac
192.168.200.216 linux-esch.escher linux-esch

192.168.1.130 steiner.kp-netz steiner-pc
192.168.1.131 empfang-1.kp-netz
192.168.1.132 empfang-2.kp-netz
192.168.1.133 empfang-3.kp-netz

Verschiedene Einträge in $mydomain und $myhostname brachten keinen Erfolg.
Was bedeutet der Satz
"or fix what uname(3) provides as a host's network name", speziell uname(3), ist das eine Systemvariable?

Danke
Axel
 

stka

Guru
was sagt denn "uname -n" stimmt das mit deinem Hostnamen den du für die Konfiguration verwendest überein?
 
OP
A

argy

Newbie
uname -n ergibt nur den Rechnernamen ohne Domain
In der HOSTNAME-Datei steht der ganze Name "linux-fac.kp-netz",
ping auf den Server ergibt auch "linux-fac.kp-netz"
Gruss
Axel
 

stka

Guru
Wo hast du die Variabel gesetzt? In der main.cf vom Postfix und in der amavisd.conf?
Wie wäre es denn mal mit ein paar mehr Infos? Aber Konfigurationsdateien OHNE Kommentare!
 
OP
A

argy

Newbie
Sorry, ich bin nicht geizig, wußte nur noch nicht, was ich alles posten sol.

Hier mal die main.cf:
unknown_local_recipient_reject_code = 550
debug_peer_level = 5
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
html_directory = /usr/share/doc/packages/postfix/html
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
soft_bounce = yes
inet_protocols = ipv4
biff = no
mail_spool_directory = /var/spool/imap
canonical_maps = hash:/etc/postfix/canonical
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_alias_domains = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = linux-fac.kp-netz
program_directory = /usr/lib/postfix
inet_interfaces = 127.0.0.1,192.168.1.200
mydestination =
$myhostname
localhost.$mydomain
$mydomain
defer_transports = smtp
mynetworks_style = subnet
mynetworks = 192.168.1.0/24, 127.0.0.0/8
disable_dns_lookups = yes
relayhost = [XXXXXX.de]
mailbox_command = /usr/sbin/cyrusdeliver
mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp
strict_8bitmime = yes
disable_mime_output_conversion = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
content_filter = smtp-amavis:[127.0.0.1]:10024


Die amavisd.conf:

use strict;
$myhostname = 'linux-fac.kp-netz';
$QUARANTINEDIR = undef;
@local_domains_maps = ( [".$mydomain"] );
$policy_bank{'AM.PDP-SOCK'} = { protocol=>'AM.PDP' };
$sa_spam_subject_tag = '***SPAM***';
@addr_extension_virus_maps = ('virus');
@addr_extension_banned_maps = ('banned');
@addr_extension_spam_maps = ('spam');
@addr_extension_bad_header_maps = ('badh');

$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';

$MAXLEVELS = 14;
$MAXFILES = 1500;

$sa_spam_subject_tag = '***SPAM*** ';

$notify_method = 'smtp:[127.0.0.1]:10025';

$final_virus_destiny = D_DISCARD;
$final_spam_destiny = D_PASS;

$virus_quarantine_to = undef;

@keep_decoded_original_maps = (new_RE(
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
));

$banned_filename_re = new_RE(

qr'^application/x-msdos-program$'i,
qr'^application/hta$'i,

qr'\.[^./]*[A-Za-z][^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i,

);

[qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i => 5.0],
[qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0],
[qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
[qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i => 5.0],
[qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i => 5.0],
[qr'^(your_friend|greatoffers)@'i => 5.0],
[qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i => 5.0],
),

'nobody@cert.org' => -3.0,
'cert-advisory@us-cert.gov' => -3.0,
'owner-alert@iss.net' => -3.0,
'slashdot@slashdot.org' => -3.0,
'securityfocus.com' => -3.0,
'ntbugtraq@listserv.ntbugtraq.com' => -3.0,
'security-alerts@linuxsecurity.com' => -3.0,
'mailman-announce-admin@python.org' => -3.0,
'amavis-user-admin@lists.sourceforge.net'=> -3.0,
'amavis-user-bounces@lists.sourceforge.net' => -3.0,
'spamassassin.apache.org' => -3.0,
'notification-return@lists.sophos.com' => -3.0,
'owner-postfix-users@postfix.org' => -3.0,
'owner-postfix-announce@postfix.org' => -3.0,
'owner-sendmail-announce@lists.sendmail.org' => -3.0,
'sendmail-announce-request@lists.sendmail.org' => -3.0,
'donotreply@sendmail.org' => -3.0,
'ca+envelope@sendmail.org' => -3.0,
'noreply@freshmeat.net' => -3.0,
'owner-technews@postel.acm.org' => -3.0,
'ietf-123-owner@loki.ietf.org' => -3.0,
'cvs-commits-list-admin@gnome.org' => -3.0,
'rt-users-admin@lists.fsck.com' => -3.0,
'clp-request@comp.nus.edu.sg' => -3.0,
'surveys-errors@lists.nua.ie' => -3.0,
'emailnews@genomeweb.com' => -5.0,
'yahoo-dev-null@yahoo-inc.com' => -3.0,
'returns.groups.yahoo.com' => -3.0,
'clusternews@linuxnetworx.com' => -3.0,
lc('lvs-users-admin@LinuxVirtualServer.org') => -3.0,
lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0,

'sender@example.net' => 3.0,
'.example.net' => 1.0,

},
});

@decoders = (
['mail', \&do_mime_decode],
['asc', \&do_ascii],
['uue', \&do_ascii],
['hqx', \&do_ascii],
['ync', \&do_ascii],
['F', \&do_uncompress, ['unfreeze','freeze -d','melt','fcat'] ],
['Z', \&do_uncompress, ['uncompress','gzip -d','zcat'] ],
['gz', \&do_uncompress, 'gzip -d'],
['gz', \&do_gunzip],
['bz2', \&do_uncompress, 'bzip2 -d'],
['lzo', \&do_uncompress, 'lzop -d'],
['rpm', \&do_uncompress, ['rpm2cpio.pl','rpm2cpio'] ],
['cpio', \&do_pax_cpio, ['pax','gcpio','cpio'] ],
['tar', \&do_pax_cpio, ['pax','gcpio','cpio'] ],
['tar', \&do_tar],
['deb', \&do_ar, 'ar'],
['zip', \&do_unzip],
['rar', \&do_unrar, ['rar','unrar'] ],
['arj', \&do_unarj, ['arj','unarj'] ],
['arc', \&do_arc, ['nomarch','arc'] ],
['zoo', \&do_zoo, ['zoo','unzoo'] ],
['lha', \&do_lha, 'lha'],
['cab', \&do_cabextract, 'cabextract'],
['tnef', \&do_tnef_ext, 'tnef'],
['tnef', \&do_tnef],
['exe', \&do_executable, ['rar','unrar'], 'lha', ['arj','unarj'] ],
);

@av_scanners = (

['Avira AntiVir', ['antivir','vexira'],
'--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,
qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
(?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/ ],

);

@av_scanners_backup = (

['ClamAV-clamscan', 'clamscan',
"--stdout --no-summary -r --tempdir=$TEMPBASE {}",
[0], qr/:.*\sFOUND$/, qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],

['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
'-dumb -archive -packed {}', [0,8], [3,6],
qr/Infection: (.+)|\s+contains\s+(.+)$/ ],

['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
'-za -a {}', [0], qr/Found virus/, qr/Found virus (.+) in/ ],

['drweb - DrWeb Antivirus',
['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
'-path={} -al -go -ot -cn -upn -ok-',
[0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'],

['Kaspersky Antivirus v5.5',
['/opt/kav/5.5/kav4unix/bin/kavscanner',
'/opt/kav/5.5/kav4mailservers/bin/kavscanner','kavscanner'],
'-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/ ,
],

);

Gruss
Axel
 
OP
A

argy

Newbie
steht mit Leerzeichen = Fortsetzungszeile drin,- laut Doku möglich zur besseren Lesbarkeit.

Zwischenzeitlich mal mit 'hostname' den Host-Namen versuchsweise als "linux-fac.kp-netz.fac" gesetzt, amavis startet danach ohne diesbezügliche Fehlermeldung.

Rücksetzen auf linux-fac.kp-netz - also ohne TLD - bringt wieder o.g. Fehlermeldung.

Meine Folgerung: amavis braucht wohl doch unbedingt eine vollständige FQDN - ODER???

Weiss da jemand mehr???

Gruß
Axel
 
OP
A

argy

Newbie
HI alle,

habe den Hostnamen dauerhaft geändert und damit diese Problem vorerst aus dem Weg geräumt - wenn ich wieder Zeit habe, versuche ich aus dem source code herauszufinden, warum sich amavis so anstellt.

Habe dafür ein neues Problem, das ich in neuem thread poste.

Danke für die Hilfe
Axel
 
Status
Für weitere Antworten geschlossen.
Oben