Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
SendmailNotes
Edit
PageHistory
Diff
Info
LikePages
!!! 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 "<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: <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. Now, on the secondary (this assumes you have <tt>/etc/mail/access</tt> and <tt>/etc/mail/mailertable</tt>): # Add a line containing <tt>mydomain.com RELAY</tt> to <tt>/etc/mail/access</tt>. # 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. If you don't have a MakeFile, run <tt>makemap hash access.db < access; makemap hash mailertable.db < mailertable</tt>. # Restart sendmail(8), probably <tt>/etc/init.d/sendmail restart</tt> # Try sending a test message from a local address through the secondary to <tt>something@mydomain.com</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 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. !!! <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: <verbatim> sendmail.mc:10: m4: Cannot open /usr/share/sendmail-cf/m4/cf.m4: No such file or directory <verbatim> If you run RedHat, this means you need to install the <tt>sendmail-cf</tt> [Package]. Why there is a seperate package for people who want to actually ''configure'' SendMail, I don't know. ---- Part of UserSubmittedNotes
3 pages link to
SendmailNotes
:
SendMail
MTA
UserSubmittedNotes