You are not logged in.
I took me a while to get this working when I did it, hadn't found this guide back then.
I just have two questions:
1. How do I stop the mailing of system mails, i.e like mentioned before - cron errors which flooded my mail for a while?
2. Is there any workaround for passwords containing " (quote)?
had to change the password and remove the " because I was unable to log in through ssmtp.
Offline
1. How do I stop the mailing of system mails, i.e like mentioned before - cron errors which flooded my mail for a while?
If MAILTO is defined but empty (MAILTO=""), no mail
will be sent
looks like you can just add MAILTO="" to your crontab and cron will stop attempting to send mail (and stop flooding your logs).
i use a similar option in fcron, which hopefully Arch will be moving to by default soon .
but now i'm thinking, the easiest way to stop system mails all together (i.e. if you have no sendmail executable anyway)...
sudo echo -e '#!/bin/sh\nexit 0' > /usr/bin/sendmail && sudo chmod +x /usr/bin/sendmail
NOTE: this could cause issues i'm not considering and is meant only in a 'thinking-out-loud' context
//github/
Offline
I have spent 3hrs trying to get this thing to run with gmail and no success.
I installed heirloom-mailx and it worked the first time. Apparently ssmtp doesn't get updated anymore.
Offline
I'm having some probs with this.
This makes sense, if I
chmod 600 /etc/ssmtp/ssmtp.conf
I get an error because sSMTP can't read the config.
Needless to say
chmod 660 /etc/ssmtp/ssmtp.conf
Fixes that.
However, I've run:
echo test | mail -s "testing ssmtp setup" user@domain.com
And now I just keep getting:
send-mail: Connection lost in middle of processing
Any ideas?
Offline
Lonsas wrote:1. How do I stop the mailing of system mails, i.e like mentioned before - cron errors which flooded my mail for a while?
man crontab wrote:If MAILTO is defined but empty (MAILTO=""), no mail
will be sentlooks like you can just add MAILTO="" to your crontab and cron will stop attempting to send mail (and stop flooding your logs).
This trick doesn't work for me. I just get a bunch of lines like this in /var/log/crond.log:
Jul 22 23:49:01 myhost crond[17953]: failed parsing crontab for user root: MAILTO=""
% whereis whatis whence which whoami whois who
Offline
This trick doesn't work for me. I just get a bunch of lines like this in /var/log/crond.log:
Jul 22 23:49:01 myhost crond[17953]: failed parsing crontab for user root: MAILTO=""
I get this one too, unfortunately...
Offline
Why wont this thread die....?!
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Why wont this thread die....?!
command line simplicity .
Offline
EDIT: I think I'm going to try msmtp in the mean time, but I'd still like assistance with ssmtp if anyone is willing and able.
I can't get this to work to save my life.
These are the errors in /var/log/everything:
Aug 16 12:50:13 shitty sSMTP[2044]: Connection lost in middle of processing
Aug 16 12:54:10 shitty sSMTP[2102]: Creating SSL connection to host
Occasionally I get this in my terminal:
send-mail: Connection lost in middle of processing
This is my config, "nospam" being replaced with my own email:
ssmtp.conf
-------------------------------
root=nospam@gmail.com
mailhub=smtp.gmail.com:587
hostname=gmail.com
UseSTARTTLS=YES
AuthUser=nospam@gmail.com
AuthPass=password
FromLineOverride=YES
revaliases
-------------------------------
root:nospam@gmail.com:smtp.gmail.com:465
nospam:nospam@gmail.com:smtp.gmail.com:465
Any help with this would be greatly appreciated.
Last edited by PiousMinion (2010-08-17 18:12:28)
Offline
ssmtp.conf
-------------------------------
root=nospam@gmail.com
mailhub=smtp.gmail.com:587
hostname=gmail.com
UseSTARTTLS=YES
AuthUser=nospam@gmail.com
AuthPass=password
FromLineOverride=YESrevaliases
-------------------------------
root:nospam@gmail.com:smtp.gmail.com:465
nospam:nospam@gmail.com:smtp.gmail.com:465
Try these:
ssmtp.conf
root=postmaster
FromLineOverride=Yes
mailhub=smtp.gmail.com:587
rewriteDomain=
UseTLS=Yes
UseSTARTTLS=YES
AuthUser=nospam@gmail.com
AuthPass=password
revaliases
root:nospam@gmail.com:smtp.gmail.com:587
nospam:nospam@gmail.com:smtp.gmail.com:587
The permissions on the ssmtp.conf file will dictate who can send mail with the setup like this. That is, if you follow the wiki, only root will be able to send mail.
Edit: I updated the wiki to show 587 in all three places.
Last edited by luke (2010-08-19 18:30:40)
Offline
Why wont this thread die....?!
8-) Apparently we just aren't keeping it simple _enough_ 8-)
I've setup ssmtp on 3 different kinds of systems: freebsd, arch, cygwin
All installations are sending to a postfix mail server hosted here, not google (since google is part of the evil empire, and a big part of running linux is to make one's life _less_ dependent on the evil empire and more self reliant)
However the mail server uses submission port (587) and STARTTLS, so much of the configuration of ssmtp mail clients has been very similliar to the instructions given for gmail.
On arch, I'm experiencing the issue of only root being able to send mail.
On both freebsd and cygwin, once the ssmtp.conf file had the correct username/password, the UseSTARTTLS and UseTLS options set I was able to send mail from all users, not just root.
On freebsd the ssmtp.conf permissions are:
epicenter# ls -l /usr/local/etc/ssmtp/ssmtp.conf
-rw-r----- 1 ssmtp wheel 1478 Apr 6 2010 /usr/local/etc/ssmtp/ssmtp.conf
There is no revailiases file in th is installation.
And No, the users sending mail are not in the wheel group.
Has anyone uncovered WHY can only root send mail on arch with ssmtp?
It doesn't seem to be required for all users to have access to the ssmtp.conf on other systems.
This could have to do with mailwrapper or the mail executable.
android
ARCH: even when it doesn't work it's a lot of fun to work on 8-)
Offline
Offline
Sorry for refreshing - one question. I would like to have the ability of sending emails but ssmtp.conf needs password in .conf. It is not secure. Is there a way to bypass typing password in plain text of .conf?
Offline
man ssmtp
Don't necrobump old threads.
EDIT: I use msmtp, which asks for a password if none is specified. Still, most people just change the permissions on their configs; it's only insecure if you give an untrustworthy person access to your machine.
Last edited by ANOKNUSA (2014-06-06 18:22:30)
Offline
What's the point of starting another thread when this one covers all of maters regarding ssmtp? You like to swim in garbage?
Offline
What's the point of starting another thread when this one covers all of maters regarding ssmtp?
Apparently it doesn't, or you wouldn't be asking.
Offline
firekage, you should know the rules about necrobumping. Also there is no need to get snippy or personal when told to follow the rules.
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
It's not getting personal. I just follow basic logic when searching info. I found a good thread, is it really neccesary to start new one only to ask one thing about it when there is a goos old topics? That's strange, just like garbaging clean environement because it is the way to do it. I know the rules but haven't we should think more about this only rule?
Offline
People have to read through three full pages of replies before they can be deemed "competent" to reply to you. You could instead start your own thread and judicially link to anything relevant from this one.. Y'know, just sayin'..
Offline
It's not getting personal. I just follow basic logic when searching info. I found a good thread, is it really neccesary to start new one only to ask one thing about it when there is a goos old topics? That's strange, just like garbaging clean environement because it is the way to do it. I know the rules but haven't we should think more about this only rule?
Then you should be aware that with the rolling release nature of Arch, things change very often. What was valid in 2009 may not be valid anymore. What else do you need to think about in this rule ??
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
Closing...
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline