Hi Guido! On Thu, 15. Jan 2009, 15:27:18 +0100, Guido wrote: > I've a problem with msmtp. If I try to send a message by sendmail with > shell "sendmail -f [email protected] [email protected] </etc/hosts" the content of > the file "/etc/hosts" is okay and also the sender. > But if I've try msmtp with shell "msmtp -f [email protected] [email protected] > </etc/hosts" the content of the file "/etc/hosts" isn't okay and there > isn't the sender.
It is intended that properly formatted mails are given to sendmail or msmtp, with header lines, a blank line that separates header and body and a body. Sendmail seems to apply some heuristics to guess that an input file is not in this format so that it sends the file as the mail body. Msmtp does not do this and splits /etc/hosts into headers and body at the first blank line. It is desirable to make msmtp completely compatible with sendmail, but I'm reluctant to add heuristics to catch such a case. I don't think it is possible to ever achieve 100% compatibility anyway. As an easy workaround, you could format your data more like a proper mail, e.g. use (echo "From: [email protected]"; echo ""; cat /etc/hosts) | msmtp This adds a header (consisting of only the From: line) and a blank line separating header and body, so that your input file is sent as the body. This should work with sendmail, too. But ideally you would not just feed random files to sendmail or msmtp, but let a mail user agent construct a proper mail from them first. You could use mailx or Mutt for that purpose. Martin ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ msmtp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msmtp-users
