configure localhost for emailing

Hi all dev and user love DHIS2,

Has any body know how to configure localhost running DHIS2 can emailing?

-webserver: apache tomcat

-DHIS2 v2.16

-DB: postgreSQL

Thank you

CHANNARA

Hi Rin

It is easy enough to setup with either postfix or exim4 to send mail directly from the host. BUT, the most important thing is to have your networking properly setup ie. you must have a fully qualified domain name and make sure that hostname and /etc/hosts is correct. If you don’t have this, you need to take a different approach by relaying to some other smarthost.

I’ll outline the procedure for exim4:

install exim4 with ‘sudo apt-get install exim4’. Then configure with:

sudo dpkg-reconfigure exim4-config

Then working through the screens …

  1. Select the option for “internet site; mail is sent directly through smtp”

  2. The system mail name should be your fqdn (eg. dhis2.somewhere.org)

  3. Make sure smtp listener only listens on localhost (127.0.0.1 ; ::1)

  4. leave “other destinations for which mail is accepted” blank

  5. leave “domains to relay for” blank

  6. leave “machines to relay for” blank

Just accept defaults for everything else.

Try sending yourself a mail by typing:

mail rin.channara@gmail.com

(finish the mail by just typing a dot on a line on its own)

Beware the mail may well be sent but end up in your spam.

Check ‘sudo tail /var/log/exim4/mainlog’ to see what happened.

Bob

···

On 30 September 2014 11:02, rin.channara@gmail.com wrote:

Hi all dev and user love DHIS2,

Has any body know how to configure localhost running DHIS2 can emailing?

-webserver: apache tomcat

-DHIS2 v2.16

-DB: postgreSQL

Thank you

CHANNARA


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Great, I will do follow

thank you

···

On 30 September 2014 11:02, rin.channara@gmail.com wrote:

Hi all dev and user love DHIS2,

Has any body know how to configure localhost running DHIS2 can emailing?

-webserver: apache tomcat

-DHIS2 v2.16

-DB: postgreSQL

Thank you

CHANNARA


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

At Lars’s suggestion I’ve added those instructions (plus a little extra) to a small tutorial here https://www.dhis2.org/node/48.

···

On 30 September 2014 12:08, rin.channara@gmail.com wrote:

Great, I will do follow

thank you

From: Bob Jolliffe
Sent: Tuesday, September 30, 2014 5:28 Evening
To: channara rin
Cc: DHIS 2 Developers list, DHIS 2 Users list

Hi Rin

It is easy enough to setup with either postfix or exim4 to send mail directly from the host. BUT, the most important thing is to have your networking properly setup ie. you must have a fully qualified domain name and make sure that hostname and /etc/hosts is correct. If you don’t have this, you need to take a different approach by relaying to some other smarthost.

I’ll outline the procedure for exim4:

install exim4 with ‘sudo apt-get install exim4’. Then configure with:

sudo dpkg-reconfigure exim4-config

Then working through the screens …

  1. Select the option for “internet site; mail is sent directly through smtp”
  1. The system mail name should be your fqdn (eg. dhis2.somewhere.org)
  1. Make sure smtp listener only listens on localhost (127.0.0.1 ; ::1)
  1. leave “other destinations for which mail is accepted” blank
  1. leave “domains to relay for” blank
  1. leave “machines to relay for” blank

Just accept defaults for everything else.

Try sending yourself a mail by typing:

mail rin.channara@gmail.com

(finish the mail by just typing a dot on a line on its own)

Beware the mail may well be sent but end up in your spam.

Check ‘sudo tail /var/log/exim4/mainlog’ to see what happened.

Bob

On 30 September 2014 11:02, rin.channara@gmail.com wrote:

Hi all dev and user love DHIS2,

Has any body know how to configure localhost running DHIS2 can emailing?

-webserver: apache tomcat

-DHIS2 v2.16

-DB: postgreSQL

Thank you

CHANNARA


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Great Bob, many thanks. All tutorials here: Resources - DHIS2

Hi bob,

what could I can do? if the server I hosting is windows.

thank you

CHANNARA

···

On 30 September 2014 12:08, rin.channara@gmail.com wrote:

Great, I will do follow

thank you

From: Bob Jolliffe
Sent: Tuesday, September 30, 2014 5:28 Evening
To: channara rin
Cc: DHIS 2 Developers list, DHIS 2 Users list

Hi Rin

