# Sendmail Ignoring virtusertable



## rtwingfield (May 11, 2015)

Following upgrade to *FreeBSD v10.1*, `sendmail` seems to ignore the /etc/mail/virtusertable.  I expected that by moving my previous working configuration files to the v10.1 platform, all would be functional as previously installed.  When I try to send an eMail document to my alias, Ron.Wingfield, the system fails with the following message:

```
[INDENT]An error occurred while sending mail. The mail server responded:  5.1.1 <Ron.Wingfield@archaxis.net>... User unknown. Please check the message recipient Ron.Wingfield@archaxis.net and try again.[/INDENT]
```
​To my knowledge, I have run the requisite `makes` and `restarts`, etc.  Nothing seems to work.  I can only send-from and receive-to my actual FreeBSD user id, rtwingfield.

There are several configuration file relationships that I do not understand.

In the base distribution there is no sendmail.mc file; however, there is a sendmail.cf that contains the following admonishment:

```
DO NOT EDIT THIS FILE!  Only edit the source .mc file.
```
 . . .so where/what is the "source" file?

Also, I don't understand why there are files such as freebsd.cf and freebsd.mc.  You will not find these files mentioned in the following publication:

*sendmail, 4th Edition *

By Bryan Costales, Claus Assmann, George Jansen, Gregory Neil Shapiro
Publisher: O'Reilly Media
Final Release Date: October 2007
Pages: 1312​
Regardless, I installed the missing file from a previous _working_ version of the sendmail.mc file, ran `make`, `service sendmail restart`, etc., yet no joy.

There seems to be a break in the alias scenario.  Can anyone suggest what I may be missing here?


----------



## wblock@ (May 11, 2015)

The files are in /etc/mail.  The first time `make` is run, it creates a file named _hostname_.mc.  Then you can edit that file, then finally build it and install it with `make all install restart`.


----------



## rtwingfield (May 11, 2015)

wblock@ said:


> The files are in /etc/mail.  The first time `make` is run, it creates a file named _hostname_.mc.  Then you can edit that file, then finally build it and install it with `make all install restart`.


Hello Warren, thanks for the quick reply.

Yes, I know that the files are in /etc/mail.  What I'm unclear on is (per your suggestion) the need to run `make all install restart`.  This sounds like an install from the ports?  Since sendmail is included in the base, why is this necessary?  Sendmail is running and I can send and receive eMail as long as my FreeBSD userid, rtwingfield, is used.  Also, I did not/do not have a hostname.mc file in my old installation; however, there is a local-host-names file that I installed from the earlier system.

Just for chuckles, I ran a `make all`, but it does not create a hostname.mc file.

*** EDIT *** What I now understand is that the created file is _your-server's-hostname_.mc (as per the rc.conf file) . . .not literally "hostname"

The result of `make install` was:

```
install -m 444 archaxis.net.cf /etc/mail/sendmail.cf
install -m 444 archaxis.net.submit.cf /etc/mail/submit.cf
```
​Back to the previous diagnostic,

```
[INDENT]An error occurred while sending mail. The mail server responded:  5.1.1 <Ron.Wingfield@archaxis.net>... User unknown. Please check the message recipient Ron.Wingfield@archaxis.net and try again.[/INDENT]
```
​The system should resolve my aliased name, Ron.Wingfield, and point to my user name, rtwingfield, but instead is trying to validate my alias as a user that does not exist.

FYI, here is a sample from the /etc/virtusertable file (that has always worked before):


```
root@Archaxis.net  root
rtwingfield@Archaxis.net  rtwingfield
Ron.Wingfield@Archaxis.net  rtwingfield
Ron.Wingfield@ClassXBoats.com  rtwingfield
rjohnson@Archaxis.net  rtwingfield@archaxis.net
Robert.Johnson@Archaxis.net  rtwingfield@archaxis.net
@Archaxis.net  rtwingfield
```

. . .for some reason, all aliased recipients are reported as "user unknown".


----------



## drhowarddrfine (May 11, 2015)

freebsd.mc and freebsd.cf are custom files for freebsd FreeBSD and override the /mail/sendmail ones. If you are using the default install of sendmail, and then re-install it, maybe even update it(?), some of the files in /etc/mail get reset to the default. That is why it's better to install sendmail from ports where that won't happen.

