I've installed Zimbra Collaboration Suite on CentOS 7. I need to use mutt to send an email every hour.
The problem is whenever my script executes mutt, it does not save the message into specific (remote IMAP) folder in the .muttrc.
Meanwhile, when I execute the command directly, it does save the message into the folder.
This is my .muttrc configuration, resides in the current user home who executes the script:
set from="IP Address Information <ip-no-reply@xxx>" set folder="imaps://username:password@localhost" set mask="!^\\.[^.]" set record="+IPInfo" set postponed="+Drafts" set spoolfile="+INBOX" set edit_headers=yes set ssl_starttls=yes set ssl_force_tls=yes set smtp_url = "smtp://username:password@localhost:587"
This is the mutt invocation, executed by cron every hour:
echo "Test" | mutt -s "IP Address Information" firstname.lastname@example.org
If I were to invoke the command like this:
mutt -s "IP Address Information" email@example.com
and follow the process (mutt opens vi and let me type the body), it does saves the message to the folder. But then I cannot put this command to the script as it was meant to be automatic.
This is the destination folder I mentioned: