Solved ssmtp alternative

We have been using ssmtp on a web server for few years, we use it to send email only, we like it as it's easy to setup and support common security features.

However, as ssmtp is unmaintained, we would like to find an alternative, we are interested in msmtp, is anyone using it? is it good?
 
Ssmtp works. I'm sure it will be continuously maintained by one or more persons in this community.

It does a great jump as a send-only email service(MTA).
 
I've used msmtp for years, but as an individual account mailer, rather than a server one, and found it quite reliable. (And better than ssmtp for using more than one individual account, e.g., gmail and something else.)

Here's something a cursory google search found about using with php on a webserver, for Ubuntu, but should work without too much modification.

(Though from the post above, it seems that you'd be ok sticking with ssmtp.)

 
Thanks Lamia and scottro.

ssmtp is really good and easy, while msmtp supports multiple account is a good feature for us. (actually we have thought of sending emails from different SMTP server)

However, I found someone on the web mentioned how to use msmtp on desktop too, is msmtp more suitable for desktop rather than server?
 
postfix ... very good security track, fast,scalable,easy to use, well documented (and quite some companies offering support)
 
Of course, Postfix has its place. For send-only (say to a relay), Postfix is an overkill.

Agree, and thanks rootbert. We have used Postfix on other cases which require sending and receiving. But for this case, send only, we prefer to use those are more simpler to setup like ssmtp / msmtp.
 
As for msmtp, yes, I think it's better for desktop, (especially because of the multiple account thing.
http://srobb.net/mutt.html#Sending is an old page on mutt I did, but in that section is configuring msmtp. Just go down a few paragraphs (the first few deal with using mutt's builtin smtp), and you'll see the msmtp stuff.
 
I thought he knew about that too. I keep wondering what he wanted. It's all about swapping the conf files. Perhaps, a script for swapping with a few conditions would help as an example.
 
This script emulates --account=id option of msmtp (can be improved further):
Code:
#!/bin/sh
  
ACCID1=main
ACCID2=secondary
CONF1=/path/to/config1
CONF2=/path/to/config2
EXEC=/usr/local/bin/ssmtp

if [ "x$1" = "x" ] ; then
    echo "Usage: $0 --account=<id> <other options>"
    exit 1
fi

ARG1_LEFT=`echo $1 | cut -d= -f1`
ARG1_RIGHT=`echo $1 | cut -d= -f2`

if [ "x$ARG1_LEFT" = "x--account" ] ; then
    if [ "x$ARG1_RIGHT" = "x$ACCID1" ] ; then
        $EXEC "-C $CONF1 $2 $3 $4"
    else
        if [ "x$ARG1_RIGHT" = "x$ACCID2" ] ; then
            $EXEC -C $CONF2 $2 $3 $4
        else
            $EXEC $*
        fi
    fi
fi
 
I thought he knew about that too. I keep wondering what he wanted. It's all about swapping the conf files. Perhaps, a script for swapping with a few conditions would help as an example.

Thanks all.

Actually we are thinking of the possibility of switching SMTP when needed (in an admin. friendly way). For example, we normally use SMTP server A to send emails, when the SMTP server A is down for any reasons, we may easily switch to SMTP server B without changing the server config. Therefore, it could be better if we could make a web interface to let administrator switch it by just clicking a switch. Do you think it is possible?
 
For anything you want. You can rename/move/symlink either the script which is called to send email or ssmtp (or whatever else program's) config file.
 
Ssmtp works. I'm sure it will be continuously maintained by one or more persons in this community.

It does a great jump as a send-only email service(MTA).
Is there is a way to switch SSMTP from deliverymode = interactive to deliverymode = background? As far as I know it always use interactive mode but this does not suit my needs.
 
Is there is a way to switch SSMTP from deliverymode = interactive to deliverymode = background? As far as I know it always use interactive mode but this does not suit my needs.
I'm not sure what you meant by interactive or delivery mode.

We only set its config file, add it to rc.conf and replace sendmail commands with its commands in the mailer file. That's all. It requires restarting the PC, I think. Off you go, it will then always be used to send outgoing emails that sendmail would have set.
 
I'm not sure what you meant by interactive or delivery mode.
I meant corresponding sendmail sending modes. Open /etc/mail/submit.cf and look for
Code:
O DeliveryMode=i
this is a default setting for a sendmail when it used to send message to someone using CLI and "-Am" option not used. Prompt is busy until message is sent. Then change it to
Code:
O DeliveryMode=b
That would return command prompt immediately and mesage will be sent in background mode.

SSMTP send messages always in the interactive mode and in some cases this isn't fast enough. I need a simply MTA that would be able to send messages in the background mode using smtp authentication like SSMTP do.
 
Back
Top