Sorry. I may have read your original question too quickly but I'm getting called away.


----------



## rtwingfield (May 11, 2015)

drhowarddrfine said:


> freebsd.mc and freebsd.cf are custom files for freebsd FreeBSD and override the /mail/sendmail ones. If you are using the default install of sendmail, and then re-install it, maybe even update it(?), some of the files in /etc/mail get reset to the default. That is why it's better to install sendmail from ports where that won't happen.
> 
> Sorry. I may have read your original question too quickly but I'm getting called away.


A reinstall from ports will not be a problem, but may take some time.  Will do.


----------



## rtwingfield (May 11, 2015)

. . .well, I just ran `make install` for *sendmail*.  It created the /usr/ports/mail/sendmail/work files but did not create the /etc/mail system.  What happened . . .where did the (should have been) installed files go?


----------



## drhowarddrfine (May 11, 2015)

Re-installing was not what I meant. What I thought you said was you re-installed and the files changed. However, if you still have the "work" file in mail/sendmail, that means the installation didn't complete!

In that same location, do `make clean` and then install again. Watch to make sure it says the installation says it is complete.


----------



## wblock@ (May 12, 2015)

rtwingfield said:


> What I'm unclear on is (per your suggestion) the need to run  make all install restart. This sounds like an install from the ports?



It is not.  make(1) can be used for many things.  Here it is used to build configuration files for the Sendmail included in base.  The install target installs the built files, and restart restarts Sendmail.

Confusing this with a ports install will only complicate the process.


----------



## rtwingfield (May 12, 2015)

drhowarddrfine said:


> Reinstalling was not what I meant. What I thought you said was you reinstalled and the files changed. However, if you still have the "work" file in /mail/sendmail, that means the installation didn't complete!
> 
> In that same location, do `make clean` and then install again. Watch to make sure it says the installation says it is complete.



I do understand the steps regarding, `make`, `make install`, and `make clean`.  I rarely ever run `make install clean` in one fell swoop.  I sometimes leave the work files around for some time.  Actually, I had considered starting with a clean page and installing *sendmail* from the ports.   And BTW, I moved /etc/mail to /etc/mail.bu; therefore, I still have the original files plus modifications based on my previous working `sendmail` installation.

Just for the sake of debate, I'll remove the work files and run `make deinstall`, `make`, followed by `make install`. 

. . .(_some time passes_), and I just completed the "reinstall" from ports, and the system did *not* create /etc/mail.

I'm beginning to think that there is something seriously broken in this port, i.e., the Makefile.

And another thing, with /etc/mail moved to /etc/mail.bu, and `sendmail`stopped, I was still receiving eMail ???

. . .(_some more time passes_), and I copied /etc/mail.bu to /etc/mail -- in other words, I put it back.  Then I ran `make deinstall` once again followed by `make` and `make install` . . .all the time watching the progress messages, etc.

Yet again, the /etc/mail files were not created.

. . .need to respond to wblock's comments.


----------



## rtwingfield (May 12, 2015)

wblock@ said:


> It is not.  make(1) can be used for many things.  Here it is used to build configuration files for the Sendmail included in base.  The install target installs the built files, and restart restarts Sendmail.
> 
> Confusing this with a ports install will only complicate the process.


I would like to install sendmail with a "clean page" from the ports . . .as if it were not installed.  I'm wary of the version/package as installed with the FreeBSD v10.1 RELEASE base.  The *Handbook* only covers the subject with one page.  I would like to be able to follow the *O'Reilly* book and not have to read between the lines to understand why there are files named freebsd.this and freebsd.that.

