?
Solved

making sendmail work with fetchmail

Posted on 1997-12-19
2
Medium Priority
?
269 Views
Last Modified: 2010-04-21
Here is the situation:

Our SGI workstation is using "ppp" to establish connection with our account "peter" at our ISP, and all our networking to/from the Internet is OK. Our PPP Client is assigned IP addresses DUNAMICALLY by the ISP's PPP Server.

Outgoing mail works fine.

Incoming mail (any mail to our domainname "our.domain.com") is successfully spooled by our ISP into "peter@isp.com".
I use "fetchmail" to get the mail from the ISP's POP3 server, and I distribute MANUALLY (and painfully) the mail to the appropriate recipients (peter@our.domain.com, bill@our.domain.com, etc).

I would like to configure "sendmail" to pick-up and distribute the mail, as described above.

ANY SUGGESTIONS???
0
Comment
Question by:petertz
2 Comments
 

Accepted Solution

by:
dgraves earned 800 total points
ID: 2008442
From your question, I am surmising that your connection is not a "dedicated" one.  That is, you are disconnecting at times and only dialing in at other times.

Unfortunately, sendmail does not like this.  

There is, however, an answer.  As a matter of fact, there are two answers.  The first is not a terribly simple one, but it's been done multiple times and does work.  The configurations at your ISP will probably cost you more money too.  The second is much simpler, probably won't cost you any more, but will be annoying to set up , as are all unix operations.

What you need to do is to have your ISP change your configuration.  Currently, they are dumping all the mail headed to your domain into one mailbox.  This is what you need to do
instead:

First, your ISP must remove the rule in it's sendmail system that dumps all the mail in your domain to a standard unix mailbox.  This will force the mail to "queue".... I'll explain the details:

Have your ISP add 2 DNS MX records under your domain.  The first must point to a STATIC IP that your ISP must assign to your account.  The 2nd MX record must point to them.  The 2nd MX record must be set to have a higher "cost" than the first.  Your ISP will know how to create these records.

Now:  When mail comes in that if bound for your domain -- the first place it'll try is your computer.  If you're online -- boom-- your machine sees it, receives it, and distributes it to a standard mailbox.  If you're OFFLINE, then the 2nd MX record takes over and has the mail "queue" in the mail queue on your ISP's server.  Your ISP will now try , every hour , for 5 days, to get the mail to your server.

This is the last part of the equation.  You have to now tell your  ISP's sendmail when you're online so that you can "dequeue" the mail.  Your ISP will have to be running a later version of sendmail (which he probably is).  All you do is telnet to port 25 of your ISP's server, issue a command -- and this will dequeue the mail to your sendmail.   Typically these commands are in a script that runs whenever you log in.

This is a general overview of the problem and the solution.  There are specifics regarding the commands, the mx records, etc that I haven't gone into detail with.

This solution gets used all the time by people who have Microsoft Exchange servers but aren't connected all the time.

--------------------
Your second solution is simply to use UUCP.  This is built into unix.  Your ISP will set up a UUCP account, and you will set up the same -- typically there's a directory called /etc/uucp.  You'll set up a new "system" in the /etc/uucp/Systems, and you'll
configure things like phone number, times to dial in, etc.

Then, your ISP will reconfigure your account to dump all mail from your domain to a UUCP account.  Badda Bing, Badda Boom -- you're done.
0
 

Author Comment

by:petertz
ID: 2008443
I am impressed with the completeness of the answer, maybe
because this is the first time I post a question in this
group, nevertheless I am impressed.

Thanks

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question