What is qmail remote




















It is the user's responsibility to avoid generating illegal messages. Each report is terminated by a 0 byte. Each report begins with a single letter: r Recipient report: acceptance. K Message report: success. Z Message report: temporary failure. D Message report: permanent failure. After this letter comes a human-readable description of what happened. The following reports are provided: K no supported AUTH method found, continuing without authentication. Z Connected to host but unable to base64encode plain.

Z Connected to host but authentication was rejected plain. Z Connected to host but unable to base64encode user. Z Connected to host but authentication was rejected username. Z Connected to host but unable to base64encode pass.

The recipient reports will always be printed in the same order as qmail- remote 's recip arguments. Note that in failure cases there may be fewer recipient reports than recip arguments. Z Can't load X. K Can't load X. The recipient reports will always be printed in the same order as qmail-remote 's recip arguments. Note that in failure cases there may be fewer recipient reports than recip arguments.

Default: me , if that is supplied; otherwise qmail-remote refuses to run. Each route has the form domain : relay , without any extra spaces. If domain matches host , qmail-remote will connect to relay , as if host had relay as its only MX. The qmail system does not protect you if you create an artificial mail loop between machines. However, you are always safe using smtproutes if you do not accept mail from the network.

All local domains are equivalent; if foo. For example, the locals file on my mail server tom. Note that local domains are not the same as virtual domains, nor are they the same as the SMTP recipient domains listed in rcpthosts. Default: none; this file is required.

The name of the current host. This should be the same as what the hostname command returns. Default: none. More domains for which this host accepts SMTP mail. The contents of this file are compiled into morercpthosts. The SMTP daemon consults the cdb file after it checks rcpthosts. If a host accepts mail for more than about 50 domains, Dan suggests that you put the 50 busiest into rcpthosts and the rest into morercpthosts. In the past 20 years, most of the connectivity problems that require source routing have been solved, and for the ones that remain there are better tools such as smtproutes described later , so the percent hack is obsolete.

If for some reason you absolutely need it you have an ancient mission-critical program for which all the source code has been lost that sends mail using the percent hack, perhaps any addresses in domains listed in percenthack are scanned for percent signs and rewritten.

In the previous example, out. If a domain listed in percenthack is also listed in rcpthosts , your system is an open relay, because spammers can send mail anywhere through your system by putting the actual target address in percent form inside an address in the listed domain. Yes, spammers actually do so. If the domain part of an address in an injected message ends with a plus sign, the contents of plusdomain are appended to the end. In environments with many subdomains of a single main domain, say east.

No longer widely used. A list of servers to which messages can be queued using QMQP. See Chapter Default: seconds a week. How long to keep trying to deliver a message. More precisely, if qmail tries to send a message and the attempt fails with a temporary error, the error is treated as permanent if the message is older than queuelifetime , in which case the message bounces.

Default: every domain. The list of domains for which this host accepts SMTP mail. It is extremely important that this file exist. When another hosts connects via SMTP to send you mail, the greeting string to send.

Explicit routes to use to deliver outgoing mail, overriding MX data. Each line is of one of these forms:. The domain can use wildcards; if it starts with a dot, it matches any target domain that ends with that domain.

If relay is empty, qmail uses the standard MX lookup, letting you override a broader wildcard or smarthost route. Most systems can get by without smtproutes , but there are three situations where it can come in handy. The second is to temporarily patch around broken MX records or mail relays. The third is to route mail for private domains within your network.

Default: 60 seconds. How long to wait for a remote server to accept the initial connection to send mail. Default: seconds. Once a remote server is connected, how long to wait for each response before giving up. The default of 20 minutes is extremely conservative, and can lead to all of your remote sending slots being tied up while waiting for somnolent remote hosts to time out. Unless you communicate with extraordinarily slow and overloaded remote servers, you can drop it to a minute.