Yes, I do know that `make` can be run from within the /etc/mail directory to recreate or otherwise update the various configuration files, etc.  Within /etc/mail, execution of `make` points to the /etc/mail/Makefile (BTW, I've run sendmail since probably 2002?).

Again, I don't have any emotional reservation attempting to install sendmail from the ports.  Problem is, the /usr/ports/mail/sendmail "`make`" fails to create the /etc/mail file system.

This is a very simplified, abbreviated description of the way I understand the `make` system:

Given five objects (either source code, executable scripts or binaries, etc.), a b c d e, if any of them are nonexistent or touched, then the top-level make system will attempt to create or recreate the object.​. . .at least that's the way I've always coded Makefiles.  So, I'm `cd'ing` to /usr/ports/mail/sendmail, executing `make`, followed by `make install`, and the files, /etc/mail are not created.

Very frustrating!

I think that I will restore the version that I configured from the FreeBSD v10.1 RELEASE base and try to determine what is wrong with the aliasing scenario.

Sincerely, thanks to all for your suggestions.


----------



## wblock@ (May 12, 2015)

Applications built from ports generally expect configuration files in /usr/local/.  In this case, I'd expect them to be in /usr/local/etc/mail.  But FreeBSD's base version of Sendmail is usually very up to date, so I don't bother running the ports version.


----------



## rtwingfield (May 12, 2015)

wblock@ said:


> Applications built from ports generally expect configuration files in /usr/local/.  In this case, I'd expect them to be in /usr/local/etc/mail.  But FreeBSD's base version of Sendmail is usually very up to date, so I don't bother running the ports version.


I would have to concur, but something is amiss, I suspect, in my configuration.  Some little nuance in the newer version must have changed.  I'll keep looking and when and if I find a solution, then I'll report.


----------



## rtwingfield (May 20, 2015)

I cannot understand why `sendmail` is ignoring the virtusertable.db file.  This is the content of the database:


```
root@Archaxis.net  root
rtwingfield@Archaxis.net  rtwingfield
ron.wingfield@Archaxis.net  rtwingfield
Ron.Wingfield@ClassXBoats.com  rtwingfield
rjohnson@Archaxis.net  rtwingfield
Robert.Johnson@Archaxis.net  rtwingfield
@Archaxis.net  rtwingfield
```

I have carefully remade the suite of objects, but when I use a recipient address as indicated in the snip below, the system seems to simply ignore "[FONT=Courier New]rjohnson[/FONT]@archaxis.net"






The system should examine the virtusertable.db and match the key for the recipient but apparently that is not happening.  (This previously worked with * sendmail v8.12.8p1*.)

BTW, this is * sendmail v8.14.9* as distributed with FreeBSD v10.1-RELEASE.  (I did NOT pursue installing from the ports, but rather modified the configuration of the dist. as required.)

Has anyone encountered this problem?  What to do?

Perhaps I should ask this question regarding this caveat form the comments in the virtusertable source code:  


```
# Map one or all usernames at a source hostname to a specific (or the same)
# username at another target hostname.  Remember to add the source hostname
# to /etc/mail/local-host-names so that sendmail will accept mail for the
# source hostname.
```

. . .what is the "[FONT=Courier New]source hostname[/FONT]"?  Is this _source_ the originator of the inbound document?  If so, then how would you know from what source it originated?  It could be from anywhere.


----------



## drhowarddrfine (May 20, 2015)

Are you rebuilding the table after you edit it? Easiest way is `make all` (cause I can't remember the command to just build that).


----------



## rtwingfield (May 21, 2015)

Yes, I am using the makefile system as recommended by Warren B.


wblock@ said:


> The files are in /etc/mail. The first time  make is run, it creates a file named _hostname_.mc. Then you can edit that file, then finally build it and install it with  `make all install restart`.



In the past, I have used `makemap btree virtusertable.db < virtusertable`
but I have learned from the code in /etc/mail/freebsd.mc, that the database is hashed as per
(it's magic):

```
FEATURE(virtusertable, `hash -o /etc/mail/virtusertable')
```
The result is that the resultant object from the `hash` is larger than that from the `makemap btree` scenario.  `[SIZE=2](. . .don't know what the significance is, but I do know that a btree is condusive to a binary search, which is fast)[/SIZE]` Sort of troubling, but I've chosen to run with the embedded `hash` that is invoked (_somewhere_) in the `make` process.

The make file seems to be aware of _anything_ that is touched and will remake whatever has changed . . .as it should.  Now that I've got my head wrapped around the `make` scenario, it is a fairly automated process.  Unfortunately, the virtusertable.db seems to be ignored as per my (flawed?) configuration.

This is/was the code in my previous working `sendmail` installation:


```
# /etc/mail/local-host-names
# Fri May 31 13:46:42 CDT 2002 -- rtwingfield
# When updated, sendmail(8) must be restarted!
# e.g., sendmail -bd -q15m

# Updated Tue Jun 02, 2009 -- rtwingfield

archaxis.net
ns1.archaxis.net
ns2.archaxis.net
ClassXBoats.com
SmithsAirport.com
```
. . .so this is why I'm puzzled that the new version seems to be broken.


----------



## wblock@ (May 21, 2015)

That is not a virtusertable.  Looking at /etc/mail/Makefile shows that the table is built along with other "maps" when `make maps` is given.  Note that is not a "makemaps" command, but make(1) followed by a separate maps target.


----------



## rtwingfield (May 21, 2015)

wblock@ said:


> That is not a virtusertable.  Looking at /etc/mail/Makefile shows that the table is built along with other "maps" when `make maps` is given.  Note that is not a "makemaps" command, but make(1) followed by a separate maps target.





wblock@ said:


> That is not a virtusertable.


 . . .are you thinking that the code displayed in my previous post was presented as the virtusertable?  Look at the comment in the code, it is from the /etc/mail/local-host-names (. . .thought that would be obvious.)

This is the content of the virtusertable:

```
root@Archaxis.net  root
rtwingfield@Archaxis.net  rtwingfield
ron.wingfield@Archaxis.net  rtwingfield
Ron.Wingfield@ClassXBoats.com  rtwingfield
rjohnson@Archaxis.net  rtwingfield
Robert.Johnson@Archaxis.net  rtwingfield
@Archaxis.net  rtwingfield
```
. . .and it previously worked successfully with *sendmail v8.12.8p1*

Yes, the `makemap` command is old . . .from earlier versions and is what I used with the *sendmail v8.12.8p1* version . . .and as I mentioned, I am NOT using it with this *Sendmail v8.14.9* version.

For _chuckles and grins_, I just ran `make maps` and this is the results:

```
root@alpha:/etc/mail # make maps
root@alpha:/etc/mail #
```
Notice that nothing was _made_ because all objects are up-to-date . . . .not surprised because simply calling `make` will rattle through the entire makefile and remake whatever has been touch (or deleted, etc.).  This can be demonstrated by simply deleting or removing one of the .db databases and it will be recreated.

As evidence, I just _waxed_ the virtusertable.db (by moving it to virtusertable.bu ) and simply called `make` with the following results:

```
root@alpha:/etc/mail # make
/usr/sbin/makemap hash virtusertable.db < virtusertable
[INDENT]chmod 0640 virtusertable.db[/INDENT]
```
. . .so as you can see, it remade the virtusertable.db (. . .as it should.)​
Also note that the .bu and .db objects are the same size; therefore, assumed to be identical.

```
128 -rw-r-----  1 root  wheel  131072 May 20 16:46 virtusertable.bu
128 -rw-r-----  1 root  wheel  131072 May 20 20:58 virtusertable.db
```

I still don't think that when receiving inbound mail, that *sendmail* is examining the virtusertable.
Documentation states that 





> It is consulted after aliases but before mailertable.


This just doesn't appear to be happening.

**** EDIT **** . . .and it just occurred to me that perhaps the system is not ignoring the virtusertable.db, but rather not _seeing_ the local-host-names file.



**** EDIT **** . . .I just looked at the ports latest distinfo version of *sendmail* and it is *v8.15.1*.

```
SHA256 (sendmail.8.15.1.tar.gz) = ed1f9e0f2a1a58c9ff94950264a2fc186d6fd237bac66b175d79a2b89a950746
[INDENT]SIZE (sendmail.8.15.1.tar.gz) = 2186562[/INDENT]
```
​The version distributed with FreeBSD 10.1-RELEASE is *8.14.9*:

```
root@alpha:/usr/ports/mail/sendmail # sendmail -d0.4 -bv root
Version 8.14.9
 Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
  NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SCANF
  STARTTLS TCPWRAPPERS USERDB XDEBUG
Canonical name: alpha.archaxis.net
 UUCP nodename: alpha.archaxis.net
  a.k.a.: [66.138.104.73]
  a.k.a.: [66.138.104.76]
  a.k.a.: localhost.archaxis.net
  a.k.a.: [192.168.1.73]
  a.k.a.: [IPv6:::1]
  a.k.a.: [IPv6:fe80::1]
  a.k.a.: [127.0.0.1]
```
It has been suggested to deinstall and reinstall from the ports.  Could this help?


----------



## drhowarddrfine (May 21, 2015)

Are you restarting sendmail after you run `make`?


----------



## rtwingfield (May 21, 2015)

drhowarddrfine said:


> Are you restarting sendmail after you run `make`?



Yes sir.  For example, `make install restart`, `make restart`, or `service sendmail restart`.


----------



## usdmatt (May 21, 2015)

For a lot of posts this doesn't really seem to be getting anywhere. Firstly on a 10.1 system I don't think re-installing a slightly newer version of Sendmail from posts is really required. It should work perfectly with the version in base. Also I don't really like capitals in email configuration but I'll ignore that for the time being.

Firstly, you should have your domain name in /etc/mail/local-host-names. Without that, it will only accept email when the right hand side of the address matches your hostname.

/etc/mail/local-host-names

```
archaxis.net
```
Then, add the addresses to the virtusertable. Personally I recommend returning an error for the catch-all instead of accepting it, otherwise if someone spams everything@your-domain.com, you get all of them.

/etc/mail/virtusertable

```
@archaxis.net                       error:nouser User unknown
ron.wingfield@archaxis.net          rtwingfield
```
Rebuild the configuration files if needed

```
make install restart (inside /etc/mail)
```
Now, the next thing to do before going off to send test emails is actually check Sendmail to see what it's going to do with those email addresses. Run the following and post the output:

```
sendmail -bv ron.wingfield@archaxis.net
```
If it's actually working correctly, it should tell you that email address is delivered locally to user rtwingfield. If not, then something is screwed up somewhere. I'm assuming Sendmail is fairly standard in configuration otherwise, and you haven't messed with it too much?


----------



## rtwingfield (May 21, 2015)

My proven complement working for years in previous sendmail 8.12.8 version:/etc/mail/local-host-names

```
Archaxis.net
alpha.archaxis.net
#ns1.archaxis.net
#ns2.archaxis.net
ClassXBoats.com
SmithsAirport.com
```

My proven complement working for years in previous sendmail 8.12.8 version:
/etc/mail/virtusertable

```
root@Archaxis.net  root
rtwingfield@Archaxis.net  rtwingfield
ron.wingfield@Archaxis.net  rtwingfield
Ron.Wingfield@ClassXBoats.com  rtwingfield
rjohnson@Archaxis.net  rtwingfield
Robert.Johnson@Archaxis.net  rtwingfield
@Archaxis.net  rtwingfield
```

RE: 
	
	



```
@archaxis.net  rtwingfield
```
. . .just a test to see if any _alias_ is/are delivered.
​Remade the system . . .yet again:
`make install restart` (inside /etc/mail)
. . .have done this innumerable times.​Yet again . . .test per your suggestion, but for all cases in the local-hosts-names file: 
(All results flagged as deliverable.)


```
root@alpha:/etc/namedb # sendmail -bv ron.wingfield@archaxis.net
ron.wingfield@archaxis.net... deliverable: mailer local, user rtwingfield
root@alpha:/etc/namedb # sendmail -bv wingfield@archaxis.net
wingfield@archaxis.net... deliverable: mailer local, user rtwingfield
root@alpha:/etc/namedb # sendmail -bv Ron.Wingfield@ClassXBoats.com
Ron.Wingfield@ClassXBoats.com... deliverable: mailer local, user rtwingfield
root@alpha:/etc/namedb # sendmail -bv rjohnsom@archaxis.net
rjohnsom@archaxis.net... deliverable: mailer local, user rtwingfield
root@alpha:/etc/namedb # sendmail -bv Robert.Johnson@archaxis.net
Robert.Johnson@archaxis.net... deliverable: mailer local, user rtwingfield
```
​. . .also this:  (Mailer test also flagged as deliverable.)


```
root@alpha:/etc/namedb # sendmail -d0.4 -bv ron.wingfield@archaxis.net
Version 8.14.9
Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MILTER MIME7TO8 MIME8TO7
  NAMED_BIND NETINET NETINET6 NETUNIX NEWDB NIS PIPELINING SCANF
  STARTTLS TCPWRAPPERS USERDB XDEBUG
Canonical name: alpha.archaxis.net
UUCP nodename: alpha.archaxis.net
  a.k.a.: [66.138.104.73]
  a.k.a.: [66.138.104.76]
  a.k.a.: localhost.archaxis.net
  a.k.a.: [192.168.1.73]
  a.k.a.: [IPv6:::1]
  a.k.a.: [IPv6:fe80::1]
  a.k.a.: [127.0.0.1]

============ SYSTEM IDENTITY (after readcf) ============
 (short domain name) $w = alpha
 (canonical domain name) $j = alpha.archaxis.net
 (subdomain name) $m = archaxis.net
 (node name) $k = alpha.archaxis.net
========================================================

ron.wingfield@archaxis.net... deliverable: mailer local, user rtwingfield
```

Problem still exists:




And finally, I agree, too many posts for no solution.


----------



## usdmatt (May 22, 2015)

> # sendmail -bv rjohnsom@archaxis.net
> rjohnsom@archaxis.net... deliverable: mailer local, user rtwingfield



Hmm, so according to sendmail the address is deliverable locally, but you're getting "User unknown" when emailing it?

What appears in /var/log/maillog file when you send a test email? As soon as the server receives your test email, a couple of lines should appear in there. One detailing where the message came from, and another detailing what sendmail did with it.

Also what are you testing with. Is that a webmail interface running on the same server or something completely separate?


----------



## rtwingfield (May 22, 2015)

I am using Thunderbird 31.7.0 on a Windows-7 platform attached to the LAN.

This morning, I've run the following log examinations and tests:

The following is the last log in the /var/log/maillog file, sent by the OS ([FONT=Courier New]root[/FONT]), this morning, May 22 03:01:32  . . .one of the daily status summary reports.


```
May 22 03:01:32 <2.6> alpha sendmail[8954]: t4M81WTA008954: from=root, size=1680, class=0, nrcpts=1, msgid=<201505220801.t4M81WTA008954@alpha.archaxis.net>, relay=root@localhost
May 22 03:01:32 <2.6> alpha sendmail[8956]: STARTTLS=server, relay=localhost [127.0.0.1], version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256
May 22 03:01:32 <2.6> alpha sendmail[8954]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-GCM-SHA384, bits=256/256
May 22 03:01:32 <2.6> alpha sendmail[8956]: t4M81W7e008956: from=<root@alpha.archaxis.net>, size=2016, class=0, nrcpts=1, msgid=<201505220801.t4M81WTA008954@alpha.archaxis.net>, proto=ESMTP, daemon=IPv4, relay=localhost [127.0.0.1]
May 22 03:01:32 <2.6> alpha sendmail[8954]: t4M81WTA008954: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31680, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t4M81W7e008956 Message accepted for delivery)
May 22 03:01:32 <2.6> alpha sendmail[8957]: t4M81W7e008956: to=rtwingfield@archaxis.net, ctladdr=<root@alpha.archaxis.net> (0/0), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32362, relay=local, dsn=2.0.0, stat=Sent
```


```
# date
Fri May 22 07:45:05 CDT 2015
# sendmail -bv rjohnsom@archaxis.net  . . .this is an alias in the virtusertable.
rjohnsom@archaxis.net... deliverable: mailer local, user rtwingfield
```
. . .and not sent or delivered.


```
# date
Fri May 22 07:52:03 CDT 2015
# sendmail -bv rtwingfield@archaxis.net  . . .this is my simple address (not an alias).
rtwingfield@archaxis.net... deliverable: mailer local, user rtwingfield
```
. . .was sent and delivered to my Thunderbird in-box.

Nothing logged in /var/log/maillog for either example. . .?

This rule in /etc/syslog.conf:


```
mail.info  [FILE]/var/log/maillog[/FILE]
```
. . .changing to:

```
mail.*  [FILE]/var/log/maillog[/FILE]
```


```
# service syslogd restart
Stopping syslogd.
Waiting for PIDS: 541.
Starting syslogd.
# service sendmail restart
```


```
# date
Fri May 22 08:37:30 CDT 2015
# sendmail -bv rtwingfield@archaxis.net
rtwingfield@archaxis.net... deliverable: mailer local, user rtwingfield
```

. . .and still nothing logged in /var/log/maillog !!!

Finally . . .thinking about your question regarding a web-based client, I do have a _Gmail_ account and tried sending to [FONT=Courier New]Ron.Wingfield@archaxis.net[/FONT] with the following results:
Conversely, when addressed to my non-aliased address, then I did receive the document.
Also . . .yet again, nothing logged in /var/log/maillog?


----------



## usdmatt (May 22, 2015)

Seeing nothing in the logs suggests to me that this server isn't actually getting the messages...

If I try and deliver mail to Ron.Wingfield@archaxis.net, the following happens:

There are no MX records for archaxis.net, so it uses the A record which is x.y.z.73.
(This is the same address as shown in the error report from Google)

Upon connecting to this IP address I get a connection to a server claiming to be bravo.archaxis.net.
This server is running Sendmail 8.14.3 and returns the "User unknown" message for the above email address.


```
# telnet x.y.z.73 25
Trying x.y.z.73...
Connected to adsl-x-y-z-73.dsl.ltrkar.swbell.net.
Escape character is '^]'.
220 bravo.archaxis.net ESMTP Sendmail 8.14.3/8.14.3; Fri, 22 May 2015 10:27:44 -0500 (CDT)
mail from: test@test.com
250 2.1.0 test@test.com... Sender ok
rcpt to: Ron.Wingfield@archaxis.net
550 5.1.1 Ron.Wingfield@archaxis.net... User unknown
quit
221 2.0.0 bravo.archaxis.net closing connection
Connection closed by foreign host.
```
The hostname of the server you are configuring in the posts seems to be alpha, not bravo?


----------



## rtwingfield (May 22, 2015)

My wife sent me a similar message 2 days ago via Gmail with the same rejected alpah/bravo scenario.  I just assumed that DNS couldn't lookup alpha, so it "rolled" over to bravo.  Stand by, I'm going to do something with the zone file.


----------



## drhowarddrfine (May 22, 2015)

Sorry but I'm just looking at this thread on the fly and can't be more helpful but what is in /etc/mail/mailer.conf?


----------



## rtwingfield (May 22, 2015)

This is "box stock" right out of the distribution.  I does include/invoke the `newaliases`.


```
# $FreeBSD: releng/10.1/etc/mail/mailer.conf 93858 2002-04-05 04:25:14Z gshapiro $
#
# Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail
#
sendmail  /usr/libexec/sendmail/sendmail
send-mail  /usr/libexec/sendmail/sendmail
mailq  /usr/libexec/sendmail/sendmail
newaliases  /usr/libexec/sendmail/sendmail
hoststat  /usr/libexec/sendmail/sendmail
purgestat  /usr/libexec/sendmail/sendmail
```


----------



## rtwingfield (May 22, 2015)

I've experimented with the DNS configuration this afternoon.  I've discovered that I cannot ping the server by name or IP address.  I'm going to resolve this problem and then continue with sendmail.


----------



## rtwingfield (May 25, 2015)

Good news . . .I have _resolved_ the problem (pun intended?) and the solution is elegantly simple with regard to configuration files, etc.  I had to revisit *sendmail* and *BIND* (BTW, `named` is chroot'ed).

/var/named/named.conf
/var/named/zonefiles/db.archaxis.net (the primary master SOA zonefile)
/etc/rc.conf

/etc/hosts (very special attention here!)
/etc/hosts.allow 

/etc/mail/aliases.db
/etc/mail/access.db
/etc/mail/virtusertable.db
/etc/mail/local-host-names

I will not go into details with this post; I plan document in detail and will post ASAP.  I mentioned that 





> the solution is elegantly simple


  SirDice adds an interesting comment to his signature,





> Experience is something you don't get until just after you need it.


I just lost (. . .colon cancer) a very good friend who would always say, 





> This is going to make perfect sense . . .once I understand it.



How so very true.


----------

