Changeset 194
- Timestamp:
- 09/14/07 11:28:56 (16 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
includes/localization (modified) (1 prop)
-
system_scripts/listMailer.pl (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/localization
- Property svn:ignore
-
old new 1 *.mo1 de_DE.UTF-8/LC_MESSAGES/cpves.mo
-
- Property svn:ignore
-
trunk/system_scripts/listMailer.pl
r168 r194 17 17 #Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 18 19 use strict;19 #use strict; 20 20 use MIME::Entity; 21 21 use Email::Simple; … … 24 24 use Config::General; 25 25 use Net::SMTP; 26 use Sys::Syslog; 26 27 27 28 my $sender; … … 38 39 $config{'mailserver_smtp'} = "127.0.0.1" unless defined $config{'mailserver_smtp'}; 39 40 $config{'ml_postmaster'} = 'postmaster@localhost' unless defined $config{'ml_postmaster'}; 41 my $dsn = "DBI:mysql:database=".$config{'db_name'}.";host=".$config{'db_host'}; 40 42 41 my $dsn = "DBI:mysql:database=".$config{'db_name'}.";host=".$config{'db_host'};43 openlog('listMailer', "ndelay,pid", LOG_MAIL); 42 44 43 45 while (<stdin>) { … … 57 59 if( $efinder->find(\$mail->header("From")) != 1 ) { 58 60 #end, because of invalid email! 61 syslog(LOG_ERR, 'No valid sender address given'); 59 62 exit(0); 60 63 } … … 73 76 $sth->finish(); 74 77 $dbh->disconnect(); 78 syslog(LOG_ERR, 'No valid mailinglist found '); 75 79 exit(0); 76 80 } … … 148 152 $e_send_to->send; 149 153 $e_send_to->stringify; 154 syslog(LOG_WARNING, sprintf('sender %s is not allowed for private list %s', $sender, $list)); 150 155 } else { 151 156 # Send Mail to all subscribed 152 157 @addresses = getAllAddresses($row->{id}); 158 syslog(LOG_INFO, sprintf('sending from %s for private listid %s', $sender, $list)); 153 159 sendto($mail->as_string , $sender); 154 160 } … … 156 162 # Send Mail to all subscribed 157 163 @addresses = getAllAddresses($row->{id}); 164 syslog(LOG_INFO, sprintf('sending from %s for public listid %s', $sender, $list)); 158 165 sendto($mail->as_string , $sender); 159 166 }
