|
Exchange
- Dequeue
What if my ISP
uses sendmail?
- ETRN
- rsh
- rexec
- finger
- /etc/aliases
- procmail
The sendmail program in its many
variants is by far the most popular mailer in use at ISP sites.
The latest versions of sendmail (version 8.8.x and above)
implement the RFC 1985 ETRN command for initiating queued mail
transmission. Most earlier versions of sendmail will initiate a
dequeue of stored mail when they are executed with the parameter
"-qR <yourdomain.com>" (i.e. /etc/sendmail -qR
swinc.com). The trick then becomes figuring out how to execute
this command when the Exchange server makes a connection to the
ISP. There are several methods to accomplish this with varying
logistical impacts to you and the ISP:
ETRN
| Description |
RFC 1985 describes an
extension to the SMTP protocol. The ETRN command is
defined to cause mail for a particular domain(s) to
dequeue. |
| Usage |
ETRN [@|#]domain |
| Parameters |
|
| @ |
Specifies the domain
and all subdomains should be dequeued |
| # |
Specifies the mail
queue should be dequeued (this is seldom used) |
| domain |
Specifies the domain to
dequeue |
| Requirements |
ISP must have installed
sendmail version 8.8.x or higher.
Since ETRN is simply
another token that the SMTP protocol can pass, some method
must be designed to connect to the host on the SMTP port
(TCP 25), send the ETRN command, then quit.
ETRN is supported
natively in Exchange 5.0 SP1 and later. There
is a screenshot
located under
"What about Exchange?"
Note:
The host that ETRN is sent to is the "Forward all
Mail to:" host so you MUST configure your server to
use this and not DNS for delivery. The domain
that ETRN dequeues comes from the Site Addressing page by
default. If you want to change this or add
more than one, you can do so.
For earlier versions of
Exchange and special cases, we have written a very simple
NT command line utility to do this. You can download
dequeue.exe (Intel
108Kb,
Alpha
220Kb). The parameters are described in the
program help - accessible by running "dequeue
-?".
|
| Example |
dequeue -m oak.zilker.net
-d swinc.com -q |
rsh
| Description |
Runs commands on remote
hosts running the RSH service |
| Usage |
RSH host [-l username]
[-n] command |
| Parameters |
|
| host |
Specifies the remote host
on which to run command |
| -l username |
Specifies the user name to
use on the remote host. If omitted, the logged on user
name is used |
| -n |
Redirects the input of RSH
to NULL |
| command |
Specifies the command to
run |
| Requirements |
ISP must support execution
of user commands on the mail server.
User account on the ISP
system must contain .rhosts file to allow execution. Or,
the ISP must have a /etc/hosts.equiv file configured to
allow you to execute "r" commands.
|
| Example |
RSH oak.zilker.net -l
awebb -n "/usr/lib/sendmail -qRswinc.com" |
rexec
| Description |
Runs commands on remote
hosts running the REXEC service. Rexec authenticates the
user name on the remote host before executing the
specified command. |
| Usage |
REXEC host [-l username]
[-n] command |
| Parameters |
|
| host |
Specifies the remote host
on which to run command |
| -l username |
Specifies the user name to
use on the remote host |
| -n |
Redirects the input of
REXEC to NULL |
| command |
Specifies the command to
run |
| Requirements |
ISP must support execution
of user commands on the mail server
User account on the ISP
system must contain .rhosts file to allow execution. Or,
the ISP must have a /etc/hosts.equiv file configured to
allow you to execute "r" commands.
|
| Example |
REXEC oak.zilker.net -l
awebb -n "/usr/lib/sendmail -qRswinc.com" |
finger
| Description |
Displays information about
a user on a specified system running the Finger service.
Output varies based on the remote system |
| Usage |
FINGER [-l] [user]@host
[...] |
| Parameters |
|
| -l |
Displays information in
long list format |
| domain |
Specifies the domain you
want to dequeue mail for. E.G. swinc.com |
| @host |
Specifies the server on
the remote system whose users you want information about |
| Requirements |
ISP must have modified
their finger daemon to understand the domain information
and launch the necessary sendmail command. http://www.wizzy.com/
wizzy/mail
is a good reference on how to set
this up. |
| Example |
finger swinc.com@oak.zilker.net |
/etc/aliases
| Description |
This is a file on the ISP
mail host that can be used to redirect the delivery of
mail for a specific account. |
| Usage |
domain
|"/path/sendmail
-qRdomain" |
|
| Parameters |
|
| domain |
Specifies the domain you
want to dequeue mail for. E.G. swinc.com |
| path |
Specifies the path to the
sendmail command on the ISP system |
| Requirements |
ISP must have modified
their /etc/aliases file to execute the sendmail command
when mail is received for <domain>@ISP.com. |
| Example |
/etc/aliases file
contains:
swinc.com
|"/usr/lib/sendmail
-qRswinc.com"
Exchange server uses blat
or other utility to send a mail message to swinc.com@oak.zilker.net
|
procmail
| Description |
Procmail is a powerful
mail processor that runs on your ISP's host and can be
used to process your mail messages either as they arrive
or after they are in a mail folder. |
| Usage |
|
| Parameters |
<none> |
| Requirements |
ISP must have installed
and configured procmail. The latest build can be ftp'd
from
ftp://ftp.informatik.
rwth-aachen.de/
pub/
packages/
procmail/
procmail.tar.gz.
There is a procmail
faq available. This provides detailed instructions on how to use the
product - too lengthy to repeat here.
The .procmailrc file is
used to define the mail processing rules. You could use a
subject of "Sendmail -qRdomain.com" to trigger
the sendmail command.
You must have a
separately accessible mail account on the ISP system. For
example, we
have an account awebb@myisp.net that can
receive mail. Mail to here is first examined by procmail
for specific subject items, then either acted upon, or
forwarded to awebb@mycompany.com. |
| Example |
An example of a .procmailrc
file:
PATH=/bin:/usr/bin:/usr/local/bin
:0
* ^Subject:.Sendmail -qRswinc.com
| $SENDMAIL -qRswinc.com
:0
* ^From.*
! user@domain.com
We would have Exchange
server use blat or some similar utility to send a mail
message to awebb@myisp.net with a subject of "Sendmail
-qRswinc.com". |
|