Setting up email server

Added by Nikola Z. Guscic over 11 years ago

Hello,

I would like to use email function that comes with AMC, but I don't know how to set up sendmail or smtp server.
I have tried to find some guides online, but a lot of stuff on sendmail seems to have been written 5-6 years ago.
I don't know whether it's still valid.
Moreover, it seems that my OS (Ubuntu 13.04) automatically disables sendmail.

Could anybody point out a good guide for setting up sendmail or smtp delivery method?

I am on Ubuntu 13.04 and have another partition which is 12.04 based.

Thanks,

Niko Z.


Replies (11)

RE: Setting up email server - Added by Alexis Bienvenüe over 11 years ago

For SMTP without authentification, AMC can do it for you (choose SMTP for Edit/Preferences/Email/Mail delivery method).

If you need authentification for your SMTP server, you have to install a sendmail-compatible tool. Sendmail, postfix or exim are overkill. Maybe you can choose something like msmtp from msmtp Ubuntu package.

RE: Setting up email server - Added by red sea over 11 years ago

what is the correct method if used gmail ?

RE: Setting up email server - Added by red sea over 11 years ago

i mean what type in "Edit/Preferences/Email/Mail".
regards,

RE: Setting up email server - Added by Alexis Bienvenüe over 11 years ago

I don't have any gmail account, so perhaps I'm wrong, but I think using gmail's SMTP needs authentication. So you have to use msmtp or similar.

RE: Setting up email server - Added by Nikola Z. Guscic over 11 years ago

I have set up msmtp following the link above and checked that it works by sending an email from command line.
However, when I try to send emails through AMC I get the error message that the sendmail is not available in that path.

RE: Setting up email server - Added by Nikola Z. Guscic over 11 years ago

Anyhow, it seems that the problem with msmtp is limited to Ubuntu 13.04. I suspect that 13.04 disables sendmail by default.

I have tried setting up msmtp on another partition running Bodhi Linux (Ubuntu 12.04 based) and all wen well. Plus it was very easy to set up! So, thanks for the links and the information, I am really glad to have this working as it is a very neat feature.

One last thing, when I was setting up msmtp on Bodhi Linux I added one extra step and edited /etc/mail.rc to include:

set sendmail=/usr/bin/msmtp

I have no idea if that is actually relevant in this case, I was just following instructions from Arch Wiki.

RE: Setting up email server - Added by david Plumel about 11 years ago

i don't find the configuration file where is it ?

RE: Setting up email server - Added by Nikola Z. Guscic about 11 years ago

Look at step 2 * *. There are two configuration files, user and system. I don't know if this will work for everyone, but these steps worked for me on Bodhi Linux.

1.
sudo apt-get install sendmail msmtp

2. Follow simple configuration steps found here -> msmtp set-up: https://code.google.com/p/google-gadgets-for-linux/wiki/MSMPTQuickStart

  • strike one - had trouble with setting permissions (chmod 600) to user configuration file in /home/username/.msmtprc
  • eventually copied the file to /etc/msmtprc (system configuration file) and gave more liberal permissions by using
    sudo chmod 654 msmtprc
    . I deleted the /home/username/.msmtprc.

3. Added an extra step following advice found on Arch Wiki. I am not sure if this is really necessary for all users, you can
still send emails from command line without this step.

set sendmail=/usr/bin/msmtp

Well, that's really all there is to it. Msmtp is simple to set up and it integrates nicely with my pre-existing gmail account.
Here is the content of /etc/msmtprc (system configuration file):
  1. Use an external SMTP server with insecure authentication.
  2. (manually choose an insecure authentication method.)
  3. Note that the password contains blanks.
defaults
######################################################################
  1. A sample configuration using Gmail ######################################################################
  1. account name is "gmail".
  2. You can select this account by using "-a gmail" in your command line.
    account gmail
    host smtp.gmail.com
    tls on
    tls_certcheck off
    port 587
    auth login
    from
    user
    password somesecret
  1. If you don't use any "-a" parameter in your command line,
  2. the default account "someplace" will be used.
    account default: gmail

RE: Setting up email server - Added by david Plumel about 11 years ago

Un grand merci cela fonctionne

Big thanks it's work

RE: Setting up email server - Added by Nikola Z. Guscic about 11 years ago

Cool! You're welcome.

Niko Z>

RE: Setting up email server - Added by Ben French about 9 years ago

It seems Gmail has added an extra step in authentication.

Ensure that the setting "Allow less secure apps:ON" is enabled in

[[https://myaccount.google.com/security#signin]]

page.

was a little frustrating trying to figure out why msmtp, would not work.
Turned out to be gmail

(1-11/11)