Penguin
Diff: SendmailNotes
EditPageHistoryDiffInfoLikePages

Differences between current version and revision by previous author of SendmailNotes.

Other diffs: Previous Major Revision, Previous Revision, or view the Annotated Edit History

Newer page: version 6 Last edited on Friday, May 26, 2006 2:42:05 pm by AristotlePagaltzis
Older page: version 5 Last edited on Sunday, February 1, 2004 5:46:48 pm by JustinLarue Revert
@@ -1,50 +1,45 @@
-!!! Sendmail as a secondary MX 
+!!! SendMail as a secondary MX 
  
-As far as I can tell, setting up sendmail to act correctly as a secondary MX is a bit of a drag.  
-Sendmail seems to run into problems if it is a secondary MX, and it gets a message when all higher-priority  
- MXes for the domain are down. Without special configuration, it will bounce the message with a "mail loops back to me (MX problem?)" error. 
+As far as I can tell, setting up SendMail to act correctly as a secondary MX is a bit of a drag. SendMail seems to run into problems if it is a secondary MX, and it gets a message when all higher-priority MXes for the domain are down. Without special configuration, it will bounce the message with a "<tt> mail loops back to me (MX problem?)</tt> " error. 
  
 The very first steps to setting this up are: 
  
-Add MX records in DNS. For example: 
+Add MX records in [ DNS] . For example: 
  
+ <verbatim>  
  mydomain.com. MX 0 preferredmx.mydomain.com. 
  MX 10 secondarymx.otherdomain.org. 
+ </verbatim>  
  
-MXes with the lowest numbers are given the highest priority. I'm assuming that you already have a primary setup, and that part won't be explained here. 
+MXes with the lowest numbers are given the highest priority. I'm assuming that you already have a primary setup, and that part won't be explained here. 
  
-Now, on the secondary (this assumes you have /etc/mail/access and /etc/mail/mailertable): 
+Now, on the secondary (this assumes you have <tt> /etc/mail/access</tt> and <tt> /etc/mail/mailertable</tt> ): 
  
-# Add a line containing ' mydomain.com RELAY' to /etc/mail/access.  
-# Add a line containing 'mydomain.com smtp:preferredmx.mydomain.com' to /etc/mail/mailertable (this is the bit that seems to commonly not be mentioned).  
-# Run 'make' in /etc/mail. Check the timestamps of access.db and mailertable.db to be sure that they have just been regenerated. If they haven't, 'touch' access and mailertable and check your clock.  
-#If you don't have a makefile, run "makemap hash access.db < access; makemap hash mailertable.db < mailertable".  
-# Restart sendmail (probably " /etc/init.d/sendmail restart").  
-# Try sending a test message from a local address through the secondary to something@mydomain.com
+# Add a line containing <tt> mydomain.com RELAY< /tt> to <tt> /etc/mail/access</tt>
  
-You should be all set . Try making the primary unreachable from the secondary, just to be sure, and repeat step 6. The easiest way to make it unreachable is ' preferredmx# route add secondarymx .otherdomain .org dev lo'. Do __not__ do that if you are presently logged into preferedmx from secondarymx, and that is the only way you can reach preferredmx. By doing this you are (temporarily) adding a bad route between the two boxes.. if you don't understand the implications of that, you probably don't want to do it. Be sure to 'route del secondarymx.otherdomain.org dev lo' after you are done testing.
+# Add a line containing <tt>mydomain .com smtp: preferredmx.mydomain .com</tt> to <tt>/etc/mail/mailertable</tt> (this is the bit that seems to commonly not be mentioned)
  
-----  
+# Run <tt>make</tt> in <tt>/etc/mail</tt>. Check the timestamps of <tt>access.db</tt> and <tt>mailertable.db</tt> to be sure that they have just been regenerated. If they haven't, <tt>touch access mailertable</tt> and check your clock.  
  
-!!!make in /etc/mail doesn 't build sendmail .cf  
+ If you don 't have a MakeFile, run <tt>makemap hash access.db < access; makemap hash mailertable.db < mailertable</tt>
  
-So you just updated your /etc/mail /sendmail.mc, but when you run 'make', nothing happens.  
-If you manually try to make sendmail.cf using 'm4', you get an error along the lines of:  
+# Restart sendmail(8), probably <tt> /etc/init.d /sendmail restart</tt>  
  
-sendmail .mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf .m4: No such file or directory  
+# Try sending a test message from a local address through the secondary to <tt>something@mydomain .com< /tt>
  
-If you run redhat , this means you need to install the sendmail-cf package
+You should be all set. Try making the primary unreachable from the secondary, just to be sure, and repeat step 6. The easiest way to make it unreachable is to log into <tt>preferredmx</tt> and do <tt>route add secondarymx.otherdomain.org dev lo</tt>. By doing this you are (temporarily) adding a bad route between the two boxes. __ If you don't understand the implications of that , you probably don't want to do it. ''Do not'' do that if you are presently logged into <tt>preferredmx</tt> from <tt>secondarymx</tt>, and that is the only way you can reach <tt>preferredmx</tt>.__ Be sure to <tt>route del secondarymx.otherdomain.org dev lo</tt> after you are done testing
  
-Why there is a seperate package for people who want to actually *configure* sendmail, I don 't know
+!!! <tt>make</tt> in <tt>/etc/mail</tt> doesn 't build <tt>sendmail .cf</tt>  
  
-----  
+You just updated your <tt>/etc/mail/sendmail.mc</tt>, but when you run <tt>make</tt>, nothing happens. If you manually try to make <tt>sendmail.cf</tt> using m4(1), you get an error along the lines of:  
  
-!!!Respooling an mbox to somewhere else
+ <verbatim>  
+ sendmail .mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory  
+ <verbatim>  
  
-Not really sendmail as such , but hey..
+If you run RedHat , this means you need to install the <tt>sendmail-cf</tt> [Package]
  
-formail -f -s sendmail newuser@some .domain.com < /var/mail/spoolfile  
+Why there is a seperate package for people who want to actually ''configure'' SendMail, I don't know
  
 ---- 
-  
- UserSubmittedNotes 
+Part of UserSubmittedNotes