I've just setup a new Ubuntu 10.04 LTS server on linode for myself. Followed an excellent instruction at: here to finish the installation of some basic stuff including postfix.
I am trying to figure out a way to send an email to my gmail address with an attachment, but cannot find how. Already confirmed that email can reach my gmail account.
In the end I have to use mutt to send the email with attachments, probably SendEmails will also do well, but I am wondering how to do the same thing in postfix from command-line?
Many thanks in advance for this dumb question.
Best Answer
Why does it have to be
postfix
directly?mailx -a
,mutt
, ormutt -a
will also use thesendmail
interface -- unless you configure them for SMTP.(Note, in bsd-mailx the option is
-A
instead.)Anyway, here's a "postfix" example.
Replace
$USER
, content type and filename to match your environment. Example assumes you are sending the message to yourself and have a ZIP filefoo.zip
in the current directory.(Creation of MIME multipart messages left as an exercise to the reader.)