sendmail config help

Matthew Seaman m.seaman at
Tue Jan 5 11:29:48 UTC 2016

On 2016/01/05 11:05, Anton Shterenlikht wrote:
> The best I can get is:
> 553 5.3.5 config error: mail loops back to me (MX problem?)
> 554 5.3.5 Local configuration error

This indicates that although the MX records in the DNS point to your
machine to handle the e-mail for, the machine's sendmail
configuration doesn't state that it should handle the final delivery for messages.

You need to add to the file /etc/mail/local-host-names and then
bounce sendmail.  What this does is add to sendmail's class w --
the list of addresses which this instance of sendmail 'owns.'

> My questions:
> 1. Do I even need MX for this simple setup?
> Some sources suggest that MX is need when
> multiple domains are involved. Here I have
> only a single domain on a single server,
> with a single IP. Do I still need MX?

No, you can get away without an MX record, but on the whole it's better
to have one.  Otherwise you'll need to add an A record at the zone apex
for pointing at your mail server.

Personally, I'd name the mail server as '' and use an MX
record to direct the mail to it.  That's pretty standard and it will
help avoid your messages getting classed as spam.

> 2. Is virtual hosting relevant?
>    I followed this guide:
> and set up /etc/mail/virtusertable as:
> joe at	joe
> and made a map of it with
> makemap hash virtusertable < virtusertable
> Is virtusertable relevant at all?

virtusertable is strictly an optional extra here.  Essentially it exists
so that you can receive email for an address like 'fred.bloggs at'
and map that only the local unix account name 'fred' for delivery.
There are a bunch of other things you can do with virtusertable -- it is
most useful when your sendmail instance is handling e-mail for a number
of different domains[*], and you can use it to implement a 'catch-all'
address, but the name mapping stuff is probably what it's most used for.

See genericstable for the way to do the converse of that: send out using
a full name rather than a unix userid.

You shouldn't need any entries in relay-domains with this setup: if your
machine is the final delivery point for email to ... at then by
definition you aren't relaying that anywhere else.



[*] Although my advice here is 'if you want to handle anything more
complicated than a low traffic server for a single domain then ditch
sendmail and use postfix instead'

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 972 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the freebsd-questions mailing list