On Tue, Jul 15, 2008 at 8:28 PM, Martin Mielke
Hello,
hmm, I'm either too blonde or need more coffee to fully understand what you mean... :-)
Sending emails TO a gmail.com account is quite easy/trivial, even from the shell, without installing the ssmtp package you propose (no pun intended): --- martin@steelrose:~> mailx foo@gmail.com Subject: Test to gmail.com
Hello world!
. EOT
-- Jul 15 12:14:00 steelrose postfix/pickup[7215]: 5DFE5124BBA: uid=1000 from=<martin> Jul 15 12:14:00 steelrose postfix/cleanup[7437]: 5DFE5124BBA: message-id=<20080715101400.5DFE5124BBA@steelrose.local> Jul 15 12:14:00 steelrose postfix/qmgr[5223]: 5DFE5124BBA: from=
, size=474, nrcpt=1 (queue active) Jul 15 12:14:04 steelrose postfix/smtp[7439]: 5DFE5124BBA: to= , relay=gmail-smtp-in.l.google.com[72.14.215.114]:25, delay=3.8, delays=0.25/0.04/1.4/2.1, dsn=2.0.0, status=sent (250 2.0.0 OK 1216116844 z31si3606hub.14) -- As you can see, the outgoing email domain is also rewritten to use a FQDN so a reply can find its way back and the test email hits gmail.com servers straight away.
So is there any advantage over Postfix that I'm not aware of?
Quite possibly not. I'm not familiar with postfix or sendmail, i.e. have never used either. What would be the postfix configuration steps - bear in mind I don't have any ISP providing me with a mail account. Hopefully the config is much simpler than the two cat commands I gave. Also postfix/sendmail may come into their own where more than one person needs this functioanlity - I haven't tried to set authentication from user specific files. One _big_ (for me) issue I can think of is that I don't need to open any ports in my firewall - I think sendmail/postfix would require this? As the ssmtp descriptions says - it pretty much does only one thing, so is really only suitable where that one thing is all that is required. Mark
Cheers, Martin
----- Original Message ----
From: Mark V
To: suse Sent: Tuesday, July 15, 2008 9:17:27 AM Subject: [opensuse] A simple way to send email, from the command line, to a gmail account. The simplest solution I've found is to install the ssmtp package. I've packaged this on the OBS for all platforms except Debian and Ubuntu fdistros - If someone would like to get them building let me know and I'll add them as a maintainer.
This use case is quite specific, and is just what ssmtp targets: "extremely simple MTA to get mail off the system to a mail hub",.
The bonus is this allows you to send mail to a gmail account without any third parties, or configuring you local machine as....? (well its beyond me what I'd need to do)
I haven't yet worked out howto pass username and password other than via /etc/ssmtp/ssmtp.conf
I'd appreciate it anyone has additional tips or can point to a simpler set-up.....?
# # Begin bash session as ordinary user # su MY_REPO=http://download.opensuse.org/repositories/home:mvyver/openSUSE_11.0
zypper addrepo --check $MY_REPO "mvyver Repository" zypper install --repo $MY_REPO ssmtp
GMAIL_USER=...... GMAIL_PSWD=......
cat
mail -v -s "Testing SSMTP" $GMAIL_USER@gmail.com < This should go direct to gmail, "do not pass ISP do not pay fees".... EOM # # End bash session as ordinary user #
Preparation: --------------- - make sure sendmail is deactivated: # service sendmail stop - Check sendmail won't restart on reboot: YaST Control Center>>System>>System Services (runlevel) - check that the mta alternative does not exist # ls -la /etc/alternatives/mta # should not exist
Troubleshooting: -------------------- - If the /et/claternatives/mta exists before you install ssmtp, you can remove it: # /usr/sbin/update-alternatives --remove mta note that on your system might be different on mine it was /usr/bin/mailx
HTH? Mark -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org