View Full Version : Sendmail - Mail Relays
llbbl
04-21-2005, 12:56 PM
Anyone know how to configure sendmail to a specific mail relay to distribute its mail? I am a little fuzzy on the details of how sendmail works, but I am assuming that it is using port 25 to send outgoing mail to. If the machine is configured and able to "see" the entire internet I am not sure how it knows what machine to send its mail to in order for it to get distributed to the destination.
I know send mail is complicated, but I am wondering if I can use webmin or something to edit the conf file to allow me to do what I am wanting. Is there any option somewhere that lists specific computers that it should use to act as mail relays to send email with.
llbbl
04-21-2005, 01:05 PM
Sendmail's lengthy and detailed configuration file (sendmail.cf) is installed in /etc. You should not edit the sendmail.cf file directly unless you know exactly what you are doing, due to the fact it is very lengthy and complex. Instead, to make configuration changes to Sendmail, edit the /etc/mail/sendmail.mc file and use the included m4 macro processor to create a new /etc/sendmail.cf (after backing up the original /etc/sendmail.cf, of course). More information on configuring Sendmail can be found in the section called Common Sendmail Configuration Changes.
Various Sendmail configuration files are installed in /etc/mail including:
*
access — Specifies which systems can use Sendmail for relaying email.
*
domaintable — Allows you to provide domain name mapping.
*
local-host-names — The place where you include all aliases for your machine.
*
mailertable — Specifies instructions that override routing for particular domains.
*
virtusertable — Permits you to do a domain-specific form of aliasing, allowing multiple virtual domains to be hosted on one machine.
Several of the configuration files in /etc/mail, such as access, domaintable, mailertable and virtusertable, must actually store their information in database files before Sendmail can use any configuration changes. To include any changes you make to these configurations in their database files, you must run the makemap hash /etc/mail/<name> < /etc/mail/<name> command, where <name> is the name of the configuration file to convert.
http://www.redhat.com/docs/manuals/linux/RHL-7.2-Manual/ref-guide/s1-email-sendmail.html
llbbl
04-21-2005, 01:11 PM
An open mail relay is an email sending server program that is configured in such a way that it will allow people off-campus to send mail through it to other people who are also off-campus. In general, mail sending servers should only accept email destined to or received from their local machines.
Sendmail is the most popular UNIX mail transport agent. It's not the program you use to read your mail, but rather the program that ultimately sends and receives the mail. In fact, sendmail is two programs. As a server daemon, it receives mail (and can also resend the mail it receives); but invoked as a normal program, it just sends mail that you composed. Its usage as a daemon is problematic if not configured properly, but just using it to send mail from pine or elm or mail is OK.
http://www.uic.edu/depts/accc/ecomm/openrelay.html
llbbl
04-21-2005, 01:16 PM
I think I found the answer.
Edit the /etc/mail/mailertable file.
Add something like.
mydomain.com smtp:backend.mail.server
192. smtp:outgoing.mail.server
I will let u know if it works
please do. sendmail can be a big headache
spankers
04-22-2005, 03:00 AM
sendmail can be a big headacheYou understate things, dang.
Configuring "full-featured" MTA's like sendmail is something of a black art, particularly if security is a concern... open relays being a BAD thing....
openbsd-flipp
04-22-2005, 10:48 AM
Nahh it's not really a black art. All you have to do is preform serveral rituals and sell your sould, along with the seperation of several limbs to have it full functional and secure. And God help you if the damn thing ever goes down.
llbbl
04-22-2005, 12:01 PM
Is Postfix or Qmail easier?
i found postfix to be just as weird. haven't tried qmail.
I understand the complexity of sendmail. I just haven't had to configure it in years, thank god. Had to use 2 books, lots of web searching and trial and error before I got it setup w/out open relay and configured the way I wanted last time I did it.
I wouldnt know where to start now.
openbsd-flipp
04-22-2005, 06:05 PM
I have tried both, I think that qmail was easier but not by much.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.