Difference between revisions of "Configuring Sendmail with smarthost Ubuntu Gutsy"

From Scalix Wiki
Jump to: navigation, search
(The author)
m (SPAM Removal)
 
(25 intermediate revisions by 16 users not shown)
Line 1: Line 1:
 
== Important Note ==
 
== Important Note ==
''Please note that these manual installation instructions should only be used on Ubuntu distributions, such as Ubuntu Gutsy Gibbon 7.10 server, the distribution the document was written for. If you [http://www.cassetteplayer.org cassette player] install Scalix on an unsupported platform, this invalidates your ability to receive Scalix support. Thank you for [http://www.mycaal.com loan modification] your understanding and compliance.''
+
''Please note that these manual installation instructions should only be used on Ubuntu distributions, such as Ubuntu Gutsy Gibbon 7.10 server, the distribution the document was written for. If you install Scalix on an unsupported platform, this invalidates your ability to receive Scalix support. Thank you for your understanding and compliance.''
  
 
'''This document might be inaccurate and under construction. Do not trust this document.'''
 
'''This document might be inaccurate and under construction. Do not trust this document.'''
[http://linkbuildingexperts.co.uk/link-building-services.html Links building company]
+
 
[http://link-building-service.info/ Link popularity building]
+
  
 
= Configuring Sendmail with smarthost on Ubuntu 7.10 Server (Gutsy Gibbon) =
 
= Configuring Sendmail with smarthost on Ubuntu 7.10 Server (Gutsy Gibbon) =
  
As Ubuntu 7.10 is an unsupported platform [http://www.diamondlinks.net link building service] there is currently [http://www.pacquiaomarquezfight.com pacquiao vs marquez] no manual describing the configuration of sendmail (the recommended MTA to be used with Scalix) to be used with a smarthost (smtp relay). As I managed to get Scalix it up and running and I already documented and shared this with the community ([http://www.scalix.com/wiki/index.php?title=Manual_Installation_Ubuntu_Gutsy here]), I thought it would be useful to share my experiences [http://www.mycaal.com loan modification] regarding the sendmail configuration as well.
+
As Ubuntu 7.10 is an unsupported platform there is currently no manual describing the configuration of sendmail (the recommended MTA to be used with Scalix) to be used with a smarthost (smtp relay). As I managed to get Scalix it up and running and I already documented and shared this with the community ([http://www.scalix.com/wiki/index.php?title=Manual_Installation_Ubuntu_Gutsy here]), I thought it would be useful to share my experiences regarding the sendmail configuration as well.
  
 
So below you'll find a how-to that describes the configuration of sendmail to be used with Scalix on a Ubuntu 7.10 server.
 
So below you'll find a how-to that describes the configuration of sendmail to be used with Scalix on a Ubuntu 7.10 server.
  
Sendmail is a remarkably flexible program, supporting many kinds of mail transfer and delivery including the SMTP, which Scalix uses. Sendmail remains the most popular MTA on the Internet. Its popularity is due in part to its position as the standard MTA under most variants of the Unix and Linux operating system. Sendmail can be used with a smarthost to relay SMTP mesages like [http://www.integritylegalcorp.com/esi  e discovery services] to another host. For example your provider's SMTP server.
+
Sendmail is a remarkably flexible program, supporting many kinds of mail transfer and delivery including the SMTP, which Scalix uses. Sendmail remains the most popular MTA on the Internet. Its popularity is due in part to its position as the standard MTA under most variants of the Unix and Linux operating system. Sendmail can be used with a smarthost to relay SMTP mesages to another host. For example your provider's SMTP server.
  
A smart host is a type of mail relay server which allows an SMTP server to route e-mail to an intermediate mail server rather than directly to the recipient’s server. Often this smart host requires authentication from the sender to verify that the sender has privileges to have mail forwarded through the smart host. This is an important distinction from an open relay that will forward mail from the <span class="plainlinks">[http://www.hmcdisplay.com/staging.html <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">Portable Stage</span>] sender without authentication.
+
A smart host is a type of mail relay server which allows an SMTP server to route e-mail to an intermediate mail server rather than directly to the recipient’s server. Often this smart host requires authentication from the sender to verify that the sender has privileges to have mail forwarded through the smart host. This is an important distinction from an open relay that will forward mail from the sender without authentication.
  
 
I used several sources of information on the web. I listed the ones I can remember at the end of the document under '''''Sources'''''.
 
I used several sources of information on the web. I listed the ones I can remember at the end of the document under '''''Sources'''''.
  
[http://www.pacquiaomarquez3live.com/ pacquiao vs marquez]
 
[http://www.buyticketscenter.com/bcs-national-championship-tickets/ BCS National Championship Tickets]
 
[http://www.buyticketscenter.com/ncaa-mens-final-four-tickets/ NCAA Final Four Tickets]
 
[http://www.buyticketscenter.com/ncaa-mens-final-four-tickets/ NCAA Men's Final Four Tickets]
 
[http://www.mayweathervsortizfight.com/ pacquiao vs marquez live streaming]
 
[http://markg87.net/tag/pacquiao/ pacquiao vs marquez 3 live streaming]
 
[http://www.bestpills4weightloss.com/ best weight loss pills]
 
[http://markg87.net/mosley-vs-pacquiao-online-live-streaming/ watch pacquiao vs marquez 3 live streaming]
 
[http://www.pacquiaonews.info/ pacquiao vs marquez 3 streaming]
 
 
 
[http://www.weldingtrainingcenter.com Welding Training Center]
 
[http://www.culinaryschoolstraining.com Culinary Schools Training]
 
[http://www.buyticketscenter.com Buy Tickets Center]
 
[http://www.sportstvlivestreaming.com Sports TV Live Streaming]
 
[http://www.buyticketscenter.com/bcs-national-championship-tickets/ bcs championship tickets]
 
[http://www.buyticketscenter.com/daytona-500-tickets/ daytona 500 tickets]
 
[http://www.sportstvlivestreaming.com/cotto-vs-margarito-live-streaming/ cotto margarito live streaming]
 
[http://www.sportstvlivestreaming.com/khan-vs-peterson-live-streaming/ khan peterson live streaming]
 
[http://www.sportstvlivestreaming.com/mares-vs-agbeko-live-streaming/ agbeko vs mares live streaming]
 
  
 
== Applicable Environments ==
 
== Applicable Environments ==
Line 45: Line 24:
 
* Ubuntu 7.10 Server (Gutsy Gibbon)
 
* Ubuntu 7.10 Server (Gutsy Gibbon)
  
They might not apply unmodified to any other version of <span class="plainlinks">[http://www.diamondlinks.net <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">link building service</span>] Scalix or Ubuntu.
+
They might not apply unmodified to any other version of Scalix or Ubuntu.
  
  
Line 62: Line 41:
 
* '''<username>''' is the userid used to login at the smarthost (often your email address)
 
* '''<username>''' is the userid used to login at the smarthost (often your email address)
 
* '''<account>''' is the account to be used for your smarthost (often your email address as well)
 
* '''<account>''' is the account to be used for your smarthost (often your email address as well)
* '''<password>''' is the password that belongs to your smarthost username <span class="plainlinks">[http://www.mylife.com/gordonkochman <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">Kochman Wilmette</span>]
+
* '''<password>''' is the password that belongs to your smarthost username
  
  
Line 72: Line 51:
 
=== Configure sendmail ===
 
=== Configure sendmail ===
  
Now you have prepared the authentication setup for the concerning smarthost, let's go on and configure sendmail to use this smarthost. To do so, please edit the file '''/etc/mail/sendmail.mc'''. Find the line starting with ''MAILER_DEFINITIONS'' in this file and insert the <span class="plainlinks">[http://thebeginnerslens.com/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">iphone photography</span>] lines before this line:
+
Now you have prepared the authentication setup for the concerning smarthost, let's go on and configure sendmail to use this smarthost. To do so, please edit the file '''/etc/mail/sendmail.mc'''. Find the line starting with ''MAILER_DEFINITIONS'' in this file and insert the lines before this line:
  
 
<pre>
 
<pre>
Line 136: Line 115:
 
  tail -400 /var/log/mail.log
 
  tail -400 /var/log/mail.log
  
If there's something wrong, have a look at the exact error message and fix the <span class="plainlinks">[http://www.siegeldisplay.com/catalog.aspx?catid=popupfloordisplays <span style="color:black;font-weight:normal;text-decoration:none!important; background:none!important;text-decoration:none;">pop up display</span>] problem. If everything is all right, then you're done: congratulations!
+
If there's something wrong, have a look at the exact error message and fix the problem. If everything is all right, then you're done: congratulations!
 +
 
  
 
=Note: Gmail as a SMTP relay=
 
=Note: Gmail as a SMTP relay=
Line 155: Line 135:
  
 
= The author =
 
= The author =
The origin for this <span class="plainlinks">[http://www.siegeldisplay.com/catalog.aspx?catid=popupfloordisplays <span style="color:black;font-weight:normal;text-decoration:none!important; background:none!important;text-decoration:none;">pop up display</span>] document was written by Max Wiertz. As a Scalix newbie, I invested a lot of work in getting Scalix together with sendmail to work for me on Ubuntu. I felt like sharing this with all of you, so you can probably <span class="plainlinks">[http://www.mycaal.com/ <span style="color:black;font-weight:normal; text-decoration:none!important;background:none!important; text-decoration:none;">loan modification</span>] take advantage of <span class="plainlinks">[http://www.pacquiaomosleyfight.com/pacquiao-vs-mosley-tickets/ <span style="color:black;font-weight:normal;text-decoration:none!important; background:none!important;text-decoration:none;">pacquiao vs marquez tickets</span>].
+
The origin for this document was written by Max Wiertz. As a Scalix newbie, I invested a lot of work in getting Scalix together with sendmail to work for me on Ubuntu. I felt like sharing this with all of you, so you can probably take advantage of it.
  
 
If you have any questions, remarks, comments or suggestions regarding this document, do not hesitate to contact me by e-mail: mailto:max_DOT_wiertz_AT_gmail_DOT_com.
 
If you have any questions, remarks, comments or suggestions regarding this document, do not hesitate to contact me by e-mail: mailto:max_DOT_wiertz_AT_gmail_DOT_com.
 
Useful Links:
 
* <span class="plainlinks">[http://www.espycamera.com <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">Spy Equipment</span>]
 
* <span class="plainlinks">[http://www.pacquiaomosleyfight.com/pacquiao-vs-mosley-tickets/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">pacquiao vs marquez tickets</span>]
 
* <span class="plainlinks">[http://www.mayweathervsortizfight.com <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">mayweather vs ortiz live streaming</span>]
 
* <span class="plainlinks">[http://www.pacquiaovsmarquezfight.com <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">pacquiao vs marquez live streaming</span>]
 
* <span class="plainlinks">[http://www.thebestpokersite.com/shop/Casino-Items-Craps-Blackjack-amp-Roulette/Craps-c93/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">craps table</span>]
 
* <span class="plainlinks">[http://www.sportstvlivestreaming.com/maidana-vs-guerrero-live-streaming/ <span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">maidana vs guerrero live streaming</span>]
 
* <span class="plainlinks">[http://www.buyticketscenter.com/daytona-500-tickets/<span style="color:black;font-weight:normal; text-decoration:none!important; background:none!important; text-decoration:none;">daytona NASCAR tickets</span>]
 

Latest revision as of 16:05, 20 March 2012

Important Note

Please note that these manual installation instructions should only be used on Ubuntu distributions, such as Ubuntu Gutsy Gibbon 7.10 server, the distribution the document was written for. If you install Scalix on an unsupported platform, this invalidates your ability to receive Scalix support. Thank you for your understanding and compliance.

This document might be inaccurate and under construction. Do not trust this document.


Configuring Sendmail with smarthost on Ubuntu 7.10 Server (Gutsy Gibbon)

As Ubuntu 7.10 is an unsupported platform there is currently no manual describing the configuration of sendmail (the recommended MTA to be used with Scalix) to be used with a smarthost (smtp relay). As I managed to get Scalix it up and running and I already documented and shared this with the community (here), I thought it would be useful to share my experiences regarding the sendmail configuration as well.

So below you'll find a how-to that describes the configuration of sendmail to be used with Scalix on a Ubuntu 7.10 server.

Sendmail is a remarkably flexible program, supporting many kinds of mail transfer and delivery including the SMTP, which Scalix uses. Sendmail remains the most popular MTA on the Internet. Its popularity is due in part to its position as the standard MTA under most variants of the Unix and Linux operating system. Sendmail can be used with a smarthost to relay SMTP mesages to another host. For example your provider's SMTP server.

A smart host is a type of mail relay server which allows an SMTP server to route e-mail to an intermediate mail server rather than directly to the recipient’s server. Often this smart host requires authentication from the sender to verify that the sender has privileges to have mail forwarded through the smart host. This is an important distinction from an open relay that will forward mail from the sender without authentication.

I used several sources of information on the web. I listed the ones I can remember at the end of the document under Sources.


Applicable Environments

These Installation instructions have been tested with

  • Scalix CE 11.3.0
  • Ubuntu 7.10 Server (Gutsy Gibbon)

They might not apply unmodified to any other version of Scalix or Ubuntu.


Configuring a smarthost for sendmail

To configure a smarthost (with authentication) for sendmail, you'll have to create a file called /etc/mail/auth/client-info and modify the file /etc/mail/sendmail.mc.

Configure authentication

Let's start with creating the file /etc/mail/auth/client-info. The content in of this file represents your login credentials for the smarthost. It should look like the example below:

AuthInfo:<smarthost> "U:<username>" "I:<account>" "P:<password>"

Where:

  • <smarthost> is the fully qualified domain name (fqdn) of your smarthost
  • <username> is the userid used to login at the smarthost (often your email address)
  • <account> is the account to be used for your smarthost (often your email address as well)
  • <password> is the password that belongs to your smarthost username


Next, you'll have to build the password hash database with this command:

sudo bash -c "cd /etc/mail/auth/ && makemap hash client-info < client-info"


Configure sendmail

Now you have prepared the authentication setup for the concerning smarthost, let's go on and configure sendmail to use this smarthost. To do so, please edit the file /etc/mail/sendmail.mc. Find the line starting with MAILER_DEFINITIONS in this file and insert the lines before this line:

define(`SMART_HOST', <smarthost>)dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo', `hash /etc/mail/auth/client-info')dnl

Where:

  • <smarthost> is the fully qualified domain name (fqdn) of your smarthost


Now use the M4 macro processor to translate the /etc/mail/sendmail.mc file into a format sendmail understands (/etc/mail/sendmail.cf). This can be taken out by:

sudo bash -c "cd /etc/mail/ && m4 sendmail.mc > sendmail.cf"



Note: What to do if no authentication needed?
In case no authentication is needed or necessary in your smarthost setup. This how-to can be used as well. In that case, just simply skip the paragraph Configure authentication and only add the line define(`SMART_HOST', <smarthost>)dnl to the /etc/mail/sendmail.mc file. All the rest of the how-to applies as well.



Configure local recipients

To prevent sendmail from sending messages for local recipients through the smarthost, you'll have to tell sendmail which domains are locally processed. This can be done by inserting all local domains in the file /etc/mail/local-host-names, like in the example below:

localhost
mylocaldomain.com
myotherlocaldomain.com

Of course, the domains mylocaldomain.com and myotherlocaldomain.com need to be replaced by your actual local domains.

Now, again this file /etc/mail/local-host-names needs to be translated into a format sendmail understands. Us the make command to do so, like shown below:

sudo bash -c "cd /etc/mail && make"


Restart sendmail and check the configuration

To make sure your configuration is all right, restart sendmail and run the Scalix command omsendin and have a look into the mail log file afterwards. To restart sendmail, use this command:

sudo /etc/init.d/sendmail restart

To make Scalix accept the changes, you should run the omsendin command. If you would do nothing, this command will result in this error: /opt/scalix/bin/omsendin: line 22: omcheckgc: command not found. To prevent this, edit the file /opt/scalix/bin/omsendin. Please replace:

OMCURRENT=`omcheckgc -l | head -1`

on line 22 by:

OMCURRENT=`/opt/scalix/bin/omcheckgc -l | head -1`

Afterwards the omsendin script works great. So now run the command:

sudo /opt/scalix/bin/omsendin

Next, check the configuration, by looking into the log file /var/log/mail.log. You can check it by using:

tail -400 /var/log/mail.log

If there's something wrong, have a look at the exact error message and fix the problem. If everything is all right, then you're done: congratulations!


Note: Gmail as a SMTP relay

If you would like to use Gmail from Google as a SMTP relay for your Scalix instance have a look at these websites:


Sources


The author

The origin for this document was written by Max Wiertz. As a Scalix newbie, I invested a lot of work in getting Scalix together with sendmail to work for me on Ubuntu. I felt like sharing this with all of you, so you can probably take advantage of it.

If you have any questions, remarks, comments or suggestions regarding this document, do not hesitate to contact me by e-mail: mailto:max_DOT_wiertz_AT_gmail_DOT_com.