looking for send only mail program

In the past, I have used ssmtp and msmtp as simple, send only mail programs.
http://linux.die.net/man/8/ssmtp
http://msmtp.sourceforge.net/

I can’t seem to find a ssmtp package for 13.2. I have tried msmtp but have an unsolvable issue with certs, so I am looking for an alternative.

Basically I want the same functionality as ssmtp: a send only mail capability that can relay from gmail, and send email from the command line.
Any suggestions?

I’ve read through lots of articles that claim one can configure postfix and sendmail to do the same thing but they are all very involved and each article I’ve read have very little similarities.
Any help appreciated

Any SMTP server application will accept an email message and forward (can cache, but will not store on a permanent basis), this is known as setting up an SMTP relay.

When you install Postfix or Sendmail on an openSUSE, the default configuration should be able to relay messages from any other app (even from a console) on the local machine. If you wish to forward mail from another machine, you need to configure (Installing the YAST applet can assist configuring).

The problem with setting up any SMTP relay is that nowadays the remote mail server you’re relaying to may have anti-spam measures in place that will reject messages from unauthorized (ie ad hoc) SMTP servers. This is why it’s often recommended to use an SMTP relay set up by your ISP or by a service on the Internet (like GMail’s SMTP servers). But, if you’re forwarding to your own mailserver, you can of course allow mail to come from anywhere including any you set up yourself.

In your other Forum thread, you asked about SSMTP, and these issues that relate to SMTP relay in general will apply to that as well.

TSU

Thanks for the reply. I am aware of the issues you pointed out. Using postfix out of the box installed with YAST, I do not know what the configuration should be. As I mentioned, a read a number of articles and to accomplish the same thing (e.g. send mail through a google relay) and they all had different config setting that varied widely and I could not determinine the reasoning for them. I don’t want to go down this road, blindly copying/pasting and hoping for a success.

Since I have used ssmtp many times in the past, I know exactly how it works, how to configure it, etc.
Apparently there is not build of it for opensuse and no equivalent either., sigh…

J

See my original post in this thread,
I pointed you to the OBS project that creates the ssmtp packages for 13.1… and for Tumbleweed.

This type of program (generally speaking any very simple app like an SMTP) doesn’t have any significant dependencies so everything it needs is included in the package, which then means that the package almost certainly can be installed on any version of openSUSE and not just the target versions of openSUSE.

So, the OBS Download links should point you to both the 13.1 and Tumbleweed packages (both 32-bit and 64-bit).
I’d recommend you install the Tumbeweed package that is appropriate for your 13.2, you shouldn’t have any problems.

TSU

Hi
The following works fine for me on openSUSE and SLE…

In /etc/main.cf edit lines as follows;


# Use gmail as relay
relayhost = [smtp.gmail.com]:587

smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

smtp_use_tls=yes
smtp_tls_CAfile = /etc/postfix/cacert.pem

Create a cert and passwd file;


cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem

vi /etc/postfix/sasl_passwd (and add;)

[smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD

chmod 0600 /etc/postfix/sasl_passwd
postmap /etc/postfix/sasl_passwd

Edit /etc/postfix/master.cf and remove # (line 50) to allow tlsmgr.

Check, restart postfix and test… open another terminal and follow the logs;


journalctl -u postfix -f

Then run;


postfix check
systemctl restart postfix
echo "Test mail from postfix" | mail -s "Test Postfix" USERNAME@DOMAIN

You should see in the journalctl output;


Aug 19 11:59:57 YOUR_SYSTEM postfix/pickup[11735]: 6ABCA1449: uid=0 from=<root>
Aug 19 11:59:57 YOUR_SYSTEM postfix/cleanup[21090]: 6ABCA1449: message-id=<20160819165957.6ABCA1449@YOUR_SYSTEM>
Aug 19 11:59:57 YOUR_SYSTEM postfix/qmgr[11736]: 6ABCA1449: from=<root@YOUR_SYSTEM>, size=484, nrcpt=1 (queue active)
Aug 19 11:59:58 YOUR_SYSTEM postfix/smtp[21092]: 6ABCA1449: to=<USERNAME@DOMAIN>, relay=smtp.gmail.com[64.233.178.108]:587, delay=0.92, delays=0.02/0.01/0.42/0.46, dsn=2.0.0, status=sent (250 2.0.0 OK 1471625998 q129sm4167565oia.17 - gsmtp)
Aug 19 11:59:58 YOUR_SYSTEM postfix/qmgr[11736]: 6ABCA1449: removed