I send emails from the terminal with mutt -s "This is Subject" -a a.txt -- [email protected] < test.txt. The a.txt attachments can be large, how can I avoid filling up the mail server?
I would like the attachments to not be saved on the server or to be deleted immediately after sending. Maybe there is a way to send one copy of the email (with attachments) and save the other (without attachments). Or you can delete the email after sending (you need to make sure that the email was sent) and then save a copy of the email in the sent folder, but without sending it to the recipient again. It is not necessary to do this with mutt, maybe there is something more suitable.
My .muttrc file is:
# ======================= IMAP =========================
set imap_user = [email protected]
set imap_pass = mypassword
set spoolfile = imaps://mail.company.com/INBOX
set folder = imaps://mail.company.com/
set record = "=SENDED"
set postponed = "=DRAFTS"
set mbox = "=INBOX"
#set header_cache = "~/.mutt/cache/headers"
#set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file = "~/.mutt/certificates"
# ======================= SMTP =========================
set smtp_url = "smtp://[email protected]@mail.company.com:123/"
set smtp_pass = $imap_pass
set ssl_force_tls = yes
# ======================= Composition ==================
set editor = "nano"
set edit_headers = yes
set charset = UTF8
unset use_domain
set realname = "My Name"
set from = "[email protected]"
set use_from = yes