Results 1 to 5 of 5

Thread: looking for send only mail program

  1. #1

    Default 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

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,100
    Blog Entries
    2

    Default Re: looking for send only mail program

    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: looking for send only mail program

    Quote Originally Posted by tsu2 View Post
    snip

    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

  4. #4
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,100
    Blog Entries
    2

    Default Re: looking for send only mail program

    Quote Originally Posted by three_jeeps View Post
    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
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  5. #5
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,640
    Blog Entries
    15

    Default Re: looking for send only mail program

    Quote Originally Posted by three_jeeps View Post
    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
    Hi
    The following works fine for me on openSUSE and SLE...

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

    Code:
    # 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;
    Code:
    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;

    Code:
    journalctl -u postfix -f
    Then run;

    Code:
    postfix check
    systemctl restart postfix
    echo "Test mail from postfix" | mail -s "Test Postfix" USERNAME@DOMAIN
    You should see in the journalctl output;

    Code:
    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
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •