On 15Oct2015 09:25, Cameron Simpson <c...@zip.com.au> wrote:
Mathieu replied to me directly, off list, by accident I think. I've asked if
he'd like to come back on list. He's traced his issue to running his daemon
from a boot script where $HOME isn't what he expected. I'm hoping to discuss
that further on list after he replies.
Just for the record, since Mattieu has not posted a summary, I append his
diagnosis below.
Cheers,
Cameron Simpson <c...@zip.com.au>
In fact, my problem comes from a strange way of linux startup
I figured out that mutt can't send email just after a system reboot but works
fine each time I need to restart the daemon of my embedded python scripts
I figured out that the daemon which is launched at boot as service (stored in
/etc/rc2.d) is executed as root but with a HOME=/ environment variable... It
seems that mutt tries to write content of mail in a sent file which is located
in this HOME folder and it seems too it can't write in the / folder. When I
restart my daemon, the HOME env var is well defined as /root folder and emails
are sent correctly.
I tried to set/export the HOME var at beginning of the daemon code but it still
has the / value I then stored a .muttrc in / folder which is defining :
set record = '/root/sent'
and since, all is Ok but it is a solution I do not appreciate because I have to
store the .muttrc file in /, /root, ...