Page 1 of 1
Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 06:12
by thiefmaster
Ich hab einen Cronjob, der mit regelmäßig mein mySQL-Backup (so ca. 9 MB) per Mail schickt.
Neuerdings kommt aber immer dieser Fehler:
postdrop: warning: uid=0: File too large
sendmail: fatal: root(0): Message file too big
Was für eine Einstellung muss ich ändern, damit der Fehler nicht mehr kommt?
Mein Perlscript zum versenden sieht so aus:
Code: Select all
#!/usr/bin/perl
use lib '/root/backup-tools/';
use Mime::Lite;
open(MAIL , "| /usr/sbin/sendmail -t");
my $msg = new MIME::Lite;
my $tomail="**********@******.**";
$msg = build MIME::Lite
From => $tomail,
To => $tomail,
Subject => "mySQL-Backup",
Type => 'TEXT',
Data => "Tägliches mySQL-Backup";
attach $msg
Type => "application/x-gzip" ,
Path => "/root/*******/mysql-backup.sql.gz",
Encoding => "base64",
Filename => "mysql-backup.sql.gz";
$msg->print(*MAIL);
close(MAIL);
print "Mail wurde versendet!n";
Re: Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 09:02
by captaincrunch
Interessanter ist wohl die Einstellung für die maximale Größe von Mails im Postfix (hast Glück, dass meine Glaskugel heute morgen aus der Reinigung gekommen ist

) ...
Re: Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 11:49
by mark
Standardmässig ist eine Grösse von 10 MB / Mail eingestellt.
Da die Mail beim verschicken durch das Umwandeln der Datei noch etwas grösser wird, reicht das bei dir scheinbar nicht.
So kannst Du die maximale Grösse auf 20 MB erhöhen.
message_size_limit = 20480000
Aber dran denken: Das ist eine serverweite Einstellung. Somit gilt die für alle, die über diesen Server emails versenden.
Gruß
Mark
Re: Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 13:52
by thiefmaster
In welcher Datei steht das?
Re: Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 14:01
by dodolin
/etc/postfix.conf oder wie auch immer die bei Postfix heisst.
BTW: Hast du überhaupt Postfix?
Re: Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 18:55
by thiefmaster
in /etc/postfix hab ich folgende Dateien:
-rw-r--r-- 1 root root 6726 Oct 14 2002 access
-rw-r--r-- 1 root root 12288 Nov 7 19:06 access.db
-rw-r--r-- 1 root root 1164 Apr 16 11:09 cacert.pem
-rw-r--r-- 1 root root 7328 Oct 14 2002 canonical
-rw-r--r-- 1 root root 12288 Nov 7 19:06 canonical.db
-rw-r--r-- 1 root root 875 Apr 16 11:09 cert.pem
-r-------- 1 root root 135 Apr 19 14:16 confixx_localDomains
-rw------- 1 root root 12288 Apr 19 14:16 confixx_localDomains.db
-r-------- 1 root root 248 Apr 19 14:16 confixx_virtualUsers
-rw------- 1 root root 12288 Apr 19 14:16 confixx_virtualUsers.db
-rw-r--r-- 1 root root 887 Apr 16 11:09 key.pem
-rw-r--r-- 1 root root 22927 Apr 16 11:09 main.cf
-rw-r--r-- 1 root root 5174 Jan 15 13:43 master.cf
-rw-r--r-- 1 root root 4007 Oct 14 2002 pcre_table
-rwxr-xr-x 1 root root 17979 Oct 14 2002 post-install
-rw-r--r-- 1 root root 8315 Oct 14 2002 postfix-files
-rwxr-xr-x 1 root root 5425 Oct 14 2002 postfix-script
-rw------- 1 root root 1024 Apr 29 18:17 prng_exch
-rw-r--r-- 1 root root 4096 Oct 14 2002 regexp_table
-rw-r--r-- 1 root root 4973 Oct 14 2002 relocated
-rw-r--r-- 1 root root 12288 Nov 7 19:06 relocated.db
-rw-r--r-- 1 root root 708 Apr 16 11:09 req.pem
-rw-r--r-- 1 root root 412 Oct 14 2002 sender_canonical
-rw-r--r-- 1 root root 12288 Nov 7 19:06 sender_canonical.db
-rw-r--r-- 1 root root 7292 Oct 14 2002 transport
-rw-r--r-- 1 root root 12288 Nov 7 19:06 transport.db
-rw-r--r-- 1 root root 9011 Oct 14 2002 virtual
-rw-r--r-- 1 root root 12288 Nov 7 19:06 virtual.db
BTW: Hast du überhaupt Postfix?
Ja ;)
Re: Mail mit großem Attachment kann nicht versendet werden
Posted: 2003-04-29 19:27
by rǃppz
in der main.cf stehts
File limit in MySQL
Posted: 2003-05-02 15:48
by cswerin
Hi,
If you are running Postfix with MySQL you might need to change the filesize limit, this can be done under /ETC/my.cnf - Change the value from 1mb to 16mb. Then reload/restart MySQL with 'rcmysql restart' (SuSE)
Cheers
Re: File limit in MySQL
Posted: 2003-05-03 00:45
by thelaw
cswerin wrote:Hi,
If you are running Postfix with MySQL you might need to change the filesize limit, this can be done under /ETC/my.cnf - Change the value from 1mb to 16mb. Then reload/restart MySQL with 'rcmysql restart' (SuSE)
Cheers
Ich glaube aber, dass hier angesprochene Problem hat nichts mit "running Postfix with mySQL" zu tun.
postfix
Posted: 2003-05-03 10:49
by cswerin
Why not ? if you are running Postfix with MySQL that will be the first thing to check.... as instead of saving the sent file in a flat file it will store it in the MySQL DB.....if you then have a block limit of 1 mb you wont be able yo save it and therefor not be able to send it.
An easy way to check this is to send a file with the same size to somewhere else...if that works OK you know it's not the MySQL issue.
Achtung
Christopher