genericstable doesn't work (has to do with MailScanner?)

PenguinWhispererThe . th3penguinwhisperer at
Mon Sep 19 15:44:17 UTC 2016

I want to forward all mail for root (so basically the output of all cron
jobs but other mails for root as well) to an external email address
(hotmail). I also have a Mailscanner setup on this FreeBSD mail server. I
have incoming/outgoing and submit profiles. However I don't know exactly
how MailScanner sends the mails once they have been checked. My sendmail
configuration looks right. However it's not working ( I see
root at as from address in the logs when trying with sendmail
-froot myhotmail at

Easiest method would be to use the aliases file. I updated the root alias:
root: mymail at And ran newaliases.

When an email is sent I see that the hotmail MX server "accepts" my mail.
Standard MS Security through obscurity makes me think it's silently
discarding my email ( not in junk mail, ... ).

This server is used to send/receive mail for a domain (and more domains in
the future).

I've checked the logs and it seems the mail is sent with from field of :
root at

I'm pretty sure this is at the root of my mail never received in my
hotmail. The existing email addresses are using user at as from.

Now I would like to rewrite this (mail) from address/ctladdr. I thought
this would be an easy fix with genericstable.

Genericstable (had multiple tries):

root info at
root at localhost info at info at

Regenerated the db with makemap. I tried with different settings.

I also removed the EXPOSED_USER root (from the generic m4 file). I can see
it's not in the generated cf file.

I also added root to the trusted users.

In my m4 file:

dnl GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
dnl define(`LOCAL_RELAY', `localhost')dnl

I have a submit mc file as well. Not sure if this matters but I don't think
so. (I don't have sendmail in MSP mode running as far as I know).

I've tried with GENERICS_DOMAIN as the domain that I want it to be or the
domain that I want to be rewritten.

make all install and restarted sendmail.

Still it just seems to go out as root at

I tried with sendmail in address test mode (bt; tryflags hs and try esmtp
root). This correctly modifies to the wanted source address: info at

Anyone has some other ideas why this is not working? Or more debugging
ways? Do I need local_relay to make this work? What's expected to be in the
hosts file? Fqdn( and hostname(so mail) for ?

Thanks a lot in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the MailScanner mailing list