[Dovecot] hardlinks deliver not work
hello, I try to use the deliver dovecot with hardlinks. in command line, it's work with this command /usr/lib/dovecot/deliver -p themail -d user
when i send mail with postfix. I received the mail for all users but it doesn't create hardlinks.
i check with command line
md5sum themail
it same for all mail . but it don't create hardlinks.
in my master.cf dovecot unix - n n - - pipe user=utilisateurmail:utilisateurmail argv=/usr/lib/dovecot/deliver -d ${user}
have you got a solution ?
thinks you
Arnaud Yonnet
ps, im sorry. my English is really poor....
On Mon, 2011-04-04 at 14:43 +0200, Arnaud Yonnet wrote:
hello, I try to use the deliver dovecot with hardlinks. in command line, it's work with this command /usr/lib/dovecot/deliver -p themail -d user
Yes, it works only when you use the -p parameter.
when i send mail with postfix. I received the mail for all users but it doesn't create hardlinks. .. user=utilisateurmail:utilisateurmail argv=/usr/lib/dovecot/deliver -d ${user}
Because there is no -p parameter. You'd need to write a script to do this. I know some people have done that, but no one's made their script publicly available.
A far easier solution would be to use Dovecot v2.0 and deliver mails via LMTP. Then the hard linking happens automatically.
ho yes it's work with script thanks you
hum I have one more question, i create the script for replace dovecot deliver. it's work .cool :) but if it's crash for many raison, for exemple the hard disk full, Postfix Bounce the mail.
with deliver dovecot, Postfix not bounce, it defer. I don't want postfix Bounce. I prefer it defer.
I changed the code error in my script but nothing.
tanks you for your help.
this my script it's not finish
#!/usr/bin/perl $ID_mail_interne = rand(10000000); $Mail="/tmp/$ID_mail_interne"; open(PDBFILE, ">$Mail") ;
if ( $? != 1 ) { print "open file $Mail failed: $!\n"; exit 64; } else { while ($STDIN = <STDIN>) { print PDBFILE $STDIN; } foreach $Recepient (@ARGV){
system("/usr/lib/dovecot/deliver -p $Mail -d $Recepient");
if ( $? == -1 )
{
print "command failed: $!\n";
}
else
{
printf "command exited with value %d", $? >> 8;
}
}
}
On 04/04/2011 15:18, Timo Sirainen wrote:
On Mon, 2011-04-04 at 14:43 +0200, Arnaud Yonnet wrote:
hello, I try to use the deliver dovecot with hardlinks. in command line, it's work with this command /usr/lib/dovecot/deliver -p themail -d user Yes, it works only when you use the -p parameter.
when i send mail with postfix. I received the mail for all users but it doesn't create hardlinks. .. user=utilisateurmail:utilisateurmail argv=/usr/lib/dovecot/deliver -d ${user} Because there is no -p parameter. You'd need to write a script to do this. I know some people have done that, but no one's made their script publicly available.
A far easier solution would be to use Dovecot v2.0 and deliver mails via LMTP. Then the hard linking happens automatically.
On Wed, 2011-04-06 at 07:30 +0200, Arnaud Yonnet wrote:
hum I have one more question, i create the script for replace dovecot deliver. it's work .cool :) but if it's crash for many raison, for exemple the hard disk full, Postfix Bounce the mail.
If hard disk is full, deliver should return EX_TEMPFAIL, not crash.
I changed the code error in my script but nothing.
The error code should be EX_TEMPFAIL = 75, Postfix bounces anything else.
this my script it's not finish
I'm not too good with Perl, but:
system("/usr/lib/dovecot/deliver -p $Mail -d $Recepient"); if ( $? == -1 ) { print "command failed: $!\n"; } else { printf "command exited with value %d", $? >> 8; } }
}
It prints the $? but doesn't forward the exit error code.. Of course, if only some deliveries fail but others don't, it becomes problematic! I think in such situation you should return success, and re-send the failed messages via sendmail.
All of this would be much easier and more robust with v2.0 and LMTP.
hello thinks for your reponse. my script is finish. I create tutorial. But it's in french http://mdl29.net/doku.php?id=braveo:docdovecothardlinks
I don't want install dovecot 2.0 because it's not present in official debian depot.
thinks you again for your help
best regars Arnaud Yonnet Maison du libre http://mdl29.net
On Fri, 08 Apr 2011 16:46:51 +0300, Timo Sirainen wrote:
On Wed, 2011-04-06 at 07:30 +0200, Arnaud Yonnet wrote:
hum I have one more question, i create the script for replace dovecot deliver. it's work .cool :) but if it's crash for many raison, for exemple the hard disk full, Postfix Bounce the mail.
If hard disk is full, deliver should return EX_TEMPFAIL, not crash.
I changed the code error in my script but nothing.
The error code should be EX_TEMPFAIL = 75, Postfix bounces anything else.
this my script it's not finish
I'm not too good with Perl, but:
system("/usr/lib/dovecot/deliver -p $Mail -d
$Recepient"); if ( $? == -1 ) { print "command failed: $!\n"; } else { printf "command exited with value %d", $?
8; } } }
It prints the $? but doesn't forward the exit error code.. Of course, if only some deliveries fail but others don't, it becomes problematic! I think in such situation you should return success, and re-send the failed messages via sendmail.
All of this would be much easier and more robust with v2.0 and LMTP.
participants (3)
-
Arnaud Yonnet
-
arnaud.yonnet
-
Timo Sirainen