|
|||||||
| Registrieren | Hilfe | Benutzerliste | Interessengemeinschaften | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
![]() |
|
|
LinkBack | Themen-Optionen | Ansicht |
|
#1
|
|||
|
|||
|
Guten Abend die Gemeinde,
Folgendes, logwatch sendet im normal Fall ja täglich eine Mail mit div. Infos etc. fail2ban z.B. nach einem Ban je nach Konfiguration. Aber das wisst Ihr ja. So, die Mails gehen ja eig. immer an den root Account - jetzt gibt es aber die Möglichkeit beide Tools dazu zu bewegen dass diese die Mails an einen anderen Account senden. So jetzt hab ich da mal ein bisschen getestet und bin mal einige Foren durch sowie die FAQ's der Tools, allerdings ohne Erfolg... Logwatch sollte man eig. einfach dazu bewegen können: (vi /usr/share/logwatch/default.conf/logwatch.conf) Code:
# You can put comments anywhere you want to. They are effective for the # rest of the line. # this is in the format of <name> = <value>. Whitespace at the beginning # and end of the lines is removed. Whitespace before and after the = sign # is removed. Everything is case *insensitive*. # Yes = True = On = 1 # No = False = Off = 0 # Default Log Directory # All log-files are assumed to be given relative to this directory. LogDir = /var/log # You can override the default temp directory (/tmp) here TmpDir = /var/cache/logwatch # Default person to mail reports to. Can be a local account or a # complete email address. MailTo = adresse@domain.com # Default person to mail reports from. Can be a local account or a # complete email address. MailFrom = adresse@domain.com # If set to 'Yes', the report will be sent to stdout instead of being # mailed to above person. Print = Yes Ein zwei Gedanken von mir warum dass evt. nicht klappen könnte: (Um von meinem Mailserver Mails versenden zu können(postfix), muss man sich am Server authentifizieren - macht das Script ja aber eig. nicht, somit ist es nicht im Stande Mails zu versenden?) (Oder muss ich den Namen der lokalen Mailbox angeben also webXX_mail_blabla ?) ------------ Fail2ban 0.8.4 Müssen in der jail.conf sowie in mail.conf mail-whois.conf mail-whois.local sendmail.conf sendmail-whois.conf etc. die Anpassungen vorgenommen werden z.B: Code:
# Defaut name of the chain # name = default # Destination/Addressee of the mail # dest = adresse@domain.com Hier die gleichen Überlegungen... oder bin ich da völlig auf dem falschen Pfad? oO Wünsche einen schönen Abend und einen guten Start in die neue Woche Wurstbrot |
|
#2
|
|||
|
|||
|
Zitat:
Was genau steht denn im mail log, wenn die email versendet wird? |
|
#3
|
|||
|
|||
|
Zitat:
Maillog: Code:
Jan 16 23:18:29 sv1 sendmail[24570]: p0GMINYU024570: to=adresse@domain.com, ctladdr=root (0/0), delay=00:00:06, xdelay=00:00:00, mailer=relay, pri=336190, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown Jan 16 23:18:29 sv1 sendmail[24570]: p0GMINYU024570: p0GMINYV024570: DSN: User unknown Jan 16 23:18:29 sv1 postfix/smtpd[24869]: 870D73E30037: client=XXX[127.0.0.1] Jan 16 23:18:29 sv1 postfix/cleanup[24872]: 870D73E30037: message-id=<201101162218.p0GMINYV024570@name.domain.com> Jan 16 23:18:29 sv1 postfix/qmgr[7189]: 870D73E30037: from=<>, size=313240, nrcpt=1 (queue active) Jan 16 23:18:29 sv1 sendmail[24570]: p0GMINYV024570: to=root, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=337214, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 870D73E30037) Jan 16 23:18:29 sv1 postfix/local[24873]: 870D73E30037: to=<root@name.domain.com>, relay=local, delay=0.08, delays=0.06/0/0/0.02, dsn=2.0.0, status=sent (delivered to mailbox) Jan 16 23:18:29 sv1 postfix/qmgr[7189]: 870D73E30037: removed Jan 16 23:18:29 sv1 postfix/smtpd[24869]: disconnect from XXX[127.0.0.1] Code:
Jan 16 23:18:29 sv1 sendmail[24570]: p0GMINYU024570: to=adresse@domain.com, ctladdr=root (0/0), delay=00:00:06, xdelay=00:00:00, mailer=relay, pri=336190, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown Jan 16 23:18:29 sv1 sendmail[24570]: p0GMINYU024570: p0GMINYV024570: DSN: User unknown Geändert von Wurstbrot (16.01.2011 um 23:28 Uhr). |
|
#4
|
|||
|
|||
|
Laut Lig existiert die Adresse adresse@domain.com nicht und daher konnt die email auch nicht zugestellt werden.
|
|
#5
|
|||
|
|||
|
Naja doch, existiert sehr wohl und hat auch keine schreibfehler etc. drinne - denn ich kann mit dem user mails versenden und auch von anderen Adressen aus empfangen... also existiert der... oO
|
|
#6
|
|||
|
|||
|
Dann überprüf mal bitte, ob auch wirklich nirgends domain.com in der postfix main.cf steht, z.b. als mydomain oder myhostname oder ob es in der datei /etc/mailname steht.
|
|
#7
|
|||
|
|||
|
Ich zeig dir gleich mal Ausschnitte der div. confs - aber warum sollte diese da nicht drinne sein? oO
main.cf Code:
# INTERNET HOST AND DOMAIN NAMES # # The myhostname parameter specifies the internet hostname of this # mail system. The default is to use the fully-qualified domain name # from gethostname(). $myhostname is used as a default value for many # other configuration parameters. # myhostname = sv1.domain.com #myhostname = virtual.domain.tld # The mydomain parameter specifies the local internet domain name. # The default is to use $myhostname minus the first component. # $mydomain is used as a default value for many other configuration # parameters. # #mydomain = $mydomain # SENDING MAIL # # The myorigin parameter specifies the domain that locally-posted # mail appears to come from. The default is to append $myhostname, # which is fine for small sites. If you run a domain with multiple # machines, you should (1) change this to $mydomain and (2) set up # a domain-wide alias database that aliases each user to # user@that.users.mailhost. # # For the sake of consistency between sender and recipient addresses, # myorigin also specifies the default domain name that is appended # to recipient addresses that have no @domain part. # #myorigin = $myhostname #myorigin = $mydomain # RECEIVING MAIL # The inet_interfaces parameter specifies the network interface # addresses that this mail system receives mail on. By default, # the software claims all active interfaces on the machine. The # parameter also controls delivery of mail to user@[ip.address]. # # See also the proxy_interfaces parameter, for network addresses that # are forwarded to us via a proxy or network address translator. # # Note: you need to stop/start Postfix when this parameter changes. # #inet_interfaces = all #inet_interfaces = $myhostname #inet_interfaces = $myhostname, localhost inet_interfaces = all eine /etc/mailname existiert bei mir nicht? Grüsse WB Geändert von Wurstbrot (19.01.2011 um 13:14 Uhr). |
|
#8
|
|||
|
|||
|
Zitat:
Die Einstellung: myhostname = sv1.domain.com ist so ok. Du darfst da nur nicht sowas wie: myhostname = domain.com oder mydomain = domain.com drin stehen haben. |
![]() |
| Themen-Optionen | |
| Ansicht | |
|
|
Alle Zeitangaben in WEZ +2. Es ist jetzt 03:19 Uhr.










Linear-Darstellung
