Re: messages chopped in half
David Aspinwall <[email protected]> Fri, 23 Jan 2004 15:52:21 -0800
| Newsgroups | gmane.mail.yosucker.general |
|---|---|
| Message-ID | <[email protected]> |
>>"svref" == David Morse <svref-/[email protected]> writes: > My mail flow, if I remember it right: > yahoo ---> Yosucker ---> localhost:/var/spool/mail/dm ---> pop3d -----> Mozilla Is this really safe? From a quick look at the YoSucker code, it seems like it is doing a flock call on the mail spool file itself (/var/spool/mail/dm in this case). I think sendmail actually locks a file with a '.lock' at the end. At least that's what the 'movemail' command that comes with emacs does. Plus, some versions of sendmail don't use flock, and some systems don't use sendmail, so getting this right doesn't seem that easy. If sendmail is trying to write the file while YoSucker is also trying to write it, or your mail client or pop server is reading the file while YoSucker is writing it, mail can get lost or truncated. I don't tend to trust file locking with sendmail in any case. What I do is set PIPE=1 in the config file, and set OUTFILE to a script which basically looks like: #!/bin/sh /usr/bin/spamc -f | /usr/sbin/sendmail -oi myname-G/[email protected] The spamc is there because I'm using spamassassin; if you aren't, you could get rid of all up to and including the '|'. Of course, you should test the sendmail command by itself first to make sure it works. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn