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

PenguinWhispererThe . th3penguinwhisperer at gmail.com
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 mail.domain.com as from address in the logs when trying with sendmail
-froot myhotmail at hotmail.com).

Easiest method would be to use the aliases file. I updated the root alias:
root: mymail at hotmail.com 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 mail.domain.com

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 domain.com 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 domain.com
root at localhost info at domain.comroot@mail.domain.com info at domain.com

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:

FEATURE(genericstable)dnl
GENERICS_DOMAIN(domain.com)dnl
dnl GENERICS_DOMAIN(mail.domain.com)dnl
dnl GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
FEATURE(masquerade_envelope)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 mail.domain.com

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 domain.com
.

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(mail.domain.com) and hostname(so mail) for 127.0.0.1 ?

Thanks a lot in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailscanner.info/pipermail/mailscanner/attachments/20160919/91fb18d3/attachment.html>


More information about the MailScanner mailing list