Here are some frequently asked questions and answers. These have been migrated from the FAQ.
A: You will probably find that the host is actually in a different domain; for example, if you are in foo.bar.edu and you wish to reach a host called mumble in the bar.edu domain, you will have to refer to it by the fully-qualified domain name, mumble.bar.edu, instead of just mumble.
Traditionally, this was allowed by BSD BIND resolvers. However the current version of BIND that ships with FreeBSD no longer provides default abbreviations for non-fully qualified domain names other than the domain you are in. So an unqualified host mumble must either be found as mumble.foo.bar.edu, or it will be searched for in the root domain.
This is different from the previous behavior, where the search continued across mumble.bar.edu, and mumble.edu. Have a look at RFC 1535 for why this was considered bad practice, or even a security hole.
As a good workaround, you can place the line:
search foo.bar.edu bar.eduinstead of the previous:
domain foo.bar.eduinto your /etc/resolv.conf. However, make sure that the search order does not go beyond the ``boundary between local and public administration'', as RFC 1535 calls it.
A: This is answered in the sendmail FAQ as follows:
* I am getting ``Local configuration error'' messages, such as: 553 relay.domain.net config error: mail loops back to myself 554 <email@example.com>... Local configuration error How can I solve this problem? You have asked mail to the domain (e.g., domain.net) to be forwarded to a specific host (in this case, relay.domain.net) by using an MX record, but the relay machine does not recognize itself as domain.net. Add domain.net to /etc/sendmail.cw (if you are using FEATURE(use_cw_file)) or add ``Cw domain.net'' to /etc/sendmail.cf.
The sendmail FAQ is in /usr/src/usr.sbin/sendmail and is recommended reading if you want to do any ``tweaking'' of your mail setup.
A: You want to connect a FreeBSD box on a lan, to the Internet. The FreeBSD box will be a mail gateway for the lan. The PPP connection is non-dedicated.
There are at least two ways to do this.
The other is to use UUCP.
The key is to get a Internet site to provide secondary MX service for your domain. For example:
bigco.com. MX 10 bigco.com. MX 20 smalliap.com.
Only one host should be specified as the final recipient (add Cw bigco.com in /etc/sendmail.cf on bigco.com).
When the senders' sendmail is trying to deliver the mail it will try to connect to you over the modem link. It will most likely time out because you are not online. sendmail will automatically deliver it to the secondary MX site, i.e., your Internet provider. The secondary MX site will try every (sendmail_flags = ``-bd -q15m'' in /etc/rc.conf ) 15 minutes to connect to your host to deliver the mail to the primary MX site.
You might want to use something like this as a login script.
#!/bin/sh # Put me in /usr/local/bin/pppbigco ( sleep 60 ; /usr/sbin/sendmail -q ) & /usr/sbin/ppp -direct pppbigco
If you are going to create a separate login script for a user you could use sendmail -qRbigco.com instead in the script above. This will force all mail in your queue for bigco.com to be processed immediately.
A further refinement of the situation is as follows.
Message stolen from the FreeBSD Internet service provider's mailing list <freebsd-isp@FreeBSD.org>.
> we provide the secondary mx for a customer. The customer connects to > our services several times a day automatically to get the mails to > his primary mx (We do not call his site when a mail for his domains > arrived). Our sendmail sends the mailqueue every 30 minutes. At the > moment he has to stay 30 minutes online to be sure that all mail is > gone to the primary mx. > > Is there a command that would initiate sendmail to send all the mails > now? The user has not root-privileges on our machine of course. In the ``privacy flags'' section of sendmail.cf, there is a definition Opgoaway,restrictqrun Remove restrictqrun to allow non-root users to start the queue processing. You might also like to rearrange the MXs. We are the 1st MX for our customers like this, and we have defined: # If we are the best MX for a host, try directly instead of generating # local config error. OwTrue That way a remote site will deliver straight to you, without trying the customer connection. You then send to your customer. Only works for ``hosts'', so you need to get your customer to name their mail machine ``customer.com'' as well as ``hostname.customer.com'' in the DNS. Just put an A record in the DNS for ``customer.com''.