Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-26-2014, 04:35 PM
|
#1
|
Member
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116
Rep:
|
Sending automatically generated emails
I have had no luck recently with postfix (see here ). So, I am now looking for a simple SMTP program that will automatically send emails after certain events. This should be a program that can be called from another program when a certain event is detected (I used to use mailx with postfix).
I've tried mutt and ssmtp on archlinux, however they don't seem to be able to log into my gmail to send anything (currently I'm trying to send email from my gmail account to myself since I my postfix mail server won't work). Additionally, any help I find on mutt tries to set me up with an IMAP server and that is NOT what I want -- there's some cases where the filesystem is read-only and may cause errors.
So, does anybody know of a very simple smtp client that will work with gmail, allow automatic emails to be sent from programs, and doesn't try to set me up with IMAP?
|
|
|
11-26-2014, 05:10 PM
|
#2
|
LQ Guru
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,333
|
msmtp or ssmtp
These need to be built with encryption support before they can relay through gmail. The Arch Linux builds should have that taken care of, and there's an ssmtp->gmail guide right on the Arch Wiki.
https://wiki.archlinux.org/index.php/SSMTP
If you're having trouble setting ssmtp up with gmail, and ssmtp has been built with ssl support, then the problem is most likely a problem with your configuration of ssmtp, not with ssmtp itself.
Last edited by dugan; 11-26-2014 at 05:14 PM.
|
|
|
11-26-2014, 05:29 PM
|
#3
|
Member
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116
Original Poster
Rep:
|
The config files for those are plain text, so I would have to store my password in a plain text document? I don't see any way around that with ssmtp or msmtp...
EDIT: also, for anyone trying to do this, note that you need to enable less secure apps in the security settings of your account for gmail.
Last edited by anon112; 11-26-2014 at 06:12 PM.
Reason: additional info for people trying to use ssmtp
|
|
|
11-26-2014, 09:03 PM
|
#4
|
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,580
|
After you configure msmtp (for example), set the permissions so that only owner can access the file.
Code:
chmod 600 [filename]
Update:
That is, chmod the relevant .*rc file.
Sorry for the lack of clarity.
Last edited by frankbell; 11-26-2014 at 09:36 PM.
|
|
|
11-27-2014, 09:21 AM
|
#5
|
Member
Registered: May 2008
Distribution: Arch, FreeBSD
Posts: 116
Original Poster
Rep:
|
Quote:
set the permissions so that only owner can access the file
|
That might not work out so well on my system. In my case, there's a possibility that someone will use a live CD on the system. Wouldn't the "root" user on a live CD still be able to read the file? Is there no way to set up an encrypted password manager?
|
|
|
All times are GMT -5. The time now is 06:10 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|