It is easy enough to setup with either postfix or exim4 to send mail directly from the host. BUT, the most important thing is to have your networking properly setup ie. you must have a fully qualified domain name and make sure that hostname and /etc/hosts is correct. If you don’t have this, you need to take a different approach by relaying to some other smarthost.

I’ll outline the procedure for exim4:

install exim4 with ‘sudo apt-get install exim4’. Then configure with:

sudo dpkg-reconfigure exim4-config

Then working through the screens …

  1. Select the option for “internet site; mail is sent directly through smtp”
  1. The system mail name should be your fqdn (eg. dhis2.somewhere.org)
  1. Make sure smtp listener only listens on localhost (127.0.0.1 ; ::1)
  1. leave “other destinations for which mail is accepted” blank
  1. leave “domains to relay for” blank
  1. leave “machines to relay for” blank

Just accept defaults for everything else.

Try sending yourself a mail by typing:

mail rin.channara@gmail.com

(finish the mail by just typing a dot on a line on its own)

Beware the mail may well be sent but end up in your spam.

Check ‘sudo tail /var/log/exim4/mainlog’ to see what happened.

Bob

On 30 September 2014 11:02, rin.channara@gmail.com wrote:

Hi all dev and user love DHIS2,

Has any body know how to configure localhost running DHIS2 can emailing?

-webserver: apache tomcat

-DHIS2 v2.16

-DB: postgreSQL

Thank you

CHANNARA


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Then you are al little bit off my patch :slight_smile:

Windows server 2003 and 2008 (and no doubt later) include an smtp server. It may need to be enabled or added (add/remove programs). You would have to study the documentation yourself. But the same principles will apply. Unless you are using an upstream relay, you need to have a proper fully qualified domain name and be sure not to accept incoming mail.

There are also a few opensource and freeware mtas available - google “windows mail mta”. But I can not vouch for any of them so use at your own risk.

If you are not using windows server edition then I really would strongly advise that you do not use this machine as an internet host.

Can I ask (now that I know you are not using linux) where your requirement is coming from to host a local mailer? If it is just for dhis then you can connect it to an external smtp relay service. There are a few (google is your friend). Things like http://www.easy-smtp.com/ might meet your requirements - free for lewss than 10000 emails per month. Or mail chimp. Again I am not endorsing either of these. Just suggesting avenues to explore.

Regards

Bob

···

On 1 October 2014 03:48, rin.channara@gmail.com wrote:

Hi bob,

what could I can do? if the server I hosting is windows.

thank you

CHANNARA

To: channara rin
Cc: DHIS 2 Developers list, DHIS 2 Users list

From: Bob Jolliffe
Sent: Tuesday, September 30, 2014 6:18 Evening

At Lars’s suggestion I’ve added those instructions (plus a little extra) to a small tutorial here https://www.dhis2.org/node/48.

On 30 September 2014 12:08, rin.channara@gmail.com wrote:

Great, I will do follow

thank you

From: Bob Jolliffe
Sent: Tuesday, September 30, 2014 5:28 Evening
To: channara rin
Cc: DHIS 2 Developers list, DHIS 2 Users list

Hi Rin

It is easy enough to setup with either postfix or exim4 to send mail directly from the host. BUT, the most important thing is to have your networking properly setup ie. you must have a fully qualified domain name and make sure that hostname and /etc/hosts is correct. If you don’t have this, you need to take a different approach by relaying to some other smarthost.

I’ll outline the procedure for exim4:

install exim4 with ‘sudo apt-get install exim4’. Then configure with:

sudo dpkg-reconfigure exim4-config

Then working through the screens …

  1. Select the option for “internet site; mail is sent directly through smtp”
  1. The system mail name should be your fqdn (eg. dhis2.somewhere.org)
  1. Make sure smtp listener only listens on localhost (127.0.0.1 ; ::1)
  1. leave “other destinations for which mail is accepted” blank
  1. leave “domains to relay for” blank
  1. leave “machines to relay for” blank

Just accept defaults for everything else.

Try sending yourself a mail by typing:

mail rin.channara@gmail.com

(finish the mail by just typing a dot on a line on its own)

Beware the mail may well be sent but end up in your spam.

Check ‘sudo tail /var/log/exim4/mainlog’ to see what happened.

Bob

On 30 September 2014 11:02, rin.channara@gmail.com wrote:

Hi all dev and user love DHIS2,

Has any body know how to configure localhost running DHIS2 can emailing?

-webserver: apache tomcat

-DHIS2 v2.16

-DB: postgreSQL

Thank you

CHANNARA


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp