[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [msmtp-users] can't end mail
On Wed, 14. Dec 2005, 11:56:23 +0100, Tobias Bergmann wrote:
> I try to use msmtp with plain password. First question is if there is a
> shell option to set the password because I want to call it from another
> program and I can not use config files.
No, there is not such option, because the password would be visible to
other users (via ps, top, or /proc/<pid>/cmdline).
A workaround is to use
$ msmtp -C <(echo -e "host bla\nuser x\npassword y") ...
if you really must script a password.
> The bigger problem is that I can't end the mail with a "." line like it
> is usual in sendmail. In Debug mode it just answers "..". So I can not
> send any mail because I don't know how to end it.
sendmails -oi option is the default behaviour for msmtp. You can use
end-of-file (CTRL+D in interactive mode) to end a mail. But normally
neither sendmail nor msmtp are called directly, because it's the MUAs
responsibility to build a mail. sendmail/msmtp should just send it.
> I am not sure if I am still in the header when I start writing the mail
> but also "Subject: testsubject\n\ntest\n.\n" does not work...
In scripts, you can use
echo -e "Subject: X\n\nHere comes the body..."
But it is better to let a MUA build the mail, for example
mutt -s "my subject" -a attachme.txt recipient@...30...
Martin