Table of Contents
Thunderbird Trash hung
When Thunderbird cannot access the Imap trash from Linux, close Thunderbird and delete
~/mail/Trash ~/.thunderbird/63xecxdp.default/ImapMail/mail.aoe.vt.edu/Trash.msf
touch ~/mail/Trash
restart Thunderbird
command line stuff
/bin/mail -s "$message_subject" $message_mailto < $message_file
Just in case you don't know, if everything you need is in the script, you can avoid writing a for the message body:
/bin/mail -s "$message_subject" $message_mailto <<__EOD__ message body here __EOD__
And to get the stderror as well add 2>&1 (assuming (ba)sh)
/bin/mail -s "$message_subject" $message_mailto <<__EOD__ 2&>1 >message body here >__EOD__
This doesn't give any control over the from: field; it's simply piped into sendmail. It mirrors what crond and atd do.
echo -e 'Love\n\tMaria' \
| mail -s "Message for Manuel" Manuel.Mussini@bo.infn.it
The following gives complete flexibility and is what I often do to send reports. Note that I have two sections here, one sending out the headers (including the needed blank line), one creating the actual report. This mirrors what is often needed in practice.
( cat «Z To: Manuel.Mussini@bo.infn.it From: sister@example.com Subject: Message from Maria
Z echo Thanks so much for last night echo echo Love echo -e \ Maria ) 2>&1 \ | /usr/sbin/sendmail -t
Are you sending the mail to the root user?
Then you need to set an alias in /etc/aliases and forward root's email to your email address (or even better a list of people, so that you can go on holiday).
Edit /etc/aliases and use the command "newalias"
If your script is sending email to your address directly, I can help if you are using the Postfix mail program (and that is not likely) , as that is the one I have most experience with. I would rather not try to help you configure Sendmail remotely.
What's the Z?
That's covered in the man pages for the shells, but basically it delimits a “here document”. It tells the shell to temporarily redirect STDIN to the script between the occurances of Z. It says, “use this data as if you were reading from a file”.
For Sendmail, the Bat Book:
http://www.oreilly.com/catalog/sendmail3/
For attaching files to mails or sending the program mpack can be a suitable solution. This is a utility though and not in standard linux distributions. I don't believe that mail or sendmail are capable of doing attachments automatically. You have to prepare the MIME attachment by some other means.
mutt is a (good) SL-distributed alternative:
mutt -s "subj" -a attach whoever@wherever <whatever
'whatever' needs to be present in some way (|,<,« etc; but whatever=/dev/null should also work), or mutt will invoke an editor rather than sending it off …
With mail/sendmail you probably don't have a choice other than uuencoding the attachment and send it along as plain text, which has however a fairly good chance to get trapped by a spam-filter…
Phishing help
Bill Oetjens setup
Bill has two accounts set up in Thunderbird. One for exchange and one for the AOE mail server. He does not receive email through AOE's server, but just uses it as a storage server.
exchange server: exsecure.vt.edu port 993
ssl/tls
Normal Ports
AOE
mail.aoe.vt.edu port 993