[NTLUG:Discuss] Why use sendmail?
Chris Cox
cjcox at acm.org
Tue Jan 28 13:37:53 CST 2003
Wayne Dahl wrote:
> Ok guys, here comes another newbie question.
>
> I'm on a dynamically assigned IP (I'm assuming it's DHCP...the router
> just gets whatever IP Verizon sends it) and according to the people I
> talk to at VASG (Verizon Advances Services Group...I talk to the every
> day at work), the lease on the IP could be less than an hour and a
> half...as little as 45 minutes. Now...supposedly, if my router is off
> for more than 45 minutes to an hour and a half, I could conceivably get
> a new IP.
>
...IP changes stuff snipped...
>
> So, I guess I miss the point of using sendmail if I'm not using a static
> IP on my own domain. Please edumacate me on this, if you will.
For outbound SMTP, won't matter if your IP is changing. Sendmail is
first and foremost a Mail Transfer Agent. His job is getting mail
from place to place (more on this later).
Now... on the receiving end, you do have a point. Certainly the
Mail Exchanger record would have to be manipulated dynamically
at the holder of zone (presumably, you have an outside name server that
has a static IP which manages your domain's zone records). If the
manager of your records does not have a way to easily manipulate
the MX record quickly, you're probably not going to find an easy
way to do this "directly".
A more common approach, one that most of us with broadband use (since
most of us have a dynamic IP), is to receive mail via pop/imap from an
ISP. You can use fetchmail if you like the "feeling" of direct delivery
(there are other options as well). Thus all of your mail sits at the
ISP until you pull it (e.g. using fetchmail).
Now back to sending with a local sendmail...
If your machine can see a name server (could be running a local DNS or
using the ISP's supplied one.. or any of the millions out there!), then
you can send mail out using a local sendmail from your localhost.
You may want to experiement with masquerading (sendmail masquerade)
your domain (DM<your-domain>) if your version of sendmail supports that.
If your sendmail supports the genericstable, you may have to add
entries that manipulate your outboound address (so they look like
they come from <your-domain>). For example if your email address
from your ISP is blah-blah at yourdomain.com, and your local account
on your box is henry, you might have a genericstable entry of
henry blah-blah at yourdomain.com
So that when you send mail, the mail will be from blah-blah at ...
instead of henry at whatever.
I know this isn't every detail... but it might get you pointed in
the right direction. There are lots of variables... so what
I've said here may be a bit too generic.
<note>
If all this seems crazy to you, realize there is a reason why
many people are moving away from sendmail in the Linux realm...
and it isn't because of the historical security issues with
sendmail. If you have an older version of sendmail w/o
masquerading support and/or genericstable, you'll have to write
some sendmail rules ... yuk.... even then I'm not sure if you'll
be successful.
</note>
More information about the Discuss
mailing list