How long qmail-smtpd waits for each response from a remote client before timing out and giving up. As with timeoutremote , you can decrease this to a minute unless you have some really slow remote clients. The list of virtual users and domains for which this system receives mail. The virtual domain scheme works by taking the mailbox in the virtual domain, prepending a string and a hyphen to create a local address, and redelivering the mail to the local address.

The virtual domain file lists the prepend string to use for each virtual user and domain. Form 1 controls mail to a specific address. Forms 2 and 3 control mail to any address in a domain or in subdomains of a domain, respectively.

Form 4 , with an empty prepend, is used to create an exception to a domain that would otherwise be handled by a line of form 3 or 5 and means to handle the domain normally, not as a virtual domain. Form 5 is a catchall and controls all domains not listed in locals or elsewhere in virtualdomains.

If a domain erroneously appears both in locals and virtualdomains , the listing in locals takes precedence. Qmail handles this in a simple, elegant way with the alias pseudo-user. This makes any address not otherwise handled in effect a subaddress of alias, so you can handle addresses by putting. Since qmail handles deliveries using the. Also create. The most common thing to put in that file is a line to run the fastforward program see the next section to take delivery instructions from a file of addresses, roughly as sendmail does.

You can also implement other default delivery rules. It appears wrapped here, but it has to be on one long line in the file. This says that if an address contains a hyphen, strip off the hyphen and everything after it and redeliver it. Otherwise bounce the message. The bouncesaying command lets you provide your own failure message, but a simple exit would do the trick as well, telling qmail to bounce. This section describes fastforward Version 0. The central program in the fastforward package is fastforward itself.

The CDB file can refer to mailing list files of addresses; the difference is that the CDB file contains addresses and delivery instructions, while a mailing list file just contains a list of addresses and other mailing list files, for use within a delivery instruction. Mailing list files can be created by newinclude , which reads input containing a list of addresses in a format similar to the one sendmail uses for :include: files, or by setmaillist , which reads input in a more flexible format.

Mailing list files created by either program have the same format, so you can use the input format that is more convenient. Compiled mailing list files have the extension. Or you can also combine it with other default rules. For example, to use fastforward and then redeliver mail to subaddresses to the base address of the subaddress:. In the absence of -p , fastforward exits 0 if it forwards the message and otherwise to bounce the mail. The most common instruction forwards an address to one or more other addresses:.

Mail to ted is forwarded to edward, edwin, and eduardo. This form is useful for role accounts that are handled by several people or tiny mailing lists that change rarely. If there are multiple names in localhosts for this host, distinguish addresses by putting the domain of the address, and forward all addresses in a domain by using domain.

This feature is more often used to handle addresses in virtual domains; see Chapter As a concession to sendmail compatibility, addresses can have comments and can be quoted as they are in To: and From: lines.

Any line that starts with is a comment, and any line can be continued by starting continuation lines with whitespace:. Any address that starts with a vertical bar is treated as a command for program delivery. If the command contains whitespace or at-signs, it has to be quoted. To run a program as another user, it has to be called from a. The program is run as:.

Any address that starts with :include: refers to the contents of a mailing list file. If there is an entry for both listname and owner-listname, any forwarded mail to listname has its envelope sender changed to owner-listname so bounces will go back to the owner of the list.

This means that, in the previous example, the addresses on the list belong to user fred, who can update the list file and rerun newinclude as needed. Mailing list files can refer to other mailing list files, but for security reasons and unlike sendmail , they cannot contain program deliveries.

This is not much of a problem in practice. Skip to main content. Start your free trial. Chapter 4. Getting Comfortable with Qmail. Mailboxes, Local Delivery, and Logging.

Mailbox Format. Local Delivery. An Excursion into Daemon Management. Starting a Daemon. Setting Up the Qmail Configuration Files. Starting and Stopping Qmail. Choosing a Startup File. Example Stopping Qmail. Incoming Mail. Configuration Files.



0コメント

  • 1000 / 1000