from email.mime.nonmultipart import MIMENonMultipart
from email.mime.text import MIMEText
+import smtplib
+
from quopri import encodestring as _encodestring
# Third party modules
@type: str
'''
+ self._smtp_timeout = 180
+ '''
+ @ivar: timeout for communication with the SMTP server
+ @type: int
+ '''
+
self._smtp_port = 25
'''
@ivar: the port to use for SMTP to the smarthost
"The port to use for sending mails via SMTP"
)
+ #------------------------------------------------------------
+ # Property 'smtp_timeout'
+ def _get_smtp_timeout(self):
+ '''
+ Getter method for property 'smtp_timeout'
+ '''
+ return self._smtp_timeout
+
+ def _set_smtp_timeout(self, value):
+ '''
+ Setter method for property 'smtp_timeout'
+ '''
+ _ = self.t.lgettext
+ if value:
+ timeout = 15
+ try:
+ timeout = int(value)
+ except ValueError, e:
+ return
+ if timeout < 1 or timeout >= 600:
+ return
+ self._smtp_timeout = timeout
+
+ smtp_timeout = property(
+ _get_smtp_timeout,
+ _set_smtp_timeout,
+ None,
+ "The timeout for communication with the SMTP server"
+ )
+
#------------------------------------------------------------
# Property 'smtp_tls'
def _get_smtp_tls(self):
res['sendmail'] = self.sendmail
res['from'] = self.from_address
res['smtp_host'] = self.smtp_host
+ res['smtp_timeout'] = self.smtp_timeout
res['smtp_port'] = self.smtp_port
res['smtp_tls'] = self.smtp_tls
res['smtp_user'] = self.smtp_user
if not rotate_date:
rotate_date = datetime.now()
+ to_list = []
+ for address in addresses:
+ to_list.append(address[1])
+
msg = (_("Sending mail with attached file '%(file)s' to: %(rcpt)s")
% {'file': basename,
'rcpt': ', '.join(
self.logger.debug(msg)
mail_container = MIMEMultipart()
- mail_container['Subject'] = ( "Rotated logfile '%s'" % (filename) )
+ mail_container['Date'] = email.utils.formatdate()
mail_container['X-Mailer'] = ( "pylogrotate version %s"
% (self.mailer_version) )
mail_container['From'] = self.from_address
mail_container['To'] = ', '.join(
map(lambda x: email.utils.formataddr(x), addresses)
)
+ mail_container['Subject'] = ( "Rotated logfile '%s'" % (filename) )
mail_container.preamble = (
'You will not see this in a MIME-aware mail reader.\n'
)
if (not self.use_smtp) and self.sendmail:
return self._send_per_sendmail(composed)
else:
- msg = _("Sending mails via SMTP currently not possible.")
- self.logger.info(msg)
- return False
+ return self._send_per_smtp(composed, to_list)
return True
+ #-------------------------------------------------------
+ def _send_per_smtp(self, mail, to):
+ '''
+ Sending the given mail per SMTP to self.smtp_host
+
+ Raises a LogRotateMailerError on harder errors.
+
+ @param mail: the complete mail (header and body) as a string
+ @type mail: str
+ @param to: a list with all addresses of recipients
+ @type to: list
+
+ @return: success of sending
+ @rtype: bool
+ '''
+
+ _ = self.t.lgettext
+
+ mta = None
+
+ msg = (_("Sending mail via SMTP to server '%s'.") % (self.smtp_host))
+ self.logger.debug(msg)
+
+ if self.test_mode:
+ return True
+
+ # Establishing connection to SMTP server
+ try:
+ mta = smtplib.SMTP(
+ self.smtp_host,
+ port=self.smtp_port,
+ timeout=self.smtp_timeout,
+ )
+ except smtplib.SMTPConnectError, e:
+ msg = (_("Could not connect to server '%(host)s': '%(err)s'.") %
+ {'host': self.smtp_host, 'err': str(e)})
+ self.logger.error(msg)
+ return False
+ if self.verbose > 2:
+ mta.set_debuglevel(1)
+
+ # EHLO/HELO, looking for STARTTLS
+ has_tls = False
+ try:
+ mta.ehlo_or_helo_if_needed()
+ except smtplib.SMTPHeloError, e:
+ msg = (_("Error in reply to the EHLO/HELO command from " +
+ "'%(host)s': '%(err)s'.") %
+ {'host': self.smtp_host, 'err': str(e)})
+ self.logger.error(msg)
+ return False
+ except smtplib.SMTPServerDisconnected, e:
+ msg = (_("Connection to server '%(host)s' unexpected " +
+ "disconnected: '%(err)s'.") %
+ {'host': self.smtp_host, 'err': str(e)})
+ self.logger.error(msg)
+ return False
+ if mta.has_extn('STARTTLS'):
+ has_tls = True
+
+ # establishing TLS, if possible and necessary
+ if self.smtp_tls:
+ if has_tls:
+ try:
+ mta.starttls()
+ except Exception, e:
+ msg = (_("Error in establishing TLS:") +
+ str(e))
+ self.logger.error(msg)
+ return False
+ except smtplib.SMTPServerDisconnected, e:
+ msg = (_("Connection to server '%(host)s' unexpected " +
+ "disconnected: '%(err)s'.") %
+ {'host': self.smtp_host, 'err': str(e)})
+ self.logger.error(msg)
+ return False
+ else:
+ msg = (_("SMTP server '%s' doesn't support TLS.") %
+ (self.smtp_host))
+ self.logger.warning(msg)
+
+ # Trying to login, if necessary
+ if self.smtp_user and self.smtp_passwd:
+ try:
+ mta.login(self.smtp_user, self.smtp_passwd)
+ except smtplib.SMTPAuthenticationError, e:
+ msg = (_("Login to '%(host)s' as user '%(user)s' was " +
+ "not successful: '%(err)s'.") %
+ {'host': self.smtp_host,
+ 'user': self.smtp_user,
+ 'err': str(e)})
+ self.logger.error(msg)
+ except smtplib.SMTPException, e:
+ msg = (_("No suitable authentication method to login " +
+ "to '%s' found.") % (self.smtp_host))
+ self.logger.error(msg)
+ except smtplib.SMTPServerDisconnected, e:
+ msg = (_("Connection to server '%(host)s' unexpected " +
+ "disconnected: '%(err)s'.") %
+ {'host': self.smtp_host, 'err': str(e)})
+ self.logger.error(msg)
+ return False
+
+ # the underlaying sending of the mail
+ has_sent = True
+ rcpt = {}
+ try:
+ rcpt = mta.sendmail(self._from_address[1], to, mail)
+ except smtplib.SMTPSenderRefused, e:
+ msg = (_("Sender address <%(from)s> not accepted " +
+ "by host '%(host)s': '%(err)s'.") %
+ {'host': self.smtp_host,
+ 'from': self._from_address[1],
+ 'err': str(e)})
+ self.logger.error(msg)
+ has_sent = False
+ except smtplib.SMTPRecipientsRefused, e:
+ msg = ((_("All recipient addresses are rejected " +
+ "by host '%s':") % (self.smtp_host)) +
+ repr(e.recipients))
+ self.logger.error(msg)
+ has_sent = False
+ except smtplib.SMTPDataError, e:
+ msg = ((_("Mail rejected because of an unexpected error " +
+ "by host '%s':") % (self.smtp_host)) +
+ str(e))
+ self.logger.error(msg)
+ has_sent = False
+ except smtplib.SMTPServerDisconnected, e:
+ msg = (_("Connection to server '%(host)s' unexpected " +
+ "disconnected: '%(err)s'.") %
+ {'host': self.smtp_host, 'err': str(e)})
+ self.logger.error(msg)
+ return False
+
+ if self.verbose > 1:
+ msg = (_("Mail successful sent to host '%s'.") % (self.smtp_host))
+ self.logger.debug(msg)
+
+ if len(rcpt):
+ msg = ((_("One or more recipient addresses are rejected " +
+ "by host '%s':") % (self.smtp_host)) +
+ repr(rcpt))
+ self.logger.warning(msg)
+
+ # And bye ...
+ mta.quit()
+ return has_sent
+
#-------------------------------------------------------
def _send_per_sendmail(self, mail):
'''
msgstr ""
"Project-Id-Version: pylogrotate 0.6.0\n"
"Report-Msgid-Bugs-To: frank@brehm-online.com\n"
-"POT-Creation-Date: 2011-07-15 17:29+0200\n"
-"PO-Revision-Date: 2011-07-15 17:30+0200\n"
+"POT-Creation-Date: 2011-07-15 22:00+0200\n"
+"PO-Revision-Date: 2011-07-15 22:20+0200\n"
"Last-Translator: Frank Brehm <frank@brehm-online.com>\n"
"Language-Team: de <LL@li.org>\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
msgid "Access to status file '%s' is OK."
msgstr "Zugriff auf Statusdatei »%s« ist okay."
+#: LogRotate/Mailer.py:823
+#, python-format
+msgid "All recipient addresses are rejected by host '%s':"
+msgstr "Alle Empfängeradressen wurden von Host »%s« zurückgewiesen:"
+
#: logrotate.py:83
msgid "Arguments"
msgstr "Argumente"
msgid "Child in script '%(name)s' was terminated by signal %(retcode)d."
msgstr "Kindprozeß in Skript »%(name)s« wurde durch Signal %(retcode)d beendet."
-#: LogRotate/Handler.py:1867 LogRotate/Mailer.py:724
+#: LogRotate/Handler.py:1867 LogRotate/Mailer.py:915
#, python-format
msgid "Child was terminated by signal %d."
msgstr "Kindprozess wurde durch Signal %d beendet."
msgid "Configuration reader object structure"
msgstr "Objektstruktur des Konfigurtionslesers"
+#: LogRotate/Mailer.py:758 LogRotate/Mailer.py:777 LogRotate/Mailer.py:803
+#: LogRotate/Mailer.py:835
+#, python-format
+msgid "Connection to server '%(host)s' unexpected disconnected: '%(err)s'."
+msgstr "Die Verbindung zum Server »%(host)s« wurde unerwartet beendet: »'%(err)s«."
+
#: LogRotate/Handler.py:2228
#, python-format
msgid "Copying all file metadata to target '%s' ..."
"Kopiere Rechte und Zeitstempel von Quellobjekt »%(src)s« zu Zielojekt "
"»%(target)s«."
+#: LogRotate/Mailer.py:740
+#, python-format
+msgid "Could not connect to server '%(host)s': '%(err)s'."
+msgstr "Konnte mich nicht mit Server »%(host)s« verbinden: »%(err)s«."
+
#: LogRotate/Config.py:1040
#, python-format
msgid "Could not detect option in line '%s'."
msgid "End of a logfile definition."
msgstr "Ende einer Logdateidefinition."
-#: LogRotate/Mailer.py:715
+#: LogRotate/Mailer.py:772
+msgid "Error in establishing TLS:"
+msgstr "Fehler beim Aufbau einer TLS-Verbindung:"
+
+#: LogRotate/Mailer.py:752
+#, python-format
+msgid "Error in reply to the EHLO/HELO command from '%(host)s': '%(err)s'."
+msgstr ""
+"Fehler bei Antwort auf das EHLO- bzw. HELO-Kommando von »%(host)s«: "
+"»%(err)s«."
+
+#: LogRotate/Mailer.py:906
#, python-format
msgid "Error message of '%s':"
msgstr "Fehlermeldung von »%s«:"
msgid "Error removing uncompressed file '%(file)s': %(msg)"
msgstr "Fehler beim Löschen der unkomprimierten Datei »%(file)s«: %(msg)"
-#: LogRotate/Handler.py:1856 LogRotate/Mailer.py:689
+#: LogRotate/Handler.py:1856 LogRotate/Mailer.py:880
#, python-format
msgid "Executing command: '%s'."
msgstr "Führe Kommando aus: »%s«."
msgid "Executing script '%(name)s' with command: '%(cmd)s'"
msgstr "Führe Skript »%(name)s« mit dem Kommando »%(cmd)s« aus."
-#: LogRotate/Handler.py:1874 LogRotate/Mailer.py:734
+#: LogRotate/Handler.py:1874 LogRotate/Mailer.py:925
#, python-format
msgid "Execution failed: %s"
msgstr "Ausführung ging schief: %s"
msgid "Failing size definition."
msgstr "Fehlende Größenangabe."
-#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:556
+#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:595
#, python-format
msgid "File '%s' doesn't exists."
msgstr "Die Datei »%s« existiert nicht."
msgid "File '%s' has a size of 0, skip compressing."
msgstr "Die Datei »%s« hat die Größe Null, übergehe Komprimierung."
-#: LogRotate/Mailer.py:561
+#: LogRotate/Mailer.py:600
#, python-format
msgid "File '%s' is not a regular file."
msgstr "Die Datei »%s« ist keine reguläre Datei."
"Wert »%(value)s« nach boolscher Option »%(option)s« gefunden, wird "
"ignoriert."
-#: LogRotate/Mailer.py:652
+#: LogRotate/Mailer.py:696
msgid "Generated E-mail:"
msgstr "Generierte E-Mail:"
msgid "Got returncode for script '%(name)s': '%(retcode)s'"
msgstr "Habe Rückggabewert »%(retcode)s« für Skript »%(name)s« erhalten."
-#: LogRotate/Handler.py:1864 LogRotate/Mailer.py:704
+#: LogRotate/Handler.py:1864 LogRotate/Mailer.py:895
#, python-format
msgid "Got returncode: '%s'."
msgstr "Erhaltener Rückgabewert: »%s«."
-#: LogRotate/Mailer.py:615
+#: LogRotate/Mailer.py:659
#, python-format
msgid "Guessed content-type: '%(ctype)s' and encoding '%(encoding)s'."
msgstr "Erratener Content-Type: »%(ctype)s«, und Encoding: »%(encoding)s«."
msgid "Incompatible version of status file '%(file)s': %(header)s"
msgstr "Inkompatible Version der Statusdatei »%(file)s«: %(header)s"
-#: LogRotate/Mailer.py:489
+#: LogRotate/Mailer.py:528
msgid "Initial search for the sendmail executable ..."
msgstr "Initiale Suche nach dem »sendmail«-Programm ..."
msgid "Invalid mail address for 'mailfrom' given: '%s'."
msgstr "Ungültige Mailadresse »%s« für »mailfrom« angegeben."
-#: LogRotate/Mailer.py:229 LogRotate/Mailer.py:233
+#: LogRotate/Mailer.py:237 LogRotate/Mailer.py:241
#, python-format
msgid "Invalid mail address given: '%s'."
msgstr "Ungültige Mailadresse übergeben: »%s«."
"Die Definition eines Logdateimusters ist innerhalb einer "
"Logdateidefinition nicht erlaubt."
+#: LogRotate/Mailer.py:792
+#, python-format
+msgid "Login to '%(host)s' as user '%(user)s' was not successful: '%(err)s'."
+msgstr ""
+"Die Anmeldung an »%(host)s« als Nutzer »%(user)s« war nicht erfolgreich: "
+"»%(err)s«."
+
#: LogRotate/Config.py:342
msgid "Logrotate config reader initialised."
msgstr "Logrotate-Konfigurationsleser initialisiert."
msgid "Looking, whether the prerun script should be executed."
msgstr "Schaue nach, ob das Prerun-Skript ausgeführt werden soll."
-#: LogRotate/Mailer.py:414
+#: LogRotate/Mailer.py:829
+#, python-format
+msgid "Mail rejected because of an unexpected error by host '%s':"
+msgstr ""
+"Die Mail wurd auf Grund eines unerwarteten Fehlers von Host »%s« "
+"zurückgewiesen:"
+
+#: LogRotate/Mailer.py:842
+#, python-format
+msgid "Mail successful sent to host '%s'."
+msgstr "Die Mail wurde erfolgreich zu Host »%s« gesendet."
+
+#: LogRotate/Mailer.py:452
msgid "Mailer object will destroyed."
msgstr "Das Mailer-Objekt wird zerstört."
msgid "No dirname directive for olddir given."
msgstr "Kein Verzeichnis für olddir-Direktive angegeben."
-#: LogRotate/Mailer.py:281 LogRotate/Mailer.py:506
+#: LogRotate/Mailer.py:289 LogRotate/Mailer.py:545
#, python-format
msgid "No execute permissions to '%s'."
msgstr "Keinw Ausführungsrechte auf »%s«."
msgid "No old logfiles to delete found."
msgstr "Keine Logdateien zum Löschen gefunden."
-#: LogRotate/Mailer.py:711 LogRotate/Mailer.py:720
+#: LogRotate/Mailer.py:902 LogRotate/Mailer.py:911
#, python-format
msgid "No output on %s."
msgstr "Keine Ausgabe auf %s."
msgid "No script name given in a script directive."
msgstr "Kein Scriptname in Scriptdirektive angegeben."
+#: LogRotate/Mailer.py:799
+#, python-format
+msgid "No suitable authentication method to login to '%s' found."
+msgstr ""
+"Keine verwendungsfähige Authentifizierungsmethode zur Anmeldung an »%s« "
+"gefunden."
+
#: LogRotate/Handler.py:598
#, python-format
msgid "No useful information found in PID file '%(file)s': '%(line)s'"
msgid "Olddir name is now '%s'."
msgstr "Der Olddir-Name ist jetzt »%s«."
-#: LogRotate/Mailer.py:289
+#: LogRotate/Mailer.py:846
+#, python-format
+msgid "One or more recipient addresses are rejected by host '%s':"
+msgstr "Eine oder mehrere Empfängeradressen wurden von Host »%s« zurückgewiesen:"
+
+#: LogRotate/Mailer.py:297
#, python-format
msgid "Only absolute path allowed for a sendmail command: '%s'."
msgstr "Für das »sendmail«-Kommando sind nur absolute Pfadangaben erlaubt: »%s«."
msgid "Options"
msgstr "Optionen"
-#: LogRotate/Mailer.py:709
+#: LogRotate/Mailer.py:900
#, python-format
msgid "Output on STDOUT: '%s'."
msgstr "Ausgabe auf STDOUT: »%s«."
msgid "Rotating of logfile definition:"
msgstr "Rotation der Logdatei-Definition:"
+#: LogRotate/Mailer.py:783
+#, python-format
+msgid "SMTP server '%s' doesn't support TLS."
+msgstr "Der SMTP-Server »%s« unterstützt kein TLS."
+
#: LogRotate/Config.py:1791
#, python-format
msgid "Script name '%s' is allready declared, it will be overwritten."
msgid "Search path '%s' doesn't exists or is not a directory."
msgstr "Der Suchpfad »%s« existiert entweder nicht oder ist kein Verzeichnis."
-#: LogRotate/Mailer.py:572
+#: LogRotate/Mailer.py:815
+#, python-format
+msgid "Sender address <%(from)s> not accepted by host '%(host)s': '%(err)s'."
+msgstr ""
+"Die Absenderadresse <%(from)s> wurde von Host »%(host)s« nicht "
+"akzeptiert: »%(err)s«."
+
+#: LogRotate/Mailer.py:726
+#, python-format
+msgid "Sending mail via SMTP to server '%s'."
+msgstr "Verschicke Mail mittels SMTP an Server »%s«."
+
+#: LogRotate/Mailer.py:615
#, python-format
msgid "Sending mail with attached file '%(file)s' to: %(rcpt)s"
msgstr "Verschicke Mail mit angehängter Datei »%(file)s« an: %(rcpt)s"
-#: LogRotate/Mailer.py:658
-msgid "Sending mails via SMTP currently not possible."
-msgstr "Der Mailversand über SMTP ist gegenwärtig noch nicht verfügbar."
-
-#: LogRotate/Mailer.py:285
+#: LogRotate/Mailer.py:293
#, python-format
msgid "Sendmail command '%s' not found."
msgstr "Das »sendmail«-Kommando »%s« wurde nicht gefunden."
msgid "Senseless option value '%(value)s' after '%(option)s'."
msgstr "Sinnloser Optionswert »%(value)s« nach »%(option)s«."
-#: LogRotate/Mailer.py:239
+#: LogRotate/Mailer.py:247
#, python-format
msgid "Set sender mail address to: '%s'."
msgstr "Setze Absender-Mailadresse auf: »%s«."
msgid "Test mode is ON."
msgstr "Testmodus ist AN."
-#: LogRotate/Mailer.py:495
+#: LogRotate/Mailer.py:534
#, python-format
msgid "Testing for '%s' ..."
msgstr "Teste auf »%s« ..."
msgid "Testmode, skip writing of PID file '%s'."
msgstr "Testmodus, übergehe Schreiben der PID-Datei »%s«."
-#: LogRotate/Mailer.py:216
+#: LogRotate/Mailer.py:224
msgid "The 'From' address may not set to None."
msgstr "Die »From«-Adresse darf nicht auf »None« gesetzt werden."
-#: LogRotate/Mailer.py:681
+#: LogRotate/Mailer.py:872
msgid "There is no sendmail executable available."
msgstr "Das sendmail-Programm ist nicht verfügbar."
"Verwende »%(target)s« als Zieldatei der Rotation von Logdatei "
"»%(logfile)s«."
-#: LogRotate/Mailer.py:276 LogRotate/Mailer.py:501
+#: LogRotate/Mailer.py:284 LogRotate/Mailer.py:540
#, python-format
msgid "Using '%s' as the sendmail command."
msgstr "Verwende »%s« als »sendmail«-Kommando."
-#: LogRotate/Mailer.py:470
+#: LogRotate/Mailer.py:509
#, python-format
msgid "Using <%s> as the sender mail address."
msgstr "Verwende <%s> als Absender-Mailadresse."
msgstr ""
"Project-Id-Version: pylogrotate 0.6.0\n"
"Report-Msgid-Bugs-To: frank@brehm-online.com\n"
-"POT-Creation-Date: 2011-07-15 17:29+0200\n"
+"POT-Creation-Date: 2011-07-15 22:00+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Access to status file '%s' is OK."
msgstr ""
+#: LogRotate/Mailer.py:823
+#, python-format
+msgid "All recipient addresses are rejected by host '%s':"
+msgstr ""
+
#: logrotate.py:83
msgid "Arguments"
msgstr ""
msgid "Child in script '%(name)s' was terminated by signal %(retcode)d."
msgstr ""
-#: LogRotate/Handler.py:1867 LogRotate/Mailer.py:724
+#: LogRotate/Handler.py:1867 LogRotate/Mailer.py:915
#, python-format
msgid "Child was terminated by signal %d."
msgstr ""
msgid "Configuration reader object structure"
msgstr ""
+#: LogRotate/Mailer.py:758 LogRotate/Mailer.py:777 LogRotate/Mailer.py:803
+#: LogRotate/Mailer.py:835
+#, python-format
+msgid "Connection to server '%(host)s' unexpected disconnected: '%(err)s'."
+msgstr ""
+
#: LogRotate/Handler.py:2228
#, python-format
msgid "Copying all file metadata to target '%s' ..."
"'%(target)s'."
msgstr ""
+#: LogRotate/Mailer.py:740
+#, python-format
+msgid "Could not connect to server '%(host)s': '%(err)s'."
+msgstr ""
+
#: LogRotate/Config.py:1040
#, python-format
msgid "Could not detect option in line '%s'."
msgid "End of a logfile definition."
msgstr ""
-#: LogRotate/Mailer.py:715
+#: LogRotate/Mailer.py:772
+msgid "Error in establishing TLS:"
+msgstr ""
+
+#: LogRotate/Mailer.py:752
+#, python-format
+msgid "Error in reply to the EHLO/HELO command from '%(host)s': '%(err)s'."
+msgstr ""
+
+#: LogRotate/Mailer.py:906
#, python-format
msgid "Error message of '%s':"
msgstr ""
msgid "Error removing uncompressed file '%(file)s': %(msg)"
msgstr ""
-#: LogRotate/Handler.py:1856 LogRotate/Mailer.py:689
+#: LogRotate/Handler.py:1856 LogRotate/Mailer.py:880
#, python-format
msgid "Executing command: '%s'."
msgstr ""
msgid "Executing script '%(name)s' with command: '%(cmd)s'"
msgstr ""
-#: LogRotate/Handler.py:1874 LogRotate/Mailer.py:734
+#: LogRotate/Handler.py:1874 LogRotate/Mailer.py:925
#, python-format
msgid "Execution failed: %s"
msgstr ""
msgid "Failing size definition."
msgstr ""
-#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:556
+#: LogRotate/Config.py:694 LogRotate/Config.py:721 LogRotate/Mailer.py:595
#, python-format
msgid "File '%s' doesn't exists."
msgstr ""
msgid "File '%s' has a size of 0, skip compressing."
msgstr ""
-#: LogRotate/Mailer.py:561
+#: LogRotate/Mailer.py:600
#, python-format
msgid "File '%s' is not a regular file."
msgstr ""
msgid "Found value '%(value)s' behind the boolean option '%(option)s', ignoring."
msgstr ""
-#: LogRotate/Mailer.py:652
+#: LogRotate/Mailer.py:696
msgid "Generated E-mail:"
msgstr ""
msgid "Got returncode for script '%(name)s': '%(retcode)s'"
msgstr ""
-#: LogRotate/Handler.py:1864 LogRotate/Mailer.py:704
+#: LogRotate/Handler.py:1864 LogRotate/Mailer.py:895
#, python-format
msgid "Got returncode: '%s'."
msgstr ""
-#: LogRotate/Mailer.py:615
+#: LogRotate/Mailer.py:659
#, python-format
msgid "Guessed content-type: '%(ctype)s' and encoding '%(encoding)s'."
msgstr ""
msgid "Incompatible version of status file '%(file)s': %(header)s"
msgstr ""
-#: LogRotate/Mailer.py:489
+#: LogRotate/Mailer.py:528
msgid "Initial search for the sendmail executable ..."
msgstr ""
msgid "Invalid mail address for 'mailfrom' given: '%s'."
msgstr ""
-#: LogRotate/Mailer.py:229 LogRotate/Mailer.py:233
+#: LogRotate/Mailer.py:237 LogRotate/Mailer.py:241
#, python-format
msgid "Invalid mail address given: '%s'."
msgstr ""
msgid "Logfile pattern definition not allowed inside a logfile definition."
msgstr ""
+#: LogRotate/Mailer.py:792
+#, python-format
+msgid "Login to '%(host)s' as user '%(user)s' was not successful: '%(err)s'."
+msgstr ""
+
#: LogRotate/Config.py:342
msgid "Logrotate config reader initialised."
msgstr ""
msgid "Looking, whether the prerun script should be executed."
msgstr ""
-#: LogRotate/Mailer.py:414
+#: LogRotate/Mailer.py:829
+#, python-format
+msgid "Mail rejected because of an unexpected error by host '%s':"
+msgstr ""
+
+#: LogRotate/Mailer.py:842
+#, python-format
+msgid "Mail successful sent to host '%s'."
+msgstr ""
+
+#: LogRotate/Mailer.py:452
msgid "Mailer object will destroyed."
msgstr ""
msgid "No dirname directive for olddir given."
msgstr ""
-#: LogRotate/Mailer.py:281 LogRotate/Mailer.py:506
+#: LogRotate/Mailer.py:289 LogRotate/Mailer.py:545
#, python-format
msgid "No execute permissions to '%s'."
msgstr ""
msgid "No old logfiles to delete found."
msgstr ""
-#: LogRotate/Mailer.py:711 LogRotate/Mailer.py:720
+#: LogRotate/Mailer.py:902 LogRotate/Mailer.py:911
#, python-format
msgid "No output on %s."
msgstr ""
msgid "No script name given in a script directive."
msgstr ""
+#: LogRotate/Mailer.py:799
+#, python-format
+msgid "No suitable authentication method to login to '%s' found."
+msgstr ""
+
#: LogRotate/Handler.py:598
#, python-format
msgid "No useful information found in PID file '%(file)s': '%(line)s'"
msgid "Olddir name is now '%s'."
msgstr ""
-#: LogRotate/Mailer.py:289
+#: LogRotate/Mailer.py:846
+#, python-format
+msgid "One or more recipient addresses are rejected by host '%s':"
+msgstr ""
+
+#: LogRotate/Mailer.py:297
#, python-format
msgid "Only absolute path allowed for a sendmail command: '%s'."
msgstr ""
msgid "Options"
msgstr ""
-#: LogRotate/Mailer.py:709
+#: LogRotate/Mailer.py:900
#, python-format
msgid "Output on STDOUT: '%s'."
msgstr ""
msgid "Rotating of logfile definition:"
msgstr ""
+#: LogRotate/Mailer.py:783
+#, python-format
+msgid "SMTP server '%s' doesn't support TLS."
+msgstr ""
+
#: LogRotate/Config.py:1791
#, python-format
msgid "Script name '%s' is allready declared, it will be overwritten."
msgid "Search path '%s' doesn't exists or is not a directory."
msgstr ""
-#: LogRotate/Mailer.py:572
+#: LogRotate/Mailer.py:815
#, python-format
-msgid "Sending mail with attached file '%(file)s' to: %(rcpt)s"
+msgid "Sender address <%(from)s> not accepted by host '%(host)s': '%(err)s'."
+msgstr ""
+
+#: LogRotate/Mailer.py:726
+#, python-format
+msgid "Sending mail via SMTP to server '%s'."
msgstr ""
-#: LogRotate/Mailer.py:658
-msgid "Sending mails via SMTP currently not possible."
+#: LogRotate/Mailer.py:615
+#, python-format
+msgid "Sending mail with attached file '%(file)s' to: %(rcpt)s"
msgstr ""
-#: LogRotate/Mailer.py:285
+#: LogRotate/Mailer.py:293
#, python-format
msgid "Sendmail command '%s' not found."
msgstr ""
msgid "Senseless option value '%(value)s' after '%(option)s'."
msgstr ""
-#: LogRotate/Mailer.py:239
+#: LogRotate/Mailer.py:247
#, python-format
msgid "Set sender mail address to: '%s'."
msgstr ""
msgid "Test mode is ON."
msgstr ""
-#: LogRotate/Mailer.py:495
+#: LogRotate/Mailer.py:534
#, python-format
msgid "Testing for '%s' ..."
msgstr ""
msgid "Testmode, skip writing of PID file '%s'."
msgstr ""
-#: LogRotate/Mailer.py:216
+#: LogRotate/Mailer.py:224
msgid "The 'From' address may not set to None."
msgstr ""
-#: LogRotate/Mailer.py:681
+#: LogRotate/Mailer.py:872
msgid "There is no sendmail executable available."
msgstr ""
msgid "Using '%(target)s' as target for rotation of logfile '%(logfile)s'."
msgstr ""
-#: LogRotate/Mailer.py:276 LogRotate/Mailer.py:501
+#: LogRotate/Mailer.py:284 LogRotate/Mailer.py:540
#, python-format
msgid "Using '%s' as the sendmail command."
msgstr ""
-#: LogRotate/Mailer.py:470
+#: LogRotate/Mailer.py:509
#, python-format
msgid "Using <%s> as the sender mail address."
msgstr ""
pidfile /home/frank/Development/Python/PyLogrotate/logrotate.pid
statusfile /home/frank/Development/Python/PyLogrotate/logrotate.status
-mailfrom ich <info@uhu-banane.de>
-smtphost mail.brehm-online.com
-smtpport 25
-smtpuser vmail
-smtppasswd bla
-smtptls true
+
+# mailfrom ich <info@uhu-banane.de>
+# smtphost mail.brehm-online.com
+# smtpport 25
+# smtpuser vmail
+# smtppasswd bla
+# smtptls true
script apache_restart
echo "/etc/init.d/apache2 reload > /dev/null 2>&1 